From 11c9683db9ea73b2090280c1cfa7d725bd8a60fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 04:07:37 +0000 Subject: [PATCH 1/2] build(deps): bump @docker/actions-toolkit from 0.18.0 to 0.19.0 Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.18.0 to 0.19.0. - [Release notes](https://github.com/docker/actions-toolkit/releases) - [Commits](https://github.com/docker/actions-toolkit/compare/v0.18.0...v0.19.0) --- updated-dependencies: - dependency-name: "@docker/actions-toolkit" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 7a4225a5..431b5c90 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", - "@docker/actions-toolkit": "^0.18.0", + "@docker/actions-toolkit": "^0.19.0", "js-yaml": "^4.1.0", "uuid": "^9.0.1" }, diff --git a/yarn.lock b/yarn.lock index bfe2d02b..1abad87e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,10 +56,10 @@ "@actions/core" "^1.2.6" minimatch "^3.0.4" -"@actions/http-client@^2.0.1", "@actions/http-client@^2.1.1", "@actions/http-client@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.2.0.tgz#f8239f375be6185fcd07765efdcf0031ad5df1a0" - integrity sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg== +"@actions/http-client@^2.0.1", "@actions/http-client@^2.1.1", "@actions/http-client@^2.2.0", "@actions/http-client@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.2.1.tgz#ed3fe7a5a6d317ac1d39886b0bb999ded229bb38" + integrity sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw== dependencies: tunnel "^0.0.6" undici "^5.25.4" @@ -765,16 +765,16 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@docker/actions-toolkit@^0.18.0": - version "0.18.0" - resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.18.0.tgz#628e9396ae90b596348312058296aeb20a27360d" - integrity sha512-F0DwpVe2TNAQuZO540wJpu2QxXACNKZX3Tgi8yPfChsgUG0Z20Fmr6BNToQxlaVxG6LiMQdujfemoHo4slnLEw== +"@docker/actions-toolkit@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.19.0.tgz#3b17d06c46d60142423651ddb9d390f65f109a8c" + integrity sha512-Es08sgfIBOsEBQLfrJQtfgf5mM9Rl4nfZ7byYQ+umbI7VcUEF4AusyNfqsZob7ZRGu+YUw2jJivZysjVCz6LMg== dependencies: "@actions/cache" "^3.2.4" "@actions/core" "^1.10.1" "@actions/exec" "^1.1.1" "@actions/github" "^6.0.0" - "@actions/http-client" "^2.2.0" + "@actions/http-client" "^2.2.1" "@actions/io" "^1.1.3" "@actions/tool-cache" "^2.0.1" "@octokit/core" "^5.1.0" @@ -784,7 +784,7 @@ handlebars "^4.7.8" jwt-decode "^4.0.0" semver "^7.5.4" - tmp "^0.2.2" + tmp "^0.2.3" "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -3855,7 +3855,7 @@ titleize@^3.0.0: resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== -tmp@^0.2.2: +tmp@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== From 0f00370563710ebfbdf4287b76a0a5d88864e7f9 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:12:57 +0100 Subject: [PATCH 2/2] chore: update generated content Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- dist/index.js | 2 +- dist/index.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0ebd8ff0..fe9a361e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=s(r(1017));const c=s(r(1518));const p=s(r(8245));const d=r(3434);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,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield c.getCompressionMethod();let A="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});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}A=l.join(yield c.createTempDirectory(),c.getCacheFileName(a));o.debug(`Archive Path: ${A}`);yield p.downloadCache(t.archiveLocation,A,i);if(o.isDebug()){yield(0,d.listTar)(A,a)}const r=c.getArchiveFileSizeInBytes(A);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(A,a);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(A)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,A,u,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=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 y=l.join(E,c.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,h,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const l=10*1024*1024*1024;const C=c.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>l&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){g=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((u=(A=b===null||b===void 0?void 0:b.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} 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=b===null||b===void 0?void 0:b.error)===null||m===void 0?void 0:m.message}`)}o.debug(`Saving Cache (ID: ${g})`);yield p.saveCache(g,y,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(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return g}))}t.saveCache=saveCache},8245:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(5526);const p=s(r(6113));const d=s(r(7147));const A=r(7310);const u=s(r(1518));const m=r(5500);const g=r(6215);const h=r(3981);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 l.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 p.createHash("sha256").update(i.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();const n=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${n}`;const l=yield(0,h.retryTypedResponse)("getCacheEntry",(()=>a(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(s))}))));if(l.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],i,n)}return null}if(!(0,h.isSuccessStatusCode)(l.statusCode)){throw new Error(`Cache service responded with ${l.statusCode}`)}const c=l.result;const p=c===null||c===void 0?void 0:c.archiveLocation;if(!p){throw new Error("Cache not found.")}o.setSecret(p);o.debug(`Cache Result:`);o.debug(JSON.stringify(c));return c}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,r){return a(this,void 0,void 0,(function*(){const i=`caches?key=${encodeURIComponent(e)}`;const n=yield(0,h.retryTypedResponse)("listCache",(()=>a(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(i))}))));if(n.statusCode===200){const t=n.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 a(this,void 0,void 0,(function*(){const i=new A.URL(e);const n=(0,g.getDownloadOptions)(r);if(i.hostname.endsWith(".blob.core.windows.net")){if(n.useAzureSdk){yield(0,m.downloadCacheStorageSDK)(e,t,n)}else if(n.concurrentBlobDownloads){yield(0,m.downloadCacheHttpClientConcurrent)(e,t,n)}else{yield(0,m.downloadCacheHttpClient)(e,t)}}else{yield(0,m.downloadCacheHttpClient)(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();const n=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const s={key:e,version:n,cacheSize:r===null||r===void 0?void 0:r.cacheSize};const o=yield(0,h.retryTypedResponse)("reserveCache",(()=>a(this,void 0,void 0,(function*(){return i.postJson(getCacheApiUrl("caches"),s)}))));return o}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,i,n){return a(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${n-i+1} bytes at offset ${i} with content range: ${getContentRange(i,n)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(i,n)};const l=yield(0,h.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${n})`,(()=>a(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),s)}))));if(!(0,h.isSuccessStatusCode)(l.message.statusCode)){throw new Error(`Cache service responded with ${l.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=u.getArchiveFileSizeInBytes(r);const s=getCacheApiUrl(`caches/${t.toString()}`);const l=d.openSync(r,"r");const c=(0,g.getUploadOptions)(i);const p=u.assertDefined("uploadConcurrency",c.uploadConcurrency);const A=u.assertDefined("uploadChunkSize",c.uploadChunkSize);const m=[...new Array(p).keys()];o.debug("Awaiting all uploads");let h=0;try{yield Promise.all(m.map((()=>a(this,void 0,void 0,(function*(){while(hd.createReadStream(r,{fd:l,start:i,end:a,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,a)}})))))}finally{d.closeSync(l)}return}))}function commitCache(e,t,r){return a(this,void 0,void 0,(function*(){const i={size:r};return yield(0,h.retryTypedResponse)("commitCache",(()=>a(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),i)}))))}))}function saveCache(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,r);o.debug("Commiting cache");const n=u.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const s=yield commitCache(i,e,n);if(!(0,h.isSuccessStatusCode)(s.statusCode)){throw new Error(`Cache service responded with ${s.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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,n){r=e[t](r),settle(i,n,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 l=s(r(2186));const c=s(r(1514));const p=s(r(8090));const d=s(r(7436));const A=s(r(7147));const u=s(r(1017));const m=s(r(5911));const g=s(r(3837));const h=r(4138);const E=r(8840);function createTempDirectory(){return a(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 d.mkdirP(r);return r}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return A.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,r,i,n;var s;return a(this,void 0,void 0,(function*(){const a=[];const c=(s=process.env["GITHUB_WORKSPACE"])!==null&&s!==void 0?s:process.cwd();const d=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var A=true,m=o(d.globGenerator()),g;g=yield m.next(),t=g.done,!t;A=true){n=g.value;A=false;const e=n;const t=u.relative(c,e).replace(new RegExp(`\\${u.sep}`,"g"),"/");l.debug(`Matched: ${t}`);if(t===""){a.push(".")}else{a.push(`${t}`)}}}catch(e){r={error:e}}finally{try{if(!A&&!t&&(i=m.return))yield i.call(m)}finally{if(r)throw r.error}}return a}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return a(this,void 0,void 0,(function*(){return g.promisify(A.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e,t=[]){return a(this,void 0,void 0,(function*(){let r="";t.push("--version");l.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){l.debug(e.message)}r=r.trim();l.debug(r);return r}))}function getCompressionMethod(){return a(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]);const t=m.clean(e);l.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 a(this,void 0,void 0,(function*(){if(A.existsSync(E.GnuTarPathOnWindows)){return E.GnuTarPathOnWindows}const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")?d.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},8840:(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 n;(function(e){e["GNU"]="gnu";e["BSD"]="bsd"})(n||(t.ArchiveToolType=n={}));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"},5500:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(4100);const p=s(r(4300));const d=s(r(7147));const A=s(r(2781));const u=s(r(3837));const m=s(r(1518));const g=r(8840);const h=r(3981);const E=r(2557);function pipeResponseToStream(e,t){return a(this,void 0,void 0,(function*(){const r=u.promisify(A.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 a(this,void 0,void 0,(function*(){const r=d.createWriteStream(t);const i=new l.HttpClient("actions/cache");const n=yield(0,h.retryHttpClientResponse)("downloadCache",(()=>a(this,void 0,void 0,(function*(){return i.get(e)}))));n.message.socket.setTimeout(g.SocketTimeout,(()=>{n.message.destroy();o.debug(`Aborting download, socket timed out after ${g.SocketTimeout} ms`)}));yield pipeResponseToStream(n,r);const s=n.message.headers["content-length"];if(s){const e=parseInt(s);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 a(this,void 0,void 0,(function*(){const n=yield d.promises.open(t,"w");const s=new l.HttpClient("actions/cache",undefined,{socketTimeout:r.timeoutInMs,keepAlive:true});try{const t=yield(0,h.retryHttpClientResponse)("downloadCacheMetadata",(()=>a(this,void 0,void 0,(function*(){return yield s.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 l=parseInt(o);if(Number.isNaN(l)){throw new Error(`Could not interpret Content-Length: ${l}`)}const c=[];const p=4*1024*1024;for(let t=0;ta(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(s,e,t,r)}))})}c.reverse();let d=0;let A=0;const u=new DownloadProgress(l);u.startDisplayTimer();const m=u.onProgress();const g=[];let E;const waitAndWrite=()=>a(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(g));yield n.write(e.buffer,0,e.count,e.offset);d--;delete g[e.offset];A+=e.count;m({loadedBytes:A})}));while(E=c.pop()){g[E.offset]=E.promiseGetter();d++;if(d>=((i=r.downloadConcurrency)!==null&&i!==void 0?i:10)){yield waitAndWrite()}}while(d>0){yield waitAndWrite()}}finally{s.dispose();yield n.close()}}))}t.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=5;let s=0;while(true){try{const n=3e4;const s=yield promiseWithTimeout(n,downloadSegment(e,t,r,i));if(typeof s==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return s}catch(e){if(s>=n){throw e}s++}}}))}function downloadSegment(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=yield(0,h.retryHttpClientResponse)("downloadCachePart",(()=>a(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+i-1}`})}))));if(!n.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:r,count:i,buffer:yield n.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var i;return a(this,void 0,void 0,(function*(){const n=new c.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}});const s=yield n.getProperties();const a=(i=s.contentLength)!==null&&i!==void 0?i:-1;if(a<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(134217728,p.constants.MAX_LENGTH);const i=new DownloadProgress(a);const s=d.openSync(t,"w");try{i.startDisplayTimer();const t=new E.AbortController;const o=t.signal;while(!i.isDone()){const l=i.segmentOffset+i.segmentSize;const c=Math.min(e,a-l);i.nextSegment(c);const p=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,n.downloadToBuffer(l,c,{abortSignal:o,concurrency:r.downloadConcurrency,onProgress:i.onProgress()}));if(p==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(p)){d.writeFileSync(s,p)}}}finally{i.stopDisplayTimer();d.closeSync(s)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>a(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}))}))},3981:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[l.HttpCodes.BadGateway,l.HttpCodes.ServiceUnavailable,l.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return a(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,i=c.DefaultRetryAttempts,n=c.DefaultRetryDelay,s=undefined){return a(this,void 0,void 0,(function*(){let a="";let l=1;while(l<=i){let c=undefined;let p=undefined;let d=false;try{c=yield t()}catch(e){if(s){c=s(e)}d=true;a=e.message}if(c){p=r(c);if(!isServerErrorStatusCode(p)){return c}}if(p){d=isRetryableStatusCode(p);a=`Cache service responded with ${p}`}o.debug(`${e} - Attempt ${l} of ${i} failed with error: ${a}`);if(!d){o.debug(`${e} - Error is not retryable`);break}yield sleep(n);l++}throw Error(`${e} failed: ${a}`)}))}t.retry=retry;function retryTypedResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return a(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,i,(e=>{if(e instanceof l.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 a(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,i)}))}t.retryHttpClientResponse=retryHttpClientResponse},3434:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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(1514);const l=s(r(7436));const c=r(7147);const p=s(r(1017));const d=s(r(1518));const A=r(8840);const u=process.platform==="win32";function getTarPath(){return a(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield d.getGnuTarPathOnWindows();const t=A.SystemTarPathOnWindows;if(e){return{path:e,type:A.ArchiveToolType.GNU}}else if((0,c.existsSync)(t)){return{path:t,type:A.ArchiveToolType.BSD}}break}case"darwin":{const e=yield l.which("gtar",false);if(e){return{path:e,type:A.ArchiveToolType.GNU}}else{return{path:yield l.which("tar",true),type:A.ArchiveToolType.BSD}}}default:break}return{path:yield l.which("tar",true),type:A.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,i=""){return a(this,void 0,void 0,(function*(){const n=[`"${e.path}"`];const s=d.getCacheFileName(t);const a="cache.tar";const o=getWorkingDirectory();const l=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(r){case"create":n.push("--posix","-cf",l?a:s.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",l?a:s.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",A.ManifestFilename);break;case"extract":n.push("-xf",l?a:i.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"));break;case"list":n.push("-tf",l?a:i.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P");break}if(e.type===A.ArchiveToolType.GNU){switch(process.platform){case"win32":n.push("--force-local");break;case"darwin":n.push("--delay-directory-restore");break}}return n}))}function getCommands(e,t,r=""){return a(this,void 0,void 0,(function*(){let i;const n=yield getTarPath();const s=yield getTarArgs(n,e,t,r);const a=t!=="create"?yield getDecompressionProgram(n,e,r):yield getCompressionProgram(n,e);const o=n.type===A.ArchiveToolType.BSD&&e!==A.CompressionMethod.Gzip&&u;if(o&&t!=="create"){i=[[...a].join(" "),[...s].join(" ")]}else{i=[[...s].join(" "),[...a].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 a(this,void 0,void 0,(function*(){const i=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(t){case A.CompressionMethod.Zstd:return i?["zstd -d --long=30 --force -o",A.TarFilename,r.replace(new RegExp(`\\${p.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d --long=30"':"unzstd --long=30"];case A.CompressionMethod.ZstdWithoutLong:return i?["zstd -d --force -o",A.TarFilename,r.replace(new RegExp(`\\${p.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return a(this,void 0,void 0,(function*(){const r=d.getCacheFileName(t);const i=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(t){case A.CompressionMethod.Zstd:return i?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${p.sep}`,"g"),"/"),A.TarFilename]:["--use-compress-program",u?'"zstd -T0 --long=30"':"zstdmt --long=30"];case A.CompressionMethod.ZstdWithoutLong:return i?["zstd -T0 --force -o",r.replace(new RegExp(`\\${p.sep}`,"g"),"/"),A.TarFilename]:["--use-compress-program",u?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return a(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 a(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}t.listTar=listTar;function extractTar(e,t){return a(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield l.mkdirP(r);const i=yield getCommands(t,"extract",e);yield execCommands(i)}))}t.extractTar=extractTar;function createTar(e,t,r){return a(this,void 0,void 0,(function*(){(0,c.writeFileSync)(p.join(e,A.ManifestFilename),t.join("\n"));const i=yield getCommands(r,"create");yield execCommands(i,e)}))}t.createTar=createTar},6215:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getDownloadOptions=t.getUploadOptions=void 0;const a=s(r(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}a.debug(`Upload concurrency: ${t.uploadConcurrency}`);a.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}a.debug(`Use Azure SDK: ${t.useAzureSdk}`);a.debug(`Download concurrency: ${t.downloadConcurrency}`);a.debug(`Request timeout (ms): ${t.timeoutInMs}`);a.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);a.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);a.debug(`Lookup only: ${t.lookupOnly}`);return t}t.getDownloadOptions=getDownloadOptions},4138:(e,t,r)=>{var i=r(1610);var n=r(8373);var s=n;s.v1=i;s.v4=n;e.exports=s},5694:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var i=r||0;var n=t;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}e.exports=bytesToUuid},4069:(e,t,r)=>{var i=r(6113);e.exports=function nodeRNG(){return i.randomBytes(16)}},1610:(e,t,r)=>{var i=r(4069);var n=r(5694);var s;var a;var o=0;var l=0;function v1(e,t,r){var c=t&&r||0;var p=t||[];e=e||{};var d=e.node||s;var A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){var u=i();if(d==null){d=s=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]}if(A==null){A=a=(u[6]<<8|u[7])&16383}}var m=e.msecs!==undefined?e.msecs:(new Date).getTime();var g=e.nsecs!==undefined?e.nsecs:l+1;var h=m-o+(g-l)/1e4;if(h<0&&e.clockseq===undefined){A=A+1&16383}if((h<0||m>o)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=m;l=g;a=A;m+=122192928e5;var E=((m&268435455)*1e4+g)%4294967296;p[c++]=E>>>24&255;p[c++]=E>>>16&255;p[c++]=E>>>8&255;p[c++]=E&255;var y=m/4294967296*1e4&268435455;p[c++]=y>>>8&255;p[c++]=y&255;p[c++]=y>>>24&15|16;p[c++]=y>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(var C=0;C<6;++C){p[c+C]=d[C]}return t?t:n(p)}e.exports=v1},8373:(e,t,r)=>{var i=r(4069);var n=r(5694);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var a=e.random||(e.rng||i)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(t){for(var o=0;o<16;++o){t[s+o]=a[o]}}return t||n(a)}e.exports=v4},7351:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const a=s(r(2037));const o=r(5278);function issueCommand(e,t,r){const i=new Command(e,t,r);process.stdout.write(i.toString()+a.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const i=this.properties[r];if(i){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(i)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const o=r(7351);const l=r(717);const c=r(5278);const p=s(r(2037));const d=s(r(1017));const A=r(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=c.toCommandValue(t);process.env[e]=r;const i=process.env["GITHUB_ENV"]||"";if(i){return l.issueFileCommand("ENV",l.prepareKeyValueMessage(e,t))}o.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueFileCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(i.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return l.issueFileCommand("OUTPUT",l.prepareKeyValueMessage(e,t))}process.stdout.write(p.EOL);o.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){o.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){o.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){o.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+p.EOL)}t.info=info;function startGroup(e){o.issue("group",e)}t.startGroup=startGroup;function endGroup(){o.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return a(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return l.issueFileCommand("STATE",l.prepareKeyValueMessage(e,t))}o.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return a(this,void 0,void 0,(function*(){return yield A.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var m=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return m.summary}});var g=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var h=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return h.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return h.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return h.toPlatformPath}})},717:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const a=s(r(7147));const o=s(r(2037));const l=r(8974);const c=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}a.appendFileSync(r,`${c.toCommandValue(t)}${o.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${l.v4()}`;const i=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(i.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${o.EOL}${i}${o.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(6255);const s=r(5526);const a=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return i(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const i=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}a.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);a.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const a=s(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,a.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=r(2037);const s=r(7147);const{access:a,appendFile:o,writeFile:l}=s.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield a(e,s.constants.R_OK|s.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const i=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const i=t?l:o;yield i(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:i,rowspan:n}=e;const s=t?"th":"td";const a=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(s,r,a)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:i,height:n}=r||{};const s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const a=this.wrap("img",null,Object.assign({src:e,alt:t},s));return this.addRaw(a).addEOL()}addHeading(e,t){const r=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},8974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var i=_interopRequireDefault(r(1595));var n=_interopRequireDefault(r(6993));var s=_interopRequireDefault(r(1472));var a=_interopRequireDefault(r(6217));var o=_interopRequireDefault(r(2381));var l=_interopRequireDefault(r(427));var c=_interopRequireDefault(r(2609));var p=_interopRequireDefault(r(1458));var d=_interopRequireDefault(r(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},6385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},9784:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let s=n.length;function rng(){if(s>n.length-16){i.default.randomFillSync(n);s=0}return n.slice(s,s+=16)}},8844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var s=stringify;t["default"]=s},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(9784));var n=_interopRequireDefault(r(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let s;let a;let o=0;let l=0;function v1(e,t,r){let c=t&&r||0;const p=t||new Array(16);e=e||{};let d=e.node||s;let A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){const t=e.random||(e.rng||i.default)();if(d==null){d=s=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(A==null){A=a=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:l+1;const g=u-o+(m-l)/1e4;if(g<0&&e.clockseq===undefined){A=A+1&16383}if((g<0||u>o)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=u;l=m;a=A;u+=122192928e5;const h=((u&268435455)*1e4+m)%4294967296;p[c++]=h>>>24&255;p[c++]=h>>>16&255;p[c++]=h>>>8&255;p[c++]=h&255;const E=u/4294967296*1e4&268435455;p[c++]=E>>>8&255;p[c++]=E&255;p[c++]=E>>>24&15|16;p[c++]=E>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(let e=0;e<6;++e){p[c+e]=d[e]}return t||(0,n.default)(p)}var c=v1;t["default"]=c},6993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(5920));var n=_interopRequireDefault(r(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v3",48,n.default);var a=s;t["default"]=a},5920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(r(1458));var n=_interopRequireDefault(r(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(9784));var n=_interopRequireDefault(r(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const s=e.random||(e.rng||i.default)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=s[e]}return t}return(0,n.default)(s)}var s=v4;t["default"]=s},6217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(5920));var n=_interopRequireDefault(r(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v5",80,n.default);var a=s;t["default"]=a},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const o=r(1576);const l=s(r(8159));function exec(e,t,r){return a(this,void 0,void 0,(function*(){const i=l.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const s=new l.ToolRunner(n,t,r);return s.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var i,n;return a(this,void 0,void 0,(function*(){let s="";let a="";const l=new o.StringDecoder("utf8");const c=new o.StringDecoder("utf8");const p=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stdout;const d=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{a+=c.write(e);if(d){d(e)}};const stdOutListener=e=>{s+=l.write(e);if(p){p(e)}};const A=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:A}));s+=l.end();a+=c.end();return{exitCode:u,stdout:s,stderr:a}}))}t.getExecOutput=getExecOutput},8159:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const o=s(r(2037));const l=s(r(2361));const c=s(r(2081));const p=s(r(1017));const d=s(r(7436));const A=s(r(1962));const u=r(9512);const m=process.platform==="win32";class ToolRunner extends l.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(m){if(this._isCmdFile()){n+=r;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${r}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(r);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=r;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,r){try{let i=t+e.toString();let n=i.indexOf(o.EOL);while(n>-1){const e=i.substring(0,n);r(e);i=i.substring(n+o.EOL.length);n=i.indexOf(o.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(m){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(m){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const i of e){if(t.some((e=>e===i))){r=true;break}}if(!r){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(r&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return a(this,void 0,void 0,(function*(){if(!A.isRooted(this.toolPath)&&(this.toolPath.includes("/")||m&&this.toolPath.includes("\\"))){this.toolPath=p.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>a(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+o.EOL)}const i=new ExecState(r,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield A.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const s=c.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));let a="";if(s.stdout){s.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let l="";if(s.stderr){s.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}l=this._processLineBuffer(e,l,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}s.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));s.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));s.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((r,i)=>{if(a.length>0){this.emit("stdline",a)}if(l.length>0){this.emit("errline",l)}s.removeAllListeners();if(r){t(r)}else{e(i)}}));if(this.options.input){if(!s.stdin){throw new Error("child process missing stdin")}s.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let s=0;s0){t.push(n);n=""}continue}append(a)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends l.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},4087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Context=void 0;const i=r(7147);const n=r(2037);class Context{constructor(){var e,t,r;this.payload={};if(process.env.GITHUB_EVENT_PATH){if((0,i.existsSync)(process.env.GITHUB_EVENT_PATH)){this.payload=JSON.parse((0,i.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}))}else{const e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${n.EOL}`)}}this.eventName=process.env.GITHUB_EVENT_NAME;this.sha=process.env.GITHUB_SHA;this.ref=process.env.GITHUB_REF;this.workflow=process.env.GITHUB_WORKFLOW;this.action=process.env.GITHUB_ACTION;this.actor=process.env.GITHUB_ACTOR;this.job=process.env.GITHUB_JOB;this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10);this.runId=parseInt(process.env.GITHUB_RUN_ID,10);this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:`https://api.github.com`;this.serverUrl=(t=process.env.GITHUB_SERVER_URL)!==null&&t!==void 0?t:`https://github.com`;this.graphqlUrl=(r=process.env.GITHUB_GRAPHQL_URL)!==null&&r!==void 0?r:`https://api.github.com/graphql`}get issue(){const e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){const[e,t]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:t}}if(this.payload.repository){return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name}}throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}}t.Context=Context},5438:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokit=t.context=void 0;const a=s(r(4087));const o=r(3030);t.context=new a.Context;function getOctokit(e,t,...r){const i=o.GitHub.plugin(...r);return new i((0,o.getOctokitOptions)(e,t))}t.getOctokit=getOctokit},7914:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getApiBaseUrl=t.getProxyFetch=t.getProxyAgentDispatcher=t.getProxyAgent=t.getAuthString=void 0;const o=s(r(6255));const l=r(1773);function getAuthString(e,t){if(!e&&!t.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&t.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof t.auth==="string"?t.auth:`token ${e}`}t.getAuthString=getAuthString;function getProxyAgent(e){const t=new o.HttpClient;return t.getAgent(e)}t.getProxyAgent=getProxyAgent;function getProxyAgentDispatcher(e){const t=new o.HttpClient;return t.getAgentDispatcher(e)}t.getProxyAgentDispatcher=getProxyAgentDispatcher;function getProxyFetch(e){const t=getProxyAgentDispatcher(e);const proxyFetch=(e,r)=>a(this,void 0,void 0,(function*(){return(0,l.fetch)(e,Object.assign(Object.assign({},r),{dispatcher:t}))}));return proxyFetch}t.getProxyFetch=getProxyFetch;function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}t.getApiBaseUrl=getApiBaseUrl},3030:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokitOptions=t.GitHub=t.defaults=t.context=void 0;const a=s(r(4087));const o=s(r(7914));const l=r(6762);const c=r(3044);const p=r(4193);t.context=new a.Context;const d=o.getApiBaseUrl();t.defaults={baseUrl:d,request:{agent:o.getProxyAgent(d),fetch:o.getProxyFetch(d)}};t.GitHub=l.Octokit.plugin(c.restEndpointMethods,p.paginateRest).defaults(t.defaults);function getOctokitOptions(e,t){const r=Object.assign({},t||{});const i=o.getAuthString(e,r);if(i){r.auth=i}return r}t.getOctokitOptions=getOctokitOptions},8090:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=r(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const a=s(r(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;a.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;a.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;a.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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,n){r=e[t](r),settle(i,n,r.done,r.value)}))}}function settle(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}};var l=this&&this.__await||function(e){return this instanceof l?(this.v=e,this):new l(e)};var c=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,s=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(r,i){s.push([e,t,r,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(s[0][3],e)}}function step(e){e.value instanceof l?Promise.resolve(e.value.v).then(fulfill,reject):settle(s[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),s.shift(),s.length)resume(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const p=s(r(2186));const d=s(r(7147));const A=s(r(1026));const u=s(r(1017));const m=s(r(9005));const g=r(1063);const h=r(4536);const E=r(9117);const y=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=A.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return a(this,void 0,void 0,(function*(){const r=[];try{for(var i=o(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;r.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return r}))}globGenerator(){return c(this,arguments,(function*globGenerator_1(){const e=A.getOptions(this.options);const t=[];for(const r of this.patterns){t.push(r);if(e.implicitDescendants&&(r.trailingSeparator||r.segments[r.segments.length-1]!=="**")){t.push(new h.Pattern(r.negate,true,r.segments.concat("**")))}}const r=[];for(const e of m.getSearchPaths(t)){p.debug(`Search path '${e}'`);try{yield l(d.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}r.unshift(new E.SearchState(e,1))}const i=[];while(r.length){const n=r.pop();const s=m.match(t,n.path);const a=!!s||m.partialMatch(t,n.path);if(!s&&!a){continue}const o=yield l(DefaultGlobber.stat(n,e,i));if(!o){continue}if(o.isDirectory()){if(s&g.MatchKind.Directory){yield yield l(n.path)}else if(!a){continue}const e=n.level+1;const t=(yield l(d.promises.readdir(n.path))).map((t=>new E.SearchState(u.join(n.path,t),e)));r.push(...t.reverse())}else if(s&g.MatchKind.File){yield yield l(n.path)}}}))}static create(e,t){return a(this,void 0,void 0,(function*(){const r=new DefaultGlobber(t);if(y){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{r.patterns.push(new h.Pattern(e))}}r.searchPaths.push(...m.getSearchPaths(r.patterns));return r}))}static stat(e,t,r){return a(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield d.promises.stat(e.path)}catch(r){if(r.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){p.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw r}}else{i=yield d.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield d.promises.realpath(e.path);while(r.length>=e.level){r.pop()}if(r.some((e=>e===t))){p.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}r.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var r;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(r=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const o=s(r(1017));const l=a(r(9491));const c=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(c&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=o.dirname(e);if(c&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){l.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);l.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(c){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();l.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();l.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}l.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||c&&e.endsWith("\\")){}else{e+=o.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){l.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(c){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){l.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(c){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(c){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(o.sep)){return e}if(e===o.sep){return e}if(c&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const o=s(r(1017));const l=s(r(1849));const c=a(r(9491));const p=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){c.default(e,`Parameter 'itemPath' must not be empty`);e=l.safeTrimTrailingSeparator(e);if(!l.hasRoot(e)){this.segments=e.split(o.sep)}else{let t=e;let r=l.dirname(t);while(r!==t){const e=o.basename(t);this.segments.unshift(e);t=r;r=l.dirname(t)}this.segments.unshift(t)}}else{c.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const r of e){const e=l?r.searchPath.toUpperCase():r.searchPath;t[e]="candidate"}const r=[];for(const i of e){const e=l?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let s=e;let o=a.dirname(s);while(o!==s){if(t[o]){n=true;break}s=o;o=a.dirname(s)}if(!n){r.push(i.searchPath);t[e]="included"}}return r}t.getSearchPaths=getSearchPaths;function match(e,t){let r=o.MatchKind.None;for(const i of e){if(i.negate){r&=~i.match(t)}else{r|=i.match(t)}}return r}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const o=s(r(2037));const l=s(r(1017));const c=s(r(1849));const p=a(r(9491));const d=r(3973);const A=r(1063);const u=r(6836);const m=process.platform==="win32";class Pattern{constructor(e,t=false,r,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{r=r||[];p.default(r.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(r[0]);p.default(t&&c.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(r).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=c.normalizeSeparators(n).endsWith(l.sep);n=c.safeTrimTrailingSeparator(n);let s=false;const a=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!s&&!(s=e==="")));this.searchPath=new u.Path(a).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(a[0]),m?"i":"");this.isImplicitPattern=t;const o={dot:true,nobrace:true,nocase:m,nocomment:true,noext:true,nonegate:true};n=m?n.replace(/\\/g,"/"):n;this.minimatch=new d.Minimatch(n,o)}match(e){if(this.segments[this.segments.length-1]==="**"){e=c.normalizeSeparators(e);if(!e.endsWith(l.sep)&&this.isImplicitPattern===false){e=`${e}${l.sep}`}}else{e=c.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?A.MatchKind.Directory:A.MatchKind.All}return A.MatchKind.None}partialMatch(e){e=c.safeTrimTrailingSeparator(e);if(c.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(m?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(m?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){p.default(e,"pattern cannot be empty");const r=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));p.default(r.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);p.default(!c.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=c.normalizeSeparators(e);if(e==="."||e.startsWith(`.${l.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${l.sep}`)){t=t||o.homedir();p.default(t,"Unable to determine HOME directory");p.default(c.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(m&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=c.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(m&&(e==="\\"||e.match(/^\\[^\\]/))){let t=c.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=c.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return c.normalizeSeparators(e)}static getLiteral(e){let t="";for(let r=0;r=0){if(i.length>1){return""}if(i){t+=i;r=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var r=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const o=s(r(3685));const l=s(r(5687));const c=s(r(9835));const p=s(r(4294));const d=r(1773);var A;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(A||(t.HttpCodes=A={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u||(t.Headers=u={}));var m;(function(e){e["ApplicationJson"]="application/json"})(m||(t.MediaTypes=m={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const g=[A.MovedPermanently,A.ResourceMoved,A.SeeOther,A.TemporaryRedirect,A.PermanentRedirect];const h=[A.BadGateway,A.ServiceUnavailable,A.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const y=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return a(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return a(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return a(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return a(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,i){return a(this,void 0,void 0,(function*(){return this.request(e,t,r,i)}))}getJson(e,t={}){return a(this,void 0,void 0,(function*(){t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,m.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.post(e,i,r);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.put(e,i,r);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.patch(e,i,r);return this._processResponse(n,this.requestOptions)}))}request(e,t,r,i){return a(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let s=this._prepareRequest(e,n,i);const a=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let o=0;let l;do{l=yield this.requestRaw(s,r);if(l&&l.message&&l.message.statusCode===A.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(l)){e=t;break}}if(e){return e.handleAuthentication(this,s,r)}else{return l}}let t=this._maxRedirects;while(l.message.statusCode&&g.includes(l.message.statusCode)&&this._allowRedirects&&t>0){const a=l.message.headers["location"];if(!a){break}const o=new URL(a);if(n.protocol==="https:"&&n.protocol!==o.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();if(o.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}s=this._prepareRequest(e,o,i);l=yield this.requestRaw(s,r);t--}if(!l.message.statusCode||!h.includes(l.message.statusCode)){return l}o+=1;if(o{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;r(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let s;n.on("socket",(e=>{s=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(s){s.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=c.getProxyUrl(t);const i=r&&r.hostname;if(!i){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?l:o;const s=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):s;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const i=r&&r.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let s=100;if(this.requestOptions){s=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let i;const a=r.protocol==="https:";if(n){i=a?p.httpsOverHttps:p.httpsOverHttp}else{i=a?p.httpOverHttps:p.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=n?new l.Agent(e):new o.Agent(e);this._agent=t}if(!t){t=n?l.globalAgent:o.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const i=e.protocol==="https:";r=new d.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=r;if(i&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return a(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return a(this,void 0,void 0,(function*(){return new Promise(((r,i)=>a(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const s={statusCode:n,result:null,headers:{}};if(n===A.NotFound){r(s)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let a;let o;try{o=yield e.readBody();if(o&&o.length>0){if(t&&t.deserializeDates){a=JSON.parse(o,dateTimeDeserializer)}else{a=JSON.parse(o)}s.result=a}s.headers=e.message.headers}catch(e){}if(n>299){let e;if(a&&a.message){e=a.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=s.result;i(t)}else{r(s)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new URL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new URL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let i;if(e.port){i=Number(e.port)}else if(e.protocol==="http:"){i=80}else if(e.protocol==="https:"){i=443}const n=[e.hostname.toUpperCase()];if(typeof i==="number"){n.push(`${n[0]}:${i}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||n.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},1962:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const l=s(r(7147));const c=s(r(1017));o=l.promises,t.chmod=o.chmod,t.copyFile=o.copyFile,t.lstat=o.lstat,t.mkdir=o.mkdir,t.open=o.open,t.readdir=o.readdir,t.readlink=o.readlink,t.rename=o.rename,t.rm=o.rm,t.rmdir=o.rmdir,t.stat=o.stat,t.symlink=o.symlink,t.unlink=o.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=l.constants.O_RDONLY;function exists(e){return a(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return a(this,void 0,void 0,(function*(){const i=r?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return a(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=c.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const s of r){e=n+s;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const r=c.dirname(e);const i=c.basename(e).toUpperCase();for(const n of yield t.readdir(r)){if(i===n.toUpperCase()){e=c.join(r,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const o=r(9491);const l=s(r(1017));const c=s(r(1962));function cp(e,t,r={}){return a(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:s}=readCopyOptions(r);const a=(yield c.exists(t))?yield c.stat(t):null;if(a&&a.isFile()&&!i){return}const o=a&&a.isDirectory()&&s?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,o,0,i)}}else{if(l.relative(e,o)===""){throw new Error(`'${o}' and '${e}' are the same file`)}yield copyFile(e,o,i)}}))}t.cp=cp;function mv(e,t,r={}){return a(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return a(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield c.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return a(this,void 0,void 0,(function*(){o.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const r=yield c.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const i=[];for(const n of r){const r=yield c.tryGetExecutablePath(l.join(n,e),t);if(r){i.push(r)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:i}}function cpDirRecursive(e,t,r,i){return a(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield c.readdir(e);for(const s of n){const n=`${e}/${s}`;const a=`${t}/${s}`;const o=yield c.lstat(n);if(o.isDirectory()){yield cpDirRecursive(n,a,r,i)}else{yield copyFile(n,a,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,r){return a(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const r=yield c.readlink(e);yield c.symlink(r,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||r){yield c.copyFile(e,t)}}))}},2473:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const o=s(r(5911));const l=r(2186);const c=r(2037);const p=r(2081);const d=r(7147);function _findMatch(t,r,i,n){return a(this,void 0,void 0,(function*(){const s=c.platform();let a;let p;let d;for(const a of i){const i=a.version;l.debug(`check ${i} satisfies ${t}`);if(o.satisfies(i,t)&&(!r||a.stable===r)){d=a.files.find((t=>{l.debug(`${t.arch}===${n} && ${t.platform}===${s}`);let r=t.arch===n&&t.platform===s;if(r&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){r=true}else{r=o.satisfies(i,t.platform_version)}}return r}));if(d){l.debug(`matched ${a.version}`);p=a;break}}}if(p&&d){a=Object.assign({},p);a.files=[d]}return a}))}t._findMatch=_findMatch;function _getOsVersion(){const t=c.platform();let r="";if(t==="darwin"){r=p.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let r="";if(d.existsSync(e)){r=d.readFileSync(e).toString()}else if(d.existsSync(t)){r=d.readFileSync(t).toString()}return r}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const o=s(r(2186));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return a(this,void 0,void 0,(function*(){let r=1;while(rsetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const l=s(r(2186));const c=s(r(7436));const p=s(r(7147));const d=s(r(2473));const A=s(r(2037));const u=s(r(1017));const m=s(r(6255));const g=s(r(5911));const h=s(r(2781));const E=s(r(3837));const y=r(9491);const C=o(r(7468));const b=r(1514);const I=r(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const B=process.platform==="win32";const v=process.platform==="darwin";const Q="actions/tool-cache";function downloadTool(e,t,r,i){return a(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),C.default());yield c.mkdirP(u.dirname(t));l.debug(`Downloading ${e}`);l.debug(`Destination ${t}`);const n=3;const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const p=new I.RetryHelper(n,s,o);return yield p.execute((()=>a(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",r,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r,i){return a(this,void 0,void 0,(function*(){if(p.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new m.HttpClient(Q,[],{allowRetries:false});if(r){l.debug("set auth");if(i===undefined){i={}}i.authorization=r}const s=yield n.get(e,i);if(s.message.statusCode!==200){const t=new HTTPError(s.message.statusCode);l.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`);throw t}const a=E.promisify(h.pipeline);const o=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>s.message));const d=o();let A=false;try{yield a(d,p.createWriteStream(t));l.debug("download complete");A=true;return t}finally{if(!A){l.debug("download failed");try{yield c.rmRF(t)}catch(e){l.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,r){return a(this,void 0,void 0,(function*(){y.ok(B,"extract7z() not supported on current OS");y.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(r){try{const t=l.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const n={silent:true};yield b.exec(`"${r}"`,i,n)}finally{process.chdir(i)}}else{const r=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const a=`& '${r}' -Source '${n}' -Target '${s}'`;const o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",a];const l={silent:true};try{const e=yield c.which("powershell",true);yield b.exec(`"${e}"`,o,l)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);l.debug("Checking tar --version");let i="";yield b.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});l.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let s;if(r instanceof Array){s=r}else{s=[r]}if(l.isDebug()&&!r.includes("v")){s.push("-v")}let a=t;let o=e;if(B&&n){s.push("--force-local");a=t.replace(/\\/g,"/");o=e.replace(/\\/g,"/")}if(n){s.push("--warning=no-unknown-keyword");s.push("--overwrite")}s.push("-C",a,"-f",o);yield b.exec(`tar`,s);return t}))}t.extractTar=extractTar;function extractXar(e,t,r=[]){return a(this,void 0,void 0,(function*(){y.ok(v,"extractXar() not supported on current OS");y.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(r instanceof Array){i=r}else{i=[r]}i.push("-x","-C",t,"-f",e);if(l.isDebug()){i.push("-v")}const n=yield c.which("xar",true);yield b.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(B){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return a(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield c.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];l.debug(`Using pwsh at path: ${n}`);yield b.exec(`"${n}"`,t)}else{const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield c.which("powershell",true);l.debug(`Using powershell at path: ${n}`);yield b.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return a(this,void 0,void 0,(function*(){const r=yield c.which("unzip",true);const i=[e];if(!l.isDebug()){i.unshift("-q")}i.unshift("-o");yield b.exec(`"${r}"`,i,{cwd:t})}))}function cacheDir(e,t,r,i){return a(this,void 0,void 0,(function*(){r=g.clean(r)||r;i=i||A.arch();l.debug(`Caching tool ${t} ${r} ${i}`);l.debug(`source dir: ${e}`);if(!p.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of p.readdirSync(e)){const r=u.join(e,t);yield c.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,n){return a(this,void 0,void 0,(function*(){i=g.clean(i)||i;n=n||A.arch();l.debug(`Caching tool ${r} ${i} ${n}`);l.debug(`source file: ${e}`);if(!p.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const s=yield _createToolPath(r,i,n);const a=u.join(s,t);l.debug(`destination file ${a}`);yield c.cp(e,a);_completeToolPath(r,i,n);return s}))}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||A.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,r);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=g.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,r);l.debug(`checking cache: ${n}`);if(p.existsSync(n)&&p.existsSync(`${n}.complete`)){l.debug(`Found tool in cache ${e} ${t} ${r}`);i=n}else{l.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const r=[];t=t||A.arch();const i=u.join(_getCacheDirectory(),e);if(p.existsSync(i)){const e=p.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(p.existsSync(e)&&p.existsSync(`${e}.complete`)){r.push(n)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return a(this,void 0,void 0,(function*(){let n=[];const s=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const a=new m.HttpClient("tool-cache");const o={};if(r){l.debug("set auth");o.authorization=r}const c=yield a.getJson(s,o);if(!c.result){return n}let p="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){p=e.url;break}}o["accept"]="application/vnd.github.VERSION.raw";let d=yield(yield a.get(p,o)).readBody();if(d){d=d.replace(/^\uFEFF/,"");try{n=JSON.parse(d)}catch(e){l.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=A.arch()){return a(this,void 0,void 0,(function*(){const n=yield d._findMatch(e,t,r,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return a(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),C.default())}yield c.mkdirP(e);return e}))}function _createToolPath(e,t,r){return a(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,g.clean(t)||t,r||"");l.debug(`destination ${i}`);const n=`${i}.complete`;yield c.rmRF(i);yield c.rmRF(n);yield c.mkdirP(i);return i}))}function _completeToolPath(e,t,r){const i=u.join(_getCacheDirectory(),e,g.clean(t)||t,r||"");const n=`${i}.complete`;p.writeFileSync(n,"");l.debug("finished caching tool")}function isExplicitVersion(e){const t=g.clean(e)||"";l.debug(`isExplicit: ${t}`);const r=g.valid(t)!=null;l.debug(`explicit? ${r}`);return r}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let r="";l.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(g.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const s=g.satisfies(n,t);if(s){r=n;break}}if(r){l.debug(`matched: ${r}`)}else{l.debug("match not found")}return r}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";y.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";y.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},7701:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var i=r||0;var n=t;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}e.exports=bytesToUuid},9886:(e,t,r)=>{var i=r(6113);e.exports=function nodeRNG(){return i.randomBytes(16)}},7468:(e,t,r)=>{var i=r(9886);var n=r(7701);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var a=e.random||(e.rng||i)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(t){for(var o=0;o<16;++o){t[s+o]=a[o]}}return t||n(a)}e.exports=v4},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;r.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=r.get(this);i.push(t)}removeEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=r.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=r.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const r=setTimeout(abortSignal,e,t);if(typeof r.unref==="function"){r.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const r of t){if(!objectHasProperty(e,r)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(3415);var n=r(3837);var s=r(4351);var a=r(6189);var o=r(1333);var l=r(3233);var c=r(9645);var p=r(2037);var d=r(3685);var A=r(5687);var u=r(2557);var m=r(4294);var g=r(2781);var h=r(6279);var E=r(467);var y=r(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var C=_interopNamespace(a);var b=_interopNamespace(p);var I=_interopNamespace(d);var B=_interopNamespace(A);var v=_interopNamespace(m);var Q=_interopDefaultLegacy(h);var w=_interopDefaultLegacy(E);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let r=0;r{r=r.then(e)}));return r}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,r,i){if(!Array.isArray(e)){e=[e]}if(!r||!i){return{[t]:e}}const n={[t]:e};n[S]={[r]:i};return n}function applyMixins(e,t){const r=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{r.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,r){return!e||!t?e:e.split(t).join(r||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,r){const failValidation=(e,i)=>{throw new Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const r=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:s,InclusiveMinimum:a,MaxItems:o,MaxLength:l,MinItems:c,MinLength:p,MultipleOf:d,Pattern:A,UniqueItems:u}=e.constraints;if(i!=undefined&&r>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&r<=n){failValidation("ExclusiveMinimum",n)}if(s!=undefined&&r>s){failValidation("InclusiveMaximum",s)}if(a!=undefined&&ro){failValidation("MaxItems",o)}if(l!=undefined&&m.length>l){failValidation("MaxLength",l)}if(c!=undefined&&m.lengthr.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};let l={};const c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Sequence$/i)!==null){l=[]}if(e.isConstant){t=e.defaultValue}const{required:p,nullable:d}=e;if(p&&d&&t===undefined){throw new Error(`${r} cannot be undefined.`)}if(p&&!d&&t==undefined){throw new Error(`${r} cannot be null or undefined.`)}if(!p&&d===false&&t===null){throw new Error(`${r} cannot be null.`)}if(t==undefined){l=t}else{if(c.match(/^any$/i)!==null){l=t}else if(c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){l=serializeBasicTypes(c,r,t)}else if(c.match(/^Enum$/i)!==null){const i=e;l=serializeEnumType(r,i.type.allowedValues,t)}else if(c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){l=serializeDateTypes(c,t,r)}else if(c.match(/^ByteArray$/i)!==null){l=serializeByteArrayType(r,t)}else if(c.match(/^Base64Url$/i)!==null){l=serializeBase64UrlType(r,t)}else if(c.match(/^Sequence$/i)!==null){l=serializeSequenceType(this,e,t,r,Boolean(this.isXML),o)}else if(c.match(/^Dictionary$/i)!==null){l=serializeDictionaryType(this,e,t,r,Boolean(this.isXML),o)}else if(c.match(/^Composite$/i)!==null){l=serializeCompositeType(this,e,t,r,Boolean(this.isXML),o)}}return l}deserialize(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let l;const c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Composite$/i)!==null){l=deserializeCompositeType(this,e,t,r,o)}else{if(this.isXML){const e=o.xmlCharKey;const r=t;if(r[S]!=undefined&&r[e]!=undefined){t=r[e]}}if(c.match(/^Number$/i)!==null){l=parseFloat(t);if(isNaN(l)){l=t}}else if(c.match(/^Boolean$/i)!==null){if(t==="true"){l=true}else if(t==="false"){l=false}else{l=t}}else if(c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){l=t}else if(c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){l=new Date(t)}else if(c.match(/^UnixTime$/i)!==null){l=unixTimeToDate(t)}else if(c.match(/^ByteArray$/i)!==null){l=decodeString(t)}else if(c.match(/^Base64Url$/i)!==null){l=base64UrlToByteArray(t)}else if(c.match(/^Sequence$/i)!==null){l=deserializeSequenceType(this,e,t,r,o)}else if(c.match(/^Dictionary$/i)!==null){l=deserializeDictionaryType(this,e,t,r,o)}}if(e.isConstant){l=e.defaultValue}return l}}function trimEnd(e,t){let r=e.length;while(r-1>=0&&e[r-1]===t){--r}return e.substr(0,r)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let r="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){r+=e.substr(0,e.length-1)+"."}else{r+=e;t.push(r);r=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,r){if(r!==null&&r!==undefined){if(e.match(/^Number$/i)!==null){if(typeof r!=="number"){throw new Error(`${t} with value ${r} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof r.valueOf()!=="string"){throw new Error(`${t} with value "${r}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()==="string"&&isValidUuid(r))){throw new Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof r!=="boolean"){throw new Error(`${t} with value ${r} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof r;if(e!=="string"&&e!=="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob==="function"||typeof Blob==="object")&&r instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return r}function serializeEnumType(e,t,r){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===r.toLowerCase()}return e===r}));if(!i){throw new Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return r}function serializeByteArrayType(e,t){let r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}r=encodeByteArray(t)}return r}function serializeBase64UrlType(e,t){let r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}r=bufferToBase64Url(t)||""}return r}function serializeDateTypes(e,t,r){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,r,i,n,s){if(!Array.isArray(r)){throw new Error(`${i} must be of type Array.`)}const a=t.type.element;if(!a||typeof a!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const o=[];for(let t=0;te!==n));if(o){a[n]=e.serialize(l,r[n],i+'["'+n+'"]',s)}}}return a}return r}function getXmlObjectValue(e,t,r,i){if(!r||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const s={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[S]){return t}else{const e=Object.assign({},t);e[S]=s;return e}}const a={};a[i.xmlCharKey]=t;a[S]=s;return a}function isSpecialXmlProperty(e,t){return[S,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,r,i,n){var s,a;const o=(s=n.xmlCharKey)!==null&&s!==void 0?s:N;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,r,"serializedName")}const l=resolveModelProperties(e,t,i);let c={};const p=[];for(const s of Object.keys(l)){const d=l[s];const A=splitSerializeName(l[s].serializedName);p.push(A[0]);const{serializedName:u,xmlName:m,xmlElementName:g}=d;let h=i;if(u!==""&&u!==undefined){h=i+"."+u}const E=d.headerCollectionPrefix;if(E){const t={};for(const i of Object.keys(r)){if(i.startsWith(E)){t[i.substring(E.length)]=e.deserialize(d.type.value,r[i],h,n)}p.push(i)}c[s]=t}else if(e.isXML){if(d.xmlIsAttribute&&r[S]){c[s]=e.deserialize(d,r[S][m],h,n)}else if(d.xmlIsMsText){if(r[o]!==undefined){c[s]=r[o]}else if(typeof r==="string"){c[s]=r}}else{const t=g||m||u;if(d.xmlIsWrapped){const t=r[m];const i=(a=t===null||t===void 0?void 0:t[g])!==null&&a!==void 0?a:[];c[s]=e.deserialize(d,i,h,n);p.push(m)}else{const i=r[t];c[s]=e.deserialize(d,i,h,n);p.push(t)}}}else{let i;let a=r;for(const e of A){if(!a)break;a=a[e]}i=a;const o=t.type.polymorphicDiscriminator;if(o&&s===o.clientName&&i==undefined){i=t.serializedName}let p;if(Array.isArray(r[s])&&l[s].serializedName===""){i=r[s];const t=e.deserialize(d,i,h,n);for(const[e,r]of Object.entries(c)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=r}}c=t}else if(i!==undefined||d.defaultValue!==undefined){p=e.deserialize(d,i,h,n);c[s]=p}}}const d=t.type.additionalProperties;if(d){const isAdditionalProperty=e=>{for(const t in l){const r=splitSerializeName(l[t].serializedName);if(r[0]===e){return false}}return true};for(const t in r){if(isAdditionalProperty(t)){c[t]=e.deserialize(d,r[t],i+'["'+t+'"]',n)}}}else if(r){for(const e of Object.keys(r)){if(c[e]===undefined&&!p.includes(e)&&!isSpecialXmlProperty(e,n)){c[e]=r[e]}}}return c}function deserializeDictionaryType(e,t,r,i,n){const s=t.type.value;if(!s||typeof s!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(r){const t={};for(const a of Object.keys(r)){t[a]=e.deserialize(s,r[a],i,n)}return t}return r}function deserializeSequenceType(e,t,r,i,n){const s=t.type.element;if(!s||typeof s!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(r){if(!Array.isArray(r)){r=[r]}const t=[];for(let a=0;a0}keys(){return Object.keys(this._rawQuery)}set(e,t){const r=t;if(e){if(r!==undefined&&r!==null){const t=Array.isArray(r)?r:r.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const r=this._rawQuery[t];if(Array.isArray(r)){const i=[];for(const e of r){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${r}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let r="ParameterName";let i="";let n="";for(let s=0;sisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,r){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:r&&r.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const s=isUrlHttps(e);const a=isUrlHttps(t.host);const o={isHttps:s,agent:createTunnel(s,a,n)};return o}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,r){if(e&&t){return v.httpsOverHttps(r)}else if(e&&!t){return v.httpsOverHttp(r)}else if(!e&&t){return v.httpOverHttps(r)}else{return v.httpOverHttp(r)}}function isValidPort(e){return 0<=e&&e<=65535}const _="REDACTED";const k=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const O=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?k.concat(e):k;t=Array.isArray(t)?O.concat(t):O;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,r)=>{if(r instanceof Error){return Object.assign(Object.assign({},r),{name:r.name,message:r.message})}if(e==="_headersMap"){return this.sanitizeHeaders(r)}else if(e==="url"){return this.sanitizeUrl(r)}else if(e==="query"){return this.sanitizeQuery(r)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(r)||isObject(r)){if(t.has(r)){return"[Circular]"}t.add(r)}return r}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,r){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=r(e,n)}else{i[n]=_}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const r=t.getQuery();if(!r){return e}const i=URLQuery.parse(r);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,_)}}t.setQuery(i.toString());return t.toString()}}const P=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,r,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=r;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[P](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const M=l.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,r){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});r(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((r=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();r()}));e.once("end",r);e.once("error",r)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,r)=>{t.set(r,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={}}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const r=new u.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new u.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){r.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{r.abort()}),e.timeout)}if(e.formData){const t=e.formData;const r=new Q["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){r.append(e,t.value,t.options)}else{r.append(e,t)}};for(const e of Object.keys(t)){const r=t[e];if(Array.isArray(r)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{M.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const r=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:s,password:a}=e.proxySettings;const o=`${i}:${n}:${s}:${a}`;const l=(t=this.proxyAgentMap.get(o))!==null&&t!==void 0?t:{};let c=getCachedAgent(r,l);if(c){return c}const p=createProxyAgent(e.url,e.proxySettings,e.headers);c=p.agent;if(p.isHttps){l.httpsAgent=p.agent}else{l.httpAgent=p.agent}this.proxyAgentMap.set(o,l);return c}else if(e.keepAlive){let t=getCachedAgent(r,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(r){t=this.keepAliveAgents.httpsAgent=new B.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new I.Agent(i)}return t}else{return r?B.globalAgent:I.globalAgent}}async fetch(e,t){return w["default"](e,t)}async prepareRequest(e){const t={};t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:r}=e,i=s.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(r){n.tracingContext=r.tracingContext;n.spanOptions=r===null||r===void 0?void 0:r.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:S,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const q=Object.assign({},U);q.explicitArray=false;q.renderOpts={pretty:false};function stringifyXML(e,t={}){var r;q.rootName=t.rootName;q.charkey=(r=t.xmlCharKey)!==null&&r!==void 0?r:N;const i=new C.Builder(q);return i.buildObject(e)}function parseXML(e,t={}){var r;H.explicitRoot=!!t.includeRoot;H.charkey=(r=t.xmlCharKey)!==null&&r!==void 0?r:N;const i=new C.Parser(H);return new Promise(((t,r)=>{if(!e){r(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){r(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(r,i)=>new DeserializationPolicy(r,i,e,t)}}const G=["application/json","text/json"];const V=["application/xml","application/atom+xml"];const j={expectedContentTypes:{json:G,xml:V}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,r,i={}){var n;super(e,t);this.jsonContentTypes=r&&r.json||G;this.xmlContentTypes=r&&r.xml||V;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:N}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const r=e.request;const i=r.operationSpec;if(i){const n=r.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let r;if(t===undefined){r=true}else if(typeof t==="boolean"){r=t}else{r=t(e)}return r}function deserializeResponseBody(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};return parse(e,t,r,o).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:s,shouldReturnResponse:a}=handleErrorResponse(e,t,n);if(s){throw s}else if(a){return e}if(n){if(n.bodyMapper){let r=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===T.Sequence){r=typeof r==="object"?r[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,r,"operationRes.parsedBody",i)}catch(t){const r=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw r}}else if(t.httpMethod==="HEAD"){e.parsedBody=r.status>=200&&r.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,r){var i;const n=200<=e.status&&e.status<300;const s=isOperationSpecEmpty(t)?n:!!r;if(s){if(r){if(!r.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const a=r!==null&&r!==void 0?r:t.responses.default;const o=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const l=o?`Unexpected status code: ${e.status}`:e.bodyAsText;const c=new RestError(l,undefined,e.status,e.request,e);if(!a){throw c}const p=a.bodyMapper;const d=a.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let i;if(p){let e=r;if(t.isXML&&p.type.name===T.Sequence){e=typeof r==="object"?r[p.xmlElementName]:[]}i=t.serializer.deserialize(p,e,"error.response.parsedBody")}const n=r.error||i||r;c.code=n.code;if(n.message){c.message=n.message}if(p){c.response.parsedBody=i}}if(e.headers&&d){c.response.parsedHeaders=t.serializer.deserialize(d,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){c.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:c,shouldReturnResponse:false}}function parse(e,t,r,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${r.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,r.status,r.request,r);return Promise.reject(n)};const s=((n=r.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(r.status))||r.request.streamResponseBody;if(!s&&r.bodyAsText){const n=r.bodyAsText;const s=r.headers.get("Content-Type")||"";const a=!s?[]:s.split(";").map((e=>e.toLowerCase()));if(a.length===0||a.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{r.parsedBody=JSON.parse(n);e(r)})).catch(errorHandler)}else if(a.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{r.parsedBody=e;return r})).catch(errorHandler)}}return Promise.resolve(r)}const z={enable:true};function keepAlivePolicy(e){return{create:(t,r)=>new KeepAlivePolicy(t,r,e||z)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.keepAliveOptions=r}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const Y=["GET","HEAD"];const J={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,r)=>new RedirectPolicy(t,r,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,r=20){super(e,t);this.maxRetries=r}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,r){const{request:i,status:n}=t;const s=t.headers.get("location");if(s&&(n===300||n===301&&Y.includes(i.method)||n===302&&Y.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||rhandleRedirect(e,t,r+1)))}return Promise.resolve(t)}const W=3;const X=1e3*30;const $=1e3*90;const K=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,r,i,n){if(!t(i,n)){return false}return r.retryCountnew ExponentialRetryPolicy(i,n,e,t,r)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const Z={maxRetries:W,retryDelayInMs:X,maxRetryDelayInMs:$};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,r,i,n){super(e,t);this.retryCount=isNumber(r)?r:W;this.retryInterval=isNumber(i)?i:X;this.maxRetryInterval=isNumber(n)?n:$}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,r,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(r===null||r===void 0?void 0:r.headers.get(x.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const s=t.abortSignal&&t.abortSignal.aborted;if(!s&&shouldRetry(e.retryCount,shouldPolicyRetry,i,r)){M.info(`Retrying request in ${i.retryInterval}`);try{await o.delay(i.retryInterval);const r=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,r,i)}catch(n){return retry$1(e,t,r,i,n)}}else if(s||n||!r){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,r&&r.status,r&&r.request,r);throw e}else{return r}}function logPolicy(e={}){return{create:(t,r)=>new LogPolicy(t,r,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:r=M.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=r;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let r;if(typeof e==="string"){r=e}else if(Array.isArray(e)){r=e.join(".")}else{r=t.serializedName}return r}function getStreamResponseStatusCodes(e){const t=new Set;for(const r in e.responses){const i=e.responses[r];if(i.bodyMapper&&i.bodyMapper.type.name===T.Stream){t.add(Number(r))}}return t}function getDefaultUserAgentKey(){return x.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${b.arch()}-${b.type()}-${b.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:x.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",r="/"){return e.map((e=>{const t=e.value?`${r}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ee=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const r=getUserAgentString(e.concat(t));return r}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const r=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,r)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,r,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=r;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const te={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,r){async function tryGetAccessToken(){if(Date.now()e.getToken(t,r);i=beginRefresh(tryGetAccessToken,s.retryIntervalInMs,(o=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&o!==void 0?o:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(a.mustRefresh)return refresh(e);if(a.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const r=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await r({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(x.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,r)=>new GenerateClientRequestIdPolicy(t,r,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this._requestIdHeaderName=r}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let re;function getCachedDefaultHttpClient(){if(!re){re=new NodeFetchHttpClient}return re}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const ie=[];let ne=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(x.HTTPS_PROXY);const t=getEnvironmentValue(x.ALL_PROXY);const r=getEnvironmentValue(x.HTTP_PROXY);return e||t||r}function isBypassed(e,t,r){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(r===null||r===void 0?void 0:r.has(i)){return r.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}r===null||r===void 0?void 0:r.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(x.NO_PROXY);ne=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:r,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const s=n.getScheme()?n.getScheme()+"://":"";return{host:s+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:r}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!ne){ie.push(...loadNoProxy())}return{create:(r,i)=>new ProxyPolicy(r,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const r=e.indexOf("://");const i=r!==-1?r+3:0;const n=e.substring(i,t);const s=n.indexOf(":");const a=s!==-1;const o=a?n.substring(0,s):n;const l=a?n.substring(s+1):undefined;const c=e.substring(0,i)+e.substring(t+1);return{username:o,password:l,urlWithoutAuth:c}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,r,i){super(e,t);this.proxySettings=r;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:ie,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,r)=>new RPRegistrationPolicy(t,r,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,r=30){super(e,t);this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,r){if(r.status===409){const i=checkRPNotRegisteredError(r.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return r}))}}return Promise.resolve(r)}function getRequestEssentials(e,t=false){const r=e.clone();if(t){r.url=e.url}r.headers.set("x-ms-client-request-id",generateUuid());r.headers.set("Content-Type","application/json; charset=utf-8");return r}function checkRPNotRegisteredError(e){let t,r;if(e){try{r=JSON.parse(e)}catch(e){}if(r&&r.error&&r.error.message&&r.error.code&&r.error.code==="MissingSubscriptionRegistration"){const e=r.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const r=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(r&&r[0]){t=r[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,r,i){const n=`${t}providers/${r}/register?api-version=2016-02-01`;const s=`${t}providers/${r}?api-version=2016-02-01`;const a=getRequestEssentials(i);a.method="POST";a.url=n;const o=await e._nextPolicy.sendRequest(a);if(o.status!==200){throw new Error(`Autoregistration of ${r} failed. Please try registering manually.`)}return getRegistrationStatus(e,s,i)}async function getRegistrationStatus(e,t,r){const i=getRequestEssentials(r);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const s=n.parsedBody;if(n.parsedBody&&s.registrationState&&s.registrationState==="Registered"){return true}else{await o.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,r)}}function signingPolicy(e){return{create:(t,r)=>new SigningPolicy(t,r,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,r,i){return{create:(n,s)=>new SystemErrorRetryPolicy(n,s,e,t,r,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,r,i,n,s){super(e,t);this.retryCount=isNumber(r)?r:W;this.retryInterval=isNumber(i)?i:X;this.minRetryInterval=isNumber(n)?n:K;this.maxRetryInterval=isNumber(s)?s:$}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,r,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,r,i)){try{await o.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,r,i,n)}}else{if(i){return Promise.reject(n.error)}return r}}const ae=3;const oe=x.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const le="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.numberOfRetries=0;this._handleResponse=r||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==oe.TooManyRequests&&t.status!==oe.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var r;const i=t.headers.get(x.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await o.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:le});if((r=e.abortSignal)===null||r===void 0?void 0:r.aborted){throw new u.AbortError(le)}if(this.numberOfRetries{let r=undefined;const i=this;const n=t;return{create(t,s){const a=getCredentialScopes(n,i.baseUri);if(!a){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(r===undefined||r===null){r=bearerTokenAuthenticationPolicy(e,a)}return r.create(t,s)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){M.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}M.info("ServiceClient: using default request policies");r=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(r);if(e){r=e}}}this._requestPolicyFactories=r}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let r=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){r=this._requestPolicyFactories[e].create(r,this._requestPolicyOptions)}}return r.sendRequest(t)}async sendOperationRequest(e,r,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const s=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const a=new WebResource;let o;try{const i=r.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}a.method=r.httpMethod;a.operationSpec=r;const n=URLBuilder.parse(i);if(r.path){n.appendPath(r.path)}if(r.urlParameters&&r.urlParameters.length>0){for(const t of r.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,r.serializer);i=r.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),s);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(r.queryParameters&&r.queryParameters.length>0){for(const i of r.queryParameters){let a=getOperationArgumentValueFromParameter(this,e,i,r.serializer);if(a!==undefined&&a!==null){a=r.serializer.serialize(i.mapper,a,getPathStringFromParameter(i),s);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(a.length===0){continue}else{for(const e in a){const t=a[e];a[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){a=a.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(a)){for(const e in a){if(a[e]!==undefined&&a[e]!==null){a[e]=encodeURIComponent(a[e])}}}else{a=encodeURIComponent(a)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){a=a.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),a)}}}a.url=n.toString();const l=r.contentType||this.requestContentType;if(l&&r.requestBody){a.headers.set("Content-Type",l)}if(r.headerParameters){for(const t of r.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,r.serializer);if(i!==undefined&&i!==null){i=r.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),s);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){a.headers.set(e+t,i[t])}}else{a.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const c=e.options;if(c){if(c.customHeaders){for(const e in c.customHeaders){a.headers.set(e,c.customHeaders[e])}}if(c.abortSignal){a.abortSignal=c.abortSignal}if(c.timeout){a.timeout=c.timeout}if(c.onUploadProgress){a.onUploadProgress=c.onUploadProgress}if(c.onDownloadProgress){a.onDownloadProgress=c.onDownloadProgress}if(c.spanOptions){a.spanOptions=c.spanOptions}if(c.tracingContext){a.tracingContext=c.tracingContext}if(c.shouldDeserialize!==undefined&&c.shouldDeserialize!==null){a.shouldDeserialize=c.shouldDeserialize}}a.withCredentials=this._withCredentials;serializeRequestBody(this,a,e,r);if(a.streamResponseStatusCodes===undefined){a.streamResponseStatusCodes=getStreamResponseStatusCodes(r)}let p;let d;try{p=await this.sendRequest(a)}catch(e){d=e}if(d){if(d.response){d.details=flattenResponse(d.response,r.responses[d.statusCode]||r.responses["default"])}o=Promise.reject(d)}else{o=Promise.resolve(flattenResponse(p,r.responses[p.status]))}}catch(e){o=Promise.reject(e)}const l=i;if(l){o.then((e=>l(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>l(e)))}return o}}function serializeRequestBody(e,t,r,i){var n,s,a,o,l,c;const p=(s=(n=r.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&s!==void 0?s:{};const d={rootName:(a=p.rootName)!==null&&a!==void 0?a:"",includeRoot:(o=p.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(l=p.xmlCharKey)!==null&&l!==void 0?l:N};const A=p.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,r,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:s,xmlName:a,xmlElementName:o,serializedName:l,xmlNamespace:p,xmlNamespacePrefix:u}=n;const m=n.type.name;try{if(t.body!==undefined&&t.body!==null||s){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,d);const r=m===T.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(p,e,m,t.body,d);if(m===T.Sequence){t.body=stringifyXML(prepareXMLRootList(i,o||a||l,e,p),{rootName:a||l,xmlCharKey:A})}else if(!r){t.body=stringifyXML(i,{rootName:a||l,xmlCharKey:A})}}else if(m===T.String&&(((c=i.contentType)===null||c===void 0?void 0:c.match("text/plain"))||i.mediaType==="text")){return}else if(!r){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(l,undefined," ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const s=getOperationArgumentValueFromParameter(e,r,n,i.serializer);if(s!==undefined&&s!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,s,getPathStringFromParameter(n),d)}}}}function getXmlValueWithNamespace(e,t,r,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){const r={};r[n.xmlCharKey]=i;r[S]={[t]:e};return r}return i}function getValueOrFunctionResult(e,t){let r;if(typeof e==="string"){r=e}else{r=t();if(typeof e==="function"){r=e(r)}}return r}function createDefaultRequestPolicyFactories(e,t){const r=[];if(t.generateClientRequestIdHeader){r.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){r.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ee);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){r.push(userAgentPolicy({key:i,value:n}))}r.push(redirectPolicy());r.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){r.push(exponentialRetryPolicy());r.push(systemErrorRetryPolicy());r.push(throttlingRetryPolicy())}r.push(deserializationPolicy(t.deserializationContentTypes));if(o.isNode){r.push(proxyPolicy(t.proxySettings))}r.push(logPolicy({logger:M.info}));return r}function createPipelineFromOptions(e,t){const r=[];if(e.sendStreamingJson){r.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const r=getDefaultUserAgentValue();if(t.indexOf(r)===-1){t.push(r)}i=t.join(" ")}const n=Object.assign(Object.assign({},z),e.keepAliveOptions);const s=Object.assign(Object.assign({},Z),e.retryOptions);const a=Object.assign(Object.assign({},J),e.redirectOptions);if(o.isNode){r.push(proxyPolicy(e.proxyOptions))}const l=Object.assign(Object.assign({},j),e.deserializationOptions);const c=Object.assign({},e.loggingOptions);r.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(l.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(s.maxRetries,s.retryDelayInMs,s.maxRetryDelayInMs));if(a.handleRedirects){r.push(redirectPolicy(a.maxRetries))}if(t){r.push(t)}r.push(logPolicy(c));if(o.isNode&&e.decompressResponse===false){r.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:r}}function getOperationArgumentValueFromParameter(e,t,r,i){return getOperationArgumentValueFromParameterPath(e,t,r.parameterPath,r.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,r,i,n){var s;let a;if(typeof r==="string"){r=[r]}const o=(s=t.options)===null||s===void 0?void 0:s.serializerOptions;if(Array.isArray(r)){if(r.length>0){if(i.isConstant){a=i.defaultValue}else{let n=getPropertyFromParameterPath(t,r);if(!n.propertyFound){n=getPropertyFromParameterPath(e,r)}let s=false;if(!n.propertyFound){s=i.required||r[0]==="options"&&r.length===2}a=s?i.defaultValue:n.propertyValue}const s=getPathStringFromParameterPath(r,i);n.serialize(i,a,s,o)}}else{if(i.required){a={}}for(const s in r){const l=i.type.modelProperties[s];const c=r[s];const p=getOperationArgumentValueFromParameterPath(e,t,c,l,n);const d=getPathStringFromParameterPath(c,l);n.serialize(l,p,d,o);if(p!==undefined&&p!==null){if(!a){a={}}a[s]=p}}}return a}function getPropertyFromParameterPath(e,t){const r={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},r),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const s=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||s){const t=[...e.parsedBody||[]];for(const r of Object.keys(n)){if(n[r].serializedName){t[r]=e.parsedBody[r]}}if(r){for(const e of Object.keys(r)){t[e]=r[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},r),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},r),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},r),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){return e.credentialScopes}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return y.createSpanFunction(e)}const pe=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=pe){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,r=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=r;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const de=x.HeaderConstants;const Ae="Basic";class BasicAuthenticationCredentials{constructor(e,t,r=Ae){this.authorizationScheme=Ae;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=r}signRequest(e){const t=`${this.userName}:${this.password}`;const r=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(de.AUTHORIZATION,r);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return o.delay}});Object.defineProperty(t,"isNode",{enumerable:true,get:function(){return o.isNode}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return c.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=x;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=T;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=S;t.XML_CHARKEY=N;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,r)=>{var i=r(5443);var n=r(3837);var s=r(1017);var a=r(3685);var o=r(5687);var l=r(7310).parse;var c=r(7147);var p=r(2781).Stream;var d=r(3583);var A=r(4812);var u=r(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var s=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var a=this._multiPartHeader(e,t,r);var o=this._multiPartFooter();s(a);s(t);s(o);this._trackLength(a,t,r)};FormData.prototype._trackLength=function(e,t,r){var i=0;if(r.knownLength!=null){i+=+r.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof p)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(r){e.pause();t(null,+r.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var i=this._getContentDisposition(t,r);var n=this._getContentType(t,r);var s="";var a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof r.header=="object"){u(a,r.header)}var o;for(var l in a){if(!a.hasOwnProperty(l))continue;o=a[l];if(o==null){continue}if(!Array.isArray(o)){o=[o]}if(o.length){s+=l+": "+o.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+s+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var r,i;if(typeof t.filepath==="string"){r=s.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=s.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=s.basename(e.client._httpMessage.path||"")}if(r){i='filename="'+r+'"'}return i};FormData.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=d.lookup(e.name)}if(!r&&e.path){r=d.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=d.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=FormData.DEFAULT_CONTENT_TYPE}return r};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,i=this._streams.length;r{e.exports=function(e,t){Object.keys(t).forEach((function(r){e[r]=e[r]||t[r]}));return e}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var i=_interopRequireDefault(r(4757));var n=_interopRequireDefault(r(9982));var s=_interopRequireDefault(r(5393));var a=_interopRequireDefault(r(8788));var o=_interopRequireDefault(r(657));var l=_interopRequireDefault(r(7909));var c=_interopRequireDefault(r(4418));var p=_interopRequireDefault(r(4794));var d=_interopRequireDefault(r(7079));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},657:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},7079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},690:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},979:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let s=n.length;function rng(){if(s>n.length-16){i.default.randomFillSync(n);s=0}return n.slice(s,s+=16)}},6631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},4794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var s=stringify;t["default"]=s},4757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(979));var n=_interopRequireDefault(r(4794));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let s;let a;let o=0;let l=0;function v1(e,t,r){let c=t&&r||0;const p=t||new Array(16);e=e||{};let d=e.node||s;let A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){const t=e.random||(e.rng||i.default)();if(d==null){d=s=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(A==null){A=a=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:l+1;const g=u-o+(m-l)/1e4;if(g<0&&e.clockseq===undefined){A=A+1&16383}if((g<0||u>o)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=u;l=m;a=A;u+=122192928e5;const h=((u&268435455)*1e4+m)%4294967296;p[c++]=h>>>24&255;p[c++]=h>>>16&255;p[c++]=h>>>8&255;p[c++]=h&255;const E=u/4294967296*1e4&268435455;p[c++]=E>>>8&255;p[c++]=E&255;p[c++]=E>>>24&15|16;p[c++]=E>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(let e=0;e<6;++e){p[c+e]=d[e]}return t||(0,n.default)(p)}var c=v1;t["default"]=c},9982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4085));var n=_interopRequireDefault(r(4153));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v3",48,n.default);var a=s;t["default"]=a},4085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(r(4794));var n=_interopRequireDefault(r(7079));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(979));var n=_interopRequireDefault(r(4794));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const s=e.random||(e.rng||i.default)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=s[e]}return t}return(0,n.default)(s)}var s=v4;t["default"]=s},8788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4085));var n=_interopRequireDefault(r(6631));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v5",80,n.default);var a=s;t["default"]=a},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(690));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},7909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},7094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(3233);var n=r(2557);var s=r(1333);const a=i.createClientLogger("core-lro");const o=2e3;const l=["succeeded","canceled","failed"];function deserializeState(e){try{return JSON.parse(e).state}catch(t){throw new Error(`Unable to deserialize input state: ${e}`)}}function setStateError(e){const{state:t,stateProxy:r,isOperationError:i}=e;return e=>{if(i(e)){r.setError(t,e);r.setFailed(t)}throw e}}function appendReadableErrorMessage(e,t){let r=e;if(r.slice(-1)!=="."){r=r+"."}return r+" "+t}function simplifyError(e){let t=e.message;let r=e.code;let i=e;while(i.innererror){i=i.innererror;r=i.code;t=appendReadableErrorMessage(t,i.message)}return{code:r,message:t}}function processOperationStatus(e){const{state:t,stateProxy:r,status:i,isDone:n,processResult:s,getError:o,response:l,setErrorAsResult:c}=e;switch(i){case"succeeded":{r.setSucceeded(t);break}case"failed":{const e=o===null||o===void 0?void 0:o(l);let i="";if(e){const{code:t,message:r}=simplifyError(e);i=`. ${t}. ${r}`}const n=`The long-running operation has failed${i}`;r.setError(t,new Error(n));r.setFailed(t);a.warning(n);break}case"canceled":{r.setCanceled(t);break}}if((n===null||n===void 0?void 0:n(l,t))||n===undefined&&["succeeded","canceled"].concat(c?[]:["failed"]).includes(i)){r.setResult(t,buildResult({response:l,state:t,processResult:s}))}}function buildResult(e){const{processResult:t,response:r,state:i}=e;return t?t(r,i):r}async function initOperation(e){const{init:t,stateProxy:r,processResult:i,getOperationStatus:n,withOperationLocation:s,setErrorAsResult:o}=e;const{operationLocation:l,resourceLocation:c,metadata:p,response:d}=await t();if(l)s===null||s===void 0?void 0:s(l,false);const A={metadata:p,operationLocation:l,resourceLocation:c};a.verbose(`LRO: Operation description:`,A);const u=r.initState(A);const m=n({response:d,state:u,operationLocation:l});processOperationStatus({state:u,status:m,stateProxy:r,response:d,setErrorAsResult:o,processResult:i});return u}async function pollOperationHelper(e){const{poll:t,state:r,stateProxy:i,operationLocation:n,getOperationStatus:s,getResourceLocation:o,isOperationError:c,options:p}=e;const d=await t(n,p).catch(setStateError({state:r,stateProxy:i,isOperationError:c}));const A=s(d,r);a.verbose(`LRO: Status:\n\tPolling from: ${r.config.operationLocation}\n\tOperation status: ${A}\n\tPolling status: ${l.includes(A)?"Stopped":"Running"}`);if(A==="succeeded"){const e=o(d,r);if(e!==undefined){return{response:await t(e).catch(setStateError({state:r,stateProxy:i,isOperationError:c})),status:A}}}return{response:d,status:A}}async function pollOperation(e){const{poll:t,state:r,stateProxy:i,options:n,getOperationStatus:s,getResourceLocation:a,getOperationLocation:o,isOperationError:c,withOperationLocation:p,getPollingInterval:d,processResult:A,getError:u,updateState:m,setDelay:g,isDone:h,setErrorAsResult:E}=e;const{operationLocation:y}=r.config;if(y!==undefined){const{response:e,status:C}=await pollOperationHelper({poll:t,getOperationStatus:s,state:r,stateProxy:i,operationLocation:y,getResourceLocation:a,isOperationError:c,options:n});processOperationStatus({status:C,response:e,state:r,stateProxy:i,isDone:h,processResult:A,getError:u,setErrorAsResult:E});if(!l.includes(C)){const t=d===null||d===void 0?void 0:d(e);if(t)g(t);const i=o===null||o===void 0?void 0:o(e,r);if(i!==undefined){const e=y!==i;r.config.operationLocation=i;p===null||p===void 0?void 0:p(i,e)}else p===null||p===void 0?void 0:p(y,false)}m===null||m===void 0?void 0:m(r,e)}}function getOperationLocationPollingUrl(e){const{azureAsyncOperation:t,operationLocation:r}=e;return r!==null&&r!==void 0?r:t}function getLocationHeader(e){return e.headers["location"]}function getOperationLocationHeader(e){return e.headers["operation-location"]}function getAzureAsyncOperationHeader(e){return e.headers["azure-asyncoperation"]}function findResourceLocation(e){const{location:t,requestMethod:r,requestPath:i,resourceLocationConfig:n}=e;switch(r){case"PUT":{return i}case"DELETE":{return undefined}default:{switch(n){case"azure-async-operation":{return undefined}case"original-uri":{return i}case"location":default:{return t}}}}}function inferLroMode(e){const{rawResponse:t,requestMethod:r,requestPath:i,resourceLocationConfig:n}=e;const s=getOperationLocationHeader(t);const a=getAzureAsyncOperationHeader(t);const o=getOperationLocationPollingUrl({operationLocation:s,azureAsyncOperation:a});const l=getLocationHeader(t);const c=r===null||r===void 0?void 0:r.toLocaleUpperCase();if(o!==undefined){return{mode:"OperationLocation",operationLocation:o,resourceLocation:findResourceLocation({requestMethod:c,location:l,requestPath:i,resourceLocationConfig:n})}}else if(l!==undefined){return{mode:"ResourceLocation",operationLocation:l}}else if(c==="PUT"&&i){return{mode:"Body",operationLocation:i}}else{return undefined}}function transformStatus(e){const{status:t,statusCode:r}=e;if(typeof t!=="string"&&t!==undefined){throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${t}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`)}switch(t===null||t===void 0?void 0:t.toLocaleLowerCase()){case undefined:return toOperationStatus(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:{a.verbose(`LRO: unrecognized operation status: ${t}`);return t}}}function getStatus(e){var t;const{status:r}=(t=e.body)!==null&&t!==void 0?t:{};return transformStatus({status:r,statusCode:e.statusCode})}function getProvisioningState(e){var t,r;const{properties:i,provisioningState:n}=(t=e.body)!==null&&t!==void 0?t:{};const s=(r=i===null||i===void 0?void 0:i.provisioningState)!==null&&r!==void 0?r:n;return transformStatus({status:s,statusCode:e.statusCode})}function toOperationStatus(e){if(e===202){return"running"}else if(e<300){return"succeeded"}else{return"failed"}}function parseRetryAfter({rawResponse:e}){const t=e.headers["retry-after"];if(t!==undefined){const e=parseInt(t);return isNaN(e)?calculatePollingIntervalFromDate(new Date(t)):e*1e3}return undefined}function getErrorFromResponse(e){const t=e.flatResponse.error;if(!t){a.warning(`The long-running operation failed but there is no error property in the response's body`);return}if(!t.code||!t.message){a.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);return}return t}function calculatePollingIntervalFromDate(e){const t=Math.floor((new Date).getTime());const r=e.getTime();if(t{const e=await n.sendInitialRequest();const t=inferLroMode({rawResponse:e.rawResponse,requestPath:n.requestPath,requestMethod:n.requestMethod,resourceLocationConfig:r});return Object.assign({response:e,operationLocation:t===null||t===void 0?void 0:t.operationLocation,resourceLocation:t===null||t===void 0?void 0:t.resourceLocation},(t===null||t===void 0?void 0:t.mode)?{metadata:{mode:t.mode}}:{})},stateProxy:t,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e,getOperationStatus:getStatusFromInitialResponse,setErrorAsResult:s})}function getOperationLocation({rawResponse:e},t){var r;const i=(r=t.config.metadata)===null||r===void 0?void 0:r["mode"];switch(i){case"OperationLocation":{return getOperationLocationPollingUrl({operationLocation:getOperationLocationHeader(e),azureAsyncOperation:getAzureAsyncOperationHeader(e)})}case"ResourceLocation":{return getLocationHeader(e)}case"Body":default:{return undefined}}}function getOperationStatus({rawResponse:e},t){var r;const i=(r=t.config.metadata)===null||r===void 0?void 0:r["mode"];switch(i){case"OperationLocation":{return getStatus(e)}case"ResourceLocation":{return toOperationStatus(e.statusCode)}case"Body":{return getProvisioningState(e)}default:throw new Error(`Internal error: Unexpected operation mode: ${i}`)}}function getResourceLocation({flatResponse:e},t){if(typeof e==="object"){const r=e.resourceLocation;if(r!==undefined){t.config.resourceLocation=r}}return t.config.resourceLocation}function isOperationError(e){return e.name==="RestError"}async function pollHttpOperation(e){const{lro:t,stateProxy:r,options:i,processResult:n,updateState:s,setDelay:a,state:o,setErrorAsResult:l}=e;return pollOperation({state:o,stateProxy:r,setDelay:a,processResult:n?({flatResponse:e},t)=>n(e,t):({flatResponse:e})=>e,getError:getErrorFromResponse,updateState:s,getPollingInterval:parseRetryAfter,getOperationLocation:getOperationLocation,getOperationStatus:getOperationStatus,isOperationError:isOperationError,getResourceLocation:getResourceLocation,options:i,poll:async(e,r)=>t.sendPollRequest(e,r),setErrorAsResult:l})}const createStateProxy$1=()=>({initState:e=>({status:"running",config:e}),setCanceled:e=>e.status="canceled",setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.status="running",setSucceeded:e=>e.status="succeeded",setFailed:e=>e.status="failed",getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>e.status==="canceled",isFailed:e=>e.status==="failed",isRunning:e=>e.status==="running",isSucceeded:e=>e.status==="succeeded"});function buildCreatePoller(e){const{getOperationLocation:t,getStatusFromInitialResponse:r,getStatusFromPollResponse:i,isOperationError:a,getResourceLocation:l,getPollingInterval:c,getError:p,resolveOnUnsuccessful:d}=e;return async({init:e,poll:A},u)=>{const{processResult:m,updateState:g,withOperationLocation:h,intervalInMs:E=o,restoreFrom:y}=u||{};const C=createStateProxy$1();const b=h?(()=>{let e=false;return(t,r)=>{if(r)h(t);else if(!e)h(t);e=true}})():undefined;const I=y?deserializeState(y):await initOperation({init:e,stateProxy:C,processResult:m,getOperationStatus:r,withOperationLocation:b,setErrorAsResult:!d});let B;const v=new n.AbortController;const Q=new Map;const handleProgressEvents=async()=>Q.forEach((e=>e(I)));const w="Operation was canceled";let x=E;const S={getOperationState:()=>I,getResult:()=>I.result,isDone:()=>["succeeded","failed","canceled"].includes(I.status),isStopped:()=>B===undefined,stopPolling:()=>{v.abort()},toString:()=>JSON.stringify({state:I}),onProgress:e=>{const t=Symbol();Q.set(t,e);return()=>Q.delete(t)},pollUntilDone:e=>B!==null&&B!==void 0?B:B=(async()=>{const{abortSignal:t}=e||{};const{signal:r}=t?new n.AbortController([t,v.signal]):v;if(!S.isDone()){await S.poll({abortSignal:r});while(!S.isDone()){await s.delay(x,{abortSignal:r});await S.poll({abortSignal:r})}}if(d){return S.getResult()}else{switch(I.status){case"succeeded":return S.getResult();case"canceled":throw new Error(w);case"failed":throw I.error;case"notStarted":case"running":throw new Error(`Polling completed without succeeding or failing`)}}})().finally((()=>{B=undefined})),async poll(e){if(d){if(S.isDone())return}else{switch(I.status){case"succeeded":return;case"canceled":throw new Error(w);case"failed":throw I.error}}await pollOperation({poll:A,state:I,stateProxy:C,getOperationLocation:t,isOperationError:a,withOperationLocation:b,getPollingInterval:c,getOperationStatus:i,getResourceLocation:l,processResult:m,getError:p,updateState:g,options:e,setDelay:e=>{x=e},setErrorAsResult:!d});await handleProgressEvents();if(!d){switch(I.status){case"canceled":throw new Error(w);case"failed":throw I.error}}}};return S}}async function createHttpPoller(e,t){const{resourceLocationConfig:r,intervalInMs:i,processResult:n,restoreFrom:s,updateState:a,withOperationLocation:o,resolveOnUnsuccessful:l=false}=t||{};return buildCreatePoller({getStatusFromInitialResponse:getStatusFromInitialResponse,getStatusFromPollResponse:getOperationStatus,isOperationError:isOperationError,getOperationLocation:getOperationLocation,getResourceLocation:getResourceLocation,getPollingInterval:parseRetryAfter,getError:getErrorFromResponse,resolveOnUnsuccessful:l})({init:async()=>{const t=await e.sendInitialRequest();const i=inferLroMode({rawResponse:t.rawResponse,requestPath:e.requestPath,requestMethod:e.requestMethod,resourceLocationConfig:r});return Object.assign({response:t,operationLocation:i===null||i===void 0?void 0:i.operationLocation,resourceLocation:i===null||i===void 0?void 0:i.resourceLocation},(i===null||i===void 0?void 0:i.mode)?{metadata:{mode:i.mode}}:{})},poll:e.sendPollRequest},{intervalInMs:i,withOperationLocation:o,restoreFrom:s,updateState:a,processResult:n?({flatResponse:e},t)=>n(e,t):({flatResponse:e})=>e})}const createStateProxy=()=>({initState:e=>({config:e,isStarted:true}),setCanceled:e=>e.isCancelled=true,setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.isStarted=true,setSucceeded:e=>e.isCompleted=true,setFailed:()=>{},getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>!!e.isCancelled,isFailed:e=>!!e.error,isRunning:e=>!!e.isStarted,isSucceeded:e=>Boolean(e.isCompleted&&!e.isCancelled&&!e.error)});class GenericPollOperation{constructor(e,t,r,i,n,s,a){this.state=e;this.lro=t;this.setErrorAsResult=r;this.lroResourceLocationConfig=i;this.processResult=n;this.updateState=s;this.isDone=a}setPollerConfig(e){this.pollerConfig=e}async update(e){var t;const r=createStateProxy();if(!this.state.isStarted){this.state=Object.assign(Object.assign({},this.state),await initHttpOperation({lro:this.lro,stateProxy:r,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult}))}const i=this.updateState;const n=this.isDone;if(!this.state.isCompleted&&this.state.error===undefined){await pollHttpOperation({lro:this.lro,state:this.state,stateProxy:r,processResult:this.processResult,updateState:i?(e,{rawResponse:t})=>i(e,t):undefined,isDone:n?({flatResponse:e},t)=>n(e,t):undefined,options:e,setDelay:e=>{this.pollerConfig.intervalInMs=e},setErrorAsResult:this.setErrorAsResult})}(t=e===null||e===void 0?void 0:e.fireProgress)===null||t===void 0?void 0:t.call(e,this.state);return this}async cancel(){a.error("`cancelOperation` is deprecated because it wasn't implemented");return this}toString(){return JSON.stringify({state:this.state})}}class PollerStoppedError extends Error{constructor(e){super(e);this.name="PollerStoppedError";Object.setPrototypeOf(this,PollerStoppedError.prototype)}}class PollerCancelledError extends Error{constructor(e){super(e);this.name="PollerCancelledError";Object.setPrototypeOf(this,PollerCancelledError.prototype)}}class Poller{constructor(e){this.resolveOnUnsuccessful=false;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise(((e,t)=>{this.resolve=e;this.reject=t}));this.promise.catch((()=>{}))}async startPolling(e={}){if(this.stopped){this.stopped=false}while(!this.isStopped()&&!this.isDone()){await this.poll(e);await this.delay()}}async pollOnce(e={}){if(!this.isDone()){this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})}this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks){t(e)}}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const clearPollOncePromise=()=>{this.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error){this.stopped=true;if(!this.resolveOnUnsuccessful){this.reject(this.operation.state.error);throw this.operation.state.error}}if(this.operation.state.isCancelled){this.stopped=true;if(!this.resolveOnUnsuccessful){const e=new PollerCancelledError("Operation was canceled");this.reject(e);throw e}}if(this.isDone()&&this.resolve){this.resolve(this.getResult())}}async pollUntilDone(e={}){if(this.stopped){this.startPolling(e).catch(this.reject)}this.processUpdatedState();return this.promise}onProgress(e){this.pollProgressCallbacks.push(e);return()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new PollerStoppedError("This poller is already stopped"))}}}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){const e=this.operation.state;return e.result}toString(){return this.operation.toString()}}class LroEngine extends Poller{constructor(e,t){const{intervalInMs:r=o,resumeFrom:i,resolveOnUnsuccessful:n=false,isDone:s,lroResourceLocationConfig:a,processResult:l,updateState:c}=t||{};const p=i?deserializeState(i):{};const d=new GenericPollOperation(p,e,!n,a,l,c,s);super(d);this.resolveOnUnsuccessful=n;this.config={intervalInMs:r};d.setPollerConfig(this.config)}delay(){return new Promise((e=>setTimeout((()=>e()),this.config.intervalInMs)))}}t.LroEngine=LroEngine;t.Poller=Poller;t.PollerCancelledError=PollerCancelledError;t.PollerStoppedError=PollerStoppedError;t.createHttpPoller=createHttpPoller},4559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(4351);function getPagedAsyncIterator(e){var t;const r=getItemAsyncIterator(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:(t=e===null||e===void 0?void 0:e.byPage)!==null&&t!==void 0?t:t=>{const{continuationToken:r,maxPageSize:i}=t!==null&&t!==void 0?t:{};return getPageAsyncIterator(e,{pageLink:r,maxPageSize:i})}}}function getItemAsyncIterator(e){return i.__asyncGenerator(this,arguments,(function*getItemAsyncIterator_1(){var t,r,n,s;const a=getPageAsyncIterator(e);const o=yield i.__await(a.next());if(!Array.isArray(o.value)){const{toElements:n}=e;if(n){yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(n(o.value))));try{for(var l=i.__asyncValues(a),c;c=yield i.__await(l.next()),!c.done;){const e=c.value;yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(n(e))))}}catch(e){t={error:e}}finally{try{if(c&&!c.done&&(r=l.return))yield i.__await(r.call(l))}finally{if(t)throw t.error}}}else{yield yield i.__await(o.value);yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(a)))}}else{yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(o.value)));try{for(var p=i.__asyncValues(a),d;d=yield i.__await(p.next()),!d.done;){const e=d.value;yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(e)))}}catch(e){n={error:e}}finally{try{if(d&&!d.done&&(s=p.return))yield i.__await(s.call(p))}finally{if(n)throw n.error}}}}))}function getPageAsyncIterator(e,t={}){return i.__asyncGenerator(this,arguments,(function*getPageAsyncIterator_1(){const{pageLink:r,maxPageSize:n}=t;let s=yield i.__await(e.getPage(r!==null&&r!==void 0?r:e.firstPageLink,n));if(!s){return yield i.__await(void 0)}yield yield i.__await(s.page);while(s.nextPageLink){s=yield i.__await(e.getPage(s.nextPageLink,n));if(!s){return yield i.__await(void 0)}yield yield i.__await(s.page)}}))}t.getPagedAsyncIterator=getPagedAsyncIterator},4175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(5163);(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(t.SpanKind||(t.SpanKind={}));function getSpan(e){return i.trace.getSpan(e)}function setSpan(e,t){return i.trace.setSpan(e,t)}function setSpanContext(e,t){return i.trace.setSpanContext(e,t)}function getSpanContext(e){return i.trace.getSpanContext(e)}function isSpanContextValid(e){return i.trace.isSpanContextValid(e)}function getTracer(e,t){return i.trace.getTracer(e||"azure/core-tracing",t)}const n=i.context;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(t.SpanStatusCode||(t.SpanStatusCode={}));function isTracingDisabled(){var e;if(typeof process==="undefined"){return false}const t=(e=process.env.AZURE_TRACING_DISABLED)===null||e===void 0?void 0:e.toLowerCase();if(t==="false"||t==="0"){return false}return Boolean(t)}function createSpanFunction(e){return function(r,s){const a=getTracer();const o=(s===null||s===void 0?void 0:s.tracingOptions)||{};const l=Object.assign({kind:t.SpanKind.INTERNAL},o.spanOptions);const c=e.packagePrefix?`${e.packagePrefix}.${r}`:r;let p;if(isTracingDisabled()){p=i.trace.wrapSpanContext(i.INVALID_SPAN_CONTEXT)}else{p=a.startSpan(c,l,o.tracingContext)}if(e.namespace){p.setAttribute("az.namespace",e.namespace)}let d=o.spanOptions||{};if(p.isRecording()&&e.namespace){d=Object.assign(Object.assign({},o.spanOptions),{attributes:Object.assign(Object.assign({},l.attributes),{"az.namespace":e.namespace})})}const A=Object.assign(Object.assign({},o),{spanOptions:d,tracingContext:setSpan(o.tracingContext||n.active(),p)});const u=Object.assign(Object.assign({},s),{tracingOptions:A});return{span:p,updatedOptions:u}}}const s="00";function extractSpanContextFromTraceParentHeader(e){const t=e.split("-");if(t.length!==4){return}const[r,i,n,a]=t;if(r!==s){return}const o=parseInt(a,16);const l={spanId:n,traceId:i,traceFlags:o};return l}function getTraceParentHeader(e){const t=[];if(!e.traceId){t.push("traceId")}if(!e.spanId){t.push("spanId")}if(t.length){return}const r=e.traceFlags||0;const i=r.toString(16);const n=i.length===1?`0${i}`:i;return`${s}-${e.traceId}-${e.spanId}-${n}`}t.context=n;t.createSpanFunction=createSpanFunction;t.extractSpanContextFromTraceParentHeader=extractSpanContextFromTraceParentHeader;t.getSpan=getSpan;t.getSpanContext=getSpanContext;t.getTraceParentHeader=getTraceParentHeader;t.getTracer=getTracer;t.isSpanContextValid=isSpanContextValid;t.setSpan=setSpan;t.setSpanContext=setSpanContext},1333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2557);var n=r(6113);var s;const a=typeof process!=="undefined"&&Boolean(process.version)&&Boolean((s=process.versions)===null||s===void 0?void 0:s.node);function createAbortablePromise(e,t){const{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=t!==null&&t!==void 0?t:{};return new Promise(((t,a)=>{function rejectOnAbort(){a(new i.AbortError(s!==null&&s!==void 0?s:"The operation was aborted."))}function removeListeners(){n===null||n===void 0?void 0:n.removeEventListener("abort",onAbort)}function onAbort(){r===null||r===void 0?void 0:r();removeListeners();rejectOnAbort()}if(n===null||n===void 0?void 0:n.aborted){return rejectOnAbort()}try{e((e=>{removeListeners();t(e)}),(e=>{removeListeners();a(e)}))}catch(e){a(e)}n===null||n===void 0?void 0:n.addEventListener("abort",onAbort)}))}const o="The delay was aborted.";function delay(e,t){let r;const{abortSignal:i,abortErrorMsg:n}=t!==null&&t!==void 0?t:{};return createAbortablePromise((t=>{r=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:n!==null&&n!==void 0?n:o})}function getRandomIntegerInclusive(e,t){e=Math.ceil(e);t=Math.floor(t);const r=Math.floor(Math.random()*(t-e+1));return r+e}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function isError(e){if(isObject(e)){const t=typeof e.name==="string";const r=typeof e.message==="string";return t&&r}return false}function getErrorMessage(e){if(isError(e)){return e.message}else{let t;try{if(typeof e==="object"&&e){t=JSON.stringify(e)}else{t=String(e)}}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}async function computeSha256Hmac(e,t,r){const i=Buffer.from(e,"base64");return n.createHmac("sha256",i).update(t).digest(r)}async function computeSha256Hash(e,t){return n.createHash("sha256").update(e).digest(t)}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const r of t){if(!objectHasProperty(e,r)){return false}}return true}function objectHasProperty(e,t){return isDefined(e)&&typeof e==="object"&&t in e}function generateUUID(){let e="";for(let t=0;t<32;t++){const r=Math.floor(Math.random()*16);if(t===12){e+="4"}else if(t===16){e+=r&3|8}else{e+=r.toString(16)}if(t===7||t===11||t===15||t===19){e+="-"}}return e}var l;let c=typeof((l=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||l===void 0?void 0:l.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):n.randomUUID;if(!c){c=generateUUID}function randomUUID(){return c()}t.computeSha256Hash=computeSha256Hash;t.computeSha256Hmac=computeSha256Hmac;t.createAbortablePromise=createAbortablePromise;t.delay=delay;t.getErrorMessage=getErrorMessage;t.getRandomIntegerInclusive=getRandomIntegerInclusive;t.isDefined=isDefined;t.isError=isError;t.isNode=a;t.isObject=isObject;t.isObjectWithProperties=isObjectWithProperties;t.objectHasProperty=objectHasProperty;t.randomUUID=randomUUID},3233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2037);var n=r(3837);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=_interopDefaultLegacy(n);function log(e,...t){process.stderr.write(`${s["default"].format(e,...t)}${i.EOL}`)}const a=typeof process!=="undefined"&&process.env&&process.env.DEBUG||undefined;let o;let l=[];let c=[];const p=[];if(a){enable(a)}const d=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log});function enable(e){o=e;l=[];c=[];const t=/\*/g;const r=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of r){if(e.startsWith("-")){c.push(new RegExp(`^${e.substr(1)}$`))}else{l.push(new RegExp(`^${e}$`))}}for(const e of p){e.enabled=enabled(e.namespace)}}function enabled(e){if(e.endsWith("*")){return true}for(const t of c){if(t.test(e)){return false}}for(const t of l){if(t.test(e)){return true}}return false}function disable(){const e=o||"";enable("");return e}function createDebugger(e){const t=Object.assign(debug,{enabled:enabled(e),destroy:destroy,log:d.log,namespace:e,extend:extend});function debug(...r){if(!t.enabled){return}if(r.length>0){r[0]=`${e} ${r[0]}`}t.log(...r)}p.push(t);return t}function destroy(){const e=p.indexOf(this);if(e>=0){p.splice(e,1);return true}return false}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);t.log=this.log;return t}var A=d;const u=new Set;const m=typeof process!=="undefined"&&process.env&&process.env.AZURE_LOG_LEVEL||undefined;let g;const h=A("azure");h.log=(...e)=>{A.log(...e)};const E=["verbose","info","warning","error"];if(m){if(isAzureLogLevel(m)){setLogLevel(m)}else{console.error(`AZURE_LOG_LEVEL set to unknown log level '${m}'; logging is not enabled. Acceptable values: ${E.join(", ")}.`)}}function setLogLevel(e){if(e&&!isAzureLogLevel(e)){throw new Error(`Unknown log level '${e}'. Acceptable values: ${E.join(",")}`)}g=e;const t=[];for(const e of u){if(shouldEnable(e)){t.push(e.namespace)}}A.enable(t.join(","))}function getLogLevel(){return g}const y={verbose:400,info:300,warning:200,error:100};function createClientLogger(e){const t=h.extend(e);patchLogMethod(h,t);return{error:createLogger(t,"error"),warning:createLogger(t,"warning"),info:createLogger(t,"info"),verbose:createLogger(t,"verbose")}}function patchLogMethod(e,t){t.log=(...t)=>{e.log(...t)}}function createLogger(e,t){const r=Object.assign(e.extend(t),{level:t});patchLogMethod(e,r);if(shouldEnable(r)){const e=A.disable();A.enable(e+","+r.namespace)}u.add(r);return r}function shouldEnable(e){return Boolean(g&&y[e.level]<=y[g])}function isAzureLogLevel(e){return E.includes(e)}t.AzureLogger=h;t.createClientLogger=createClientLogger;t.getLogLevel=getLogLevel;t.setLogLevel=setLogLevel},4100:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(4607);var n=r(4351);var s=r(4175);var a=r(3233);var o=r(2557);var l=r(2037);var c=r(6113);var p=r(2781);r(4559);var d=r(7094);var A=r(2361);var u=r(7147);var m=r(3837);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var g=_interopNamespace(i);var h=_interopNamespace(l);var E=_interopNamespace(u);var y=_interopNamespace(m);const C={serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:true,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite"}}}}};const b={serializedName:"Logging",type:{name:"Composite",className:"Logging",modelProperties:{version:{serializedName:"Version",required:true,xmlName:"Version",type:{name:"String"}},deleteProperty:{serializedName:"Delete",required:true,xmlName:"Delete",type:{name:"Boolean"}},read:{serializedName:"Read",required:true,xmlName:"Read",type:{name:"Boolean"}},write:{serializedName:"Write",required:true,xmlName:"Write",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}};const I={serializedName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy",modelProperties:{enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},days:{constraints:{InclusiveMinimum:1},serializedName:"Days",xmlName:"Days",type:{name:"Number"}}}}};const B={serializedName:"Metrics",type:{name:"Composite",className:"Metrics",modelProperties:{version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},includeAPIs:{serializedName:"IncludeAPIs",xmlName:"IncludeAPIs",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}};const v={serializedName:"CorsRule",type:{name:"Composite",className:"CorsRule",modelProperties:{allowedOrigins:{serializedName:"AllowedOrigins",required:true,xmlName:"AllowedOrigins",type:{name:"String"}},allowedMethods:{serializedName:"AllowedMethods",required:true,xmlName:"AllowedMethods",type:{name:"String"}},allowedHeaders:{serializedName:"AllowedHeaders",required:true,xmlName:"AllowedHeaders",type:{name:"String"}},exposedHeaders:{serializedName:"ExposedHeaders",required:true,xmlName:"ExposedHeaders",type:{name:"String"}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:"MaxAgeInSeconds",required:true,xmlName:"MaxAgeInSeconds",type:{name:"Number"}}}}};const Q={serializedName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite",modelProperties:{enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},indexDocument:{serializedName:"IndexDocument",xmlName:"IndexDocument",type:{name:"String"}},errorDocument404Path:{serializedName:"ErrorDocument404Path",xmlName:"ErrorDocument404Path",type:{name:"String"}},defaultIndexDocumentPath:{serializedName:"DefaultIndexDocumentPath",xmlName:"DefaultIndexDocumentPath",type:{name:"String"}}}}};const w={serializedName:"StorageError",type:{name:"Composite",className:"StorageError",modelProperties:{message:{serializedName:"Message",xmlName:"Message",type:{name:"String"}},code:{serializedName:"Code",xmlName:"Code",type:{name:"String"}}}}};const x={serializedName:"BlobServiceStatistics",xmlName:"StorageServiceStats",type:{name:"Composite",className:"BlobServiceStatistics",modelProperties:{geoReplication:{serializedName:"GeoReplication",xmlName:"GeoReplication",type:{name:"Composite",className:"GeoReplication"}}}}};const S={serializedName:"GeoReplication",type:{name:"Composite",className:"GeoReplication",modelProperties:{status:{serializedName:"Status",required:true,xmlName:"Status",type:{name:"Enum",allowedValues:["live","bootstrap","unavailable"]}},lastSyncOn:{serializedName:"LastSyncTime",required:true,xmlName:"LastSyncTime",type:{name:"DateTimeRfc1123"}}}}};const N={serializedName:"ListContainersSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListContainersSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},containerItems:{serializedName:"ContainerItems",required:true,xmlName:"Containers",xmlIsWrapped:true,xmlElementName:"Container",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContainerItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const R={serializedName:"ContainerItem",xmlName:"Container",type:{name:"Composite",className:"ContainerItem",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},deleted:{serializedName:"Deleted",xmlName:"Deleted",type:{name:"Boolean"}},version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"ContainerProperties"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}};const D={serializedName:"ContainerProperties",type:{name:"Composite",className:"ContainerProperties",modelProperties:{lastModified:{serializedName:"Last-Modified",required:true,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:true,xmlName:"Etag",type:{name:"String"}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},publicAccess:{serializedName:"PublicAccess",xmlName:"PublicAccess",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"HasImmutabilityPolicy",xmlName:"HasImmutabilityPolicy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"HasLegalHold",xmlName:"HasLegalHold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"DefaultEncryptionScope",xmlName:"DefaultEncryptionScope",type:{name:"String"}},preventEncryptionScopeOverride:{serializedName:"DenyEncryptionScopeOverride",xmlName:"DenyEncryptionScopeOverride",type:{name:"Boolean"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},isImmutableStorageWithVersioningEnabled:{serializedName:"ImmutableStorageWithVersioningEnabled",xmlName:"ImmutableStorageWithVersioningEnabled",type:{name:"Boolean"}}}}};const T={serializedName:"KeyInfo",type:{name:"Composite",className:"KeyInfo",modelProperties:{startsOn:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",required:true,xmlName:"Expiry",type:{name:"String"}}}}};const _={serializedName:"UserDelegationKey",type:{name:"Composite",className:"UserDelegationKey",modelProperties:{signedObjectId:{serializedName:"SignedOid",required:true,xmlName:"SignedOid",type:{name:"String"}},signedTenantId:{serializedName:"SignedTid",required:true,xmlName:"SignedTid",type:{name:"String"}},signedStartsOn:{serializedName:"SignedStart",required:true,xmlName:"SignedStart",type:{name:"String"}},signedExpiresOn:{serializedName:"SignedExpiry",required:true,xmlName:"SignedExpiry",type:{name:"String"}},signedService:{serializedName:"SignedService",required:true,xmlName:"SignedService",type:{name:"String"}},signedVersion:{serializedName:"SignedVersion",required:true,xmlName:"SignedVersion",type:{name:"String"}},value:{serializedName:"Value",required:true,xmlName:"Value",type:{name:"String"}}}}};const k={serializedName:"FilterBlobSegment",xmlName:"EnumerationResults",type:{name:"Composite",className:"FilterBlobSegment",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},where:{serializedName:"Where",required:true,xmlName:"Where",type:{name:"String"}},blobs:{serializedName:"Blobs",required:true,xmlName:"Blobs",xmlIsWrapped:true,xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"FilterBlobItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const O={serializedName:"FilterBlobItem",xmlName:"Blob",type:{name:"Composite",className:"FilterBlobItem",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",type:{name:"String"}},tags:{serializedName:"Tags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}}}}};const P={serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags",modelProperties:{blobTagSet:{serializedName:"BlobTagSet",required:true,xmlName:"TagSet",xmlIsWrapped:true,xmlElementName:"Tag",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobTag"}}}}}}};const L={serializedName:"BlobTag",xmlName:"Tag",type:{name:"Composite",className:"BlobTag",modelProperties:{key:{serializedName:"Key",required:true,xmlName:"Key",type:{name:"String"}},value:{serializedName:"Value",required:true,xmlName:"Value",type:{name:"String"}}}}};const M={serializedName:"SignedIdentifier",xmlName:"SignedIdentifier",type:{name:"Composite",className:"SignedIdentifier",modelProperties:{id:{serializedName:"Id",required:true,xmlName:"Id",type:{name:"String"}},accessPolicy:{serializedName:"AccessPolicy",xmlName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy"}}}}};const U={serializedName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy",modelProperties:{startsOn:{serializedName:"Start",xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",xmlName:"Expiry",type:{name:"String"}},permissions:{serializedName:"Permission",xmlName:"Permission",type:{name:"String"}}}}};const H={serializedName:"ListBlobsFlatSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsFlatSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const q={serializedName:"BlobFlatListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment",modelProperties:{blobItems:{serializedName:"BlobItems",required:true,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}};const G={serializedName:"BlobItemInternal",xmlName:"Blob",type:{name:"Composite",className:"BlobItemInternal",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}},deleted:{serializedName:"Deleted",required:true,xmlName:"Deleted",type:{name:"Boolean"}},snapshot:{serializedName:"Snapshot",required:true,xmlName:"Snapshot",type:{name:"String"}},versionId:{serializedName:"VersionId",xmlName:"VersionId",type:{name:"String"}},isCurrentVersion:{serializedName:"IsCurrentVersion",xmlName:"IsCurrentVersion",type:{name:"Boolean"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},blobTags:{serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}},objectReplicationMetadata:{serializedName:"ObjectReplicationMetadata",xmlName:"OrMetadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},hasVersionsOnly:{serializedName:"HasVersionsOnly",xmlName:"HasVersionsOnly",type:{name:"Boolean"}}}}};const V={serializedName:"BlobName",type:{name:"Composite",className:"BlobName",modelProperties:{encoded:{serializedName:"Encoded",xmlName:"Encoded",xmlIsAttribute:true,type:{name:"Boolean"}},content:{serializedName:"content",xmlName:"content",xmlIsMsText:true,type:{name:"String"}}}}};const j={serializedName:"BlobPropertiesInternal",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal",modelProperties:{createdOn:{serializedName:"Creation-Time",xmlName:"Creation-Time",type:{name:"DateTimeRfc1123"}},lastModified:{serializedName:"Last-Modified",required:true,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:true,xmlName:"Etag",type:{name:"String"}},contentLength:{serializedName:"Content-Length",xmlName:"Content-Length",type:{name:"Number"}},contentType:{serializedName:"Content-Type",xmlName:"Content-Type",type:{name:"String"}},contentEncoding:{serializedName:"Content-Encoding",xmlName:"Content-Encoding",type:{name:"String"}},contentLanguage:{serializedName:"Content-Language",xmlName:"Content-Language",type:{name:"String"}},contentMD5:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}},contentDisposition:{serializedName:"Content-Disposition",xmlName:"Content-Disposition",type:{name:"String"}},cacheControl:{serializedName:"Cache-Control",xmlName:"Cache-Control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"BlobType",xmlName:"BlobType",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},copyId:{serializedName:"CopyId",xmlName:"CopyId",type:{name:"String"}},copyStatus:{serializedName:"CopyStatus",xmlName:"CopyStatus",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},copySource:{serializedName:"CopySource",xmlName:"CopySource",type:{name:"String"}},copyProgress:{serializedName:"CopyProgress",xmlName:"CopyProgress",type:{name:"String"}},copyCompletedOn:{serializedName:"CopyCompletionTime",xmlName:"CopyCompletionTime",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"CopyStatusDescription",xmlName:"CopyStatusDescription",type:{name:"String"}},serverEncrypted:{serializedName:"ServerEncrypted",xmlName:"ServerEncrypted",type:{name:"Boolean"}},incrementalCopy:{serializedName:"IncrementalCopy",xmlName:"IncrementalCopy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"DestinationSnapshot",xmlName:"DestinationSnapshot",type:{name:"String"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},accessTier:{serializedName:"AccessTier",xmlName:"AccessTier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}},accessTierInferred:{serializedName:"AccessTierInferred",xmlName:"AccessTierInferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"ArchiveStatus",xmlName:"ArchiveStatus",type:{name:"Enum",allowedValues:["rehydrate-pending-to-hot","rehydrate-pending-to-cool"]}},customerProvidedKeySha256:{serializedName:"CustomerProvidedKeySha256",xmlName:"CustomerProvidedKeySha256",type:{name:"String"}},encryptionScope:{serializedName:"EncryptionScope",xmlName:"EncryptionScope",type:{name:"String"}},accessTierChangedOn:{serializedName:"AccessTierChangeTime",xmlName:"AccessTierChangeTime",type:{name:"DateTimeRfc1123"}},tagCount:{serializedName:"TagCount",xmlName:"TagCount",type:{name:"Number"}},expiresOn:{serializedName:"Expiry-Time",xmlName:"Expiry-Time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"Sealed",xmlName:"Sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"RehydratePriority",xmlName:"RehydratePriority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessedOn:{serializedName:"LastAccessTime",xmlName:"LastAccessTime",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"ImmutabilityPolicyUntilDate",xmlName:"ImmutabilityPolicyUntilDate",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"ImmutabilityPolicyMode",xmlName:"ImmutabilityPolicyMode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"LegalHold",xmlName:"LegalHold",type:{name:"Boolean"}}}}};const z={serializedName:"ListBlobsHierarchySegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsHierarchySegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},delimiter:{serializedName:"Delimiter",xmlName:"Delimiter",type:{name:"String"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const Y={serializedName:"BlobHierarchyListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment",modelProperties:{blobPrefixes:{serializedName:"BlobPrefixes",xmlName:"BlobPrefixes",xmlElementName:"BlobPrefix",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobPrefix"}}}},blobItems:{serializedName:"BlobItems",required:true,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}};const J={serializedName:"BlobPrefix",type:{name:"Composite",className:"BlobPrefix",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}}}}};const W={serializedName:"BlockLookupList",xmlName:"BlockList",type:{name:"Composite",className:"BlockLookupList",modelProperties:{committed:{serializedName:"Committed",xmlName:"Committed",xmlElementName:"Committed",type:{name:"Sequence",element:{type:{name:"String"}}}},uncommitted:{serializedName:"Uncommitted",xmlName:"Uncommitted",xmlElementName:"Uncommitted",type:{name:"Sequence",element:{type:{name:"String"}}}},latest:{serializedName:"Latest",xmlName:"Latest",xmlElementName:"Latest",type:{name:"Sequence",element:{type:{name:"String"}}}}}}};const X={serializedName:"BlockList",type:{name:"Composite",className:"BlockList",modelProperties:{committedBlocks:{serializedName:"CommittedBlocks",xmlName:"CommittedBlocks",xmlIsWrapped:true,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}},uncommittedBlocks:{serializedName:"UncommittedBlocks",xmlName:"UncommittedBlocks",xmlIsWrapped:true,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}};const $={serializedName:"Block",type:{name:"Composite",className:"Block",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},size:{serializedName:"Size",required:true,xmlName:"Size",type:{name:"Number"}}}}};const K={serializedName:"PageList",type:{name:"Composite",className:"PageList",modelProperties:{pageRange:{serializedName:"PageRange",xmlName:"PageRange",xmlElementName:"PageRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"PageRange"}}}},clearRange:{serializedName:"ClearRange",xmlName:"ClearRange",xmlElementName:"ClearRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClearRange"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const Z={serializedName:"PageRange",xmlName:"PageRange",type:{name:"Composite",className:"PageRange",modelProperties:{start:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:true,xmlName:"End",type:{name:"Number"}}}}};const ee={serializedName:"ClearRange",xmlName:"ClearRange",type:{name:"Composite",className:"ClearRange",modelProperties:{start:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:true,xmlName:"End",type:{name:"Number"}}}}};const te={serializedName:"QueryRequest",xmlName:"QueryRequest",type:{name:"Composite",className:"QueryRequest",modelProperties:{queryType:{serializedName:"QueryType",required:true,xmlName:"QueryType",type:{name:"String"}},expression:{serializedName:"Expression",required:true,xmlName:"Expression",type:{name:"String"}},inputSerialization:{serializedName:"InputSerialization",xmlName:"InputSerialization",type:{name:"Composite",className:"QuerySerialization"}},outputSerialization:{serializedName:"OutputSerialization",xmlName:"OutputSerialization",type:{name:"Composite",className:"QuerySerialization"}}}}};const re={serializedName:"QuerySerialization",type:{name:"Composite",className:"QuerySerialization",modelProperties:{format:{serializedName:"Format",xmlName:"Format",type:{name:"Composite",className:"QueryFormat"}}}}};const ie={serializedName:"QueryFormat",type:{name:"Composite",className:"QueryFormat",modelProperties:{type:{serializedName:"Type",required:true,xmlName:"Type",type:{name:"Enum",allowedValues:["delimited","json","arrow","parquet"]}},delimitedTextConfiguration:{serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration"}},jsonTextConfiguration:{serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration"}},arrowConfiguration:{serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration"}},parquetTextConfiguration:{serializedName:"ParquetTextConfiguration",xmlName:"ParquetTextConfiguration",type:{name:"any"}}}}};const ne={serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration",modelProperties:{columnSeparator:{serializedName:"ColumnSeparator",xmlName:"ColumnSeparator",type:{name:"String"}},fieldQuote:{serializedName:"FieldQuote",xmlName:"FieldQuote",type:{name:"String"}},recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}},escapeChar:{serializedName:"EscapeChar",xmlName:"EscapeChar",type:{name:"String"}},headersPresent:{serializedName:"HeadersPresent",xmlName:"HasHeaders",type:{name:"Boolean"}}}}};const se={serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration",modelProperties:{recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}}}}};const ae={serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration",modelProperties:{schema:{serializedName:"Schema",required:true,xmlName:"Schema",xmlIsWrapped:true,xmlElementName:"Field",type:{name:"Sequence",element:{type:{name:"Composite",className:"ArrowField"}}}}}}};const oe={serializedName:"ArrowField",xmlName:"Field",type:{name:"Composite",className:"ArrowField",modelProperties:{type:{serializedName:"Type",required:true,xmlName:"Type",type:{name:"String"}},name:{serializedName:"Name",xmlName:"Name",type:{name:"String"}},precision:{serializedName:"Precision",xmlName:"Precision",type:{name:"Number"}},scale:{serializedName:"Scale",xmlName:"Scale",type:{name:"Number"}}}}};const le={serializedName:"Service_setPropertiesHeaders",type:{name:"Composite",className:"ServiceSetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ce={serializedName:"Service_setPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceSetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pe={serializedName:"Service_getPropertiesHeaders",type:{name:"Composite",className:"ServiceGetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const de={serializedName:"Service_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ae={serializedName:"Service_getStatisticsHeaders",type:{name:"Composite",className:"ServiceGetStatisticsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ue={serializedName:"Service_getStatisticsExceptionHeaders",type:{name:"Composite",className:"ServiceGetStatisticsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const me={serializedName:"Service_listContainersSegmentHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ge={serializedName:"Service_listContainersSegmentExceptionHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const he={serializedName:"Service_getUserDelegationKeyHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const fe={serializedName:"Service_getUserDelegationKeyExceptionHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ee={serializedName:"Service_getAccountInfoHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ye={serializedName:"Service_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ce={serializedName:"Service_submitBatchHeaders",type:{name:"Composite",className:"ServiceSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const be={serializedName:"Service_submitBatchExceptionHeaders",type:{name:"Composite",className:"ServiceSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ie={serializedName:"Service_filterBlobsHeaders",type:{name:"Composite",className:"ServiceFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Be={serializedName:"Service_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ServiceFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ve={serializedName:"Container_createHeaders",type:{name:"Composite",className:"ContainerCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qe={serializedName:"Container_createExceptionHeaders",type:{name:"Composite",className:"ContainerCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const we={serializedName:"Container_getPropertiesHeaders",type:{name:"Composite",className:"ContainerGetPropertiesHeaders",modelProperties:{metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"x-ms-has-immutability-policy",xmlName:"x-ms-has-immutability-policy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"x-ms-has-legal-hold",xmlName:"x-ms-has-legal-hold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}},denyEncryptionScopeOverride:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}},isImmutableStorageWithVersioningEnabled:{serializedName:"x-ms-immutable-storage-with-versioning-enabled",xmlName:"x-ms-immutable-storage-with-versioning-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xe={serializedName:"Container_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ContainerGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Se={serializedName:"Container_deleteHeaders",type:{name:"Composite",className:"ContainerDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ne={serializedName:"Container_deleteExceptionHeaders",type:{name:"Composite",className:"ContainerDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Re={serializedName:"Container_setMetadataHeaders",type:{name:"Composite",className:"ContainerSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const De={serializedName:"Container_setMetadataExceptionHeaders",type:{name:"Composite",className:"ContainerSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Te={serializedName:"Container_getAccessPolicyHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyHeaders",modelProperties:{blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _e={serializedName:"Container_getAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ke={serializedName:"Container_setAccessPolicyHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Oe={serializedName:"Container_setAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Pe={serializedName:"Container_restoreHeaders",type:{name:"Composite",className:"ContainerRestoreHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Le={serializedName:"Container_restoreExceptionHeaders",type:{name:"Composite",className:"ContainerRestoreExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Me={serializedName:"Container_renameHeaders",type:{name:"Composite",className:"ContainerRenameHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Fe={serializedName:"Container_renameExceptionHeaders",type:{name:"Composite",className:"ContainerRenameExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ue={serializedName:"Container_submitBatchHeaders",type:{name:"Composite",className:"ContainerSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}}}}};const He={serializedName:"Container_submitBatchExceptionHeaders",type:{name:"Composite",className:"ContainerSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const qe={serializedName:"Container_filterBlobsHeaders",type:{name:"Composite",className:"ContainerFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ge={serializedName:"Container_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ContainerFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ve={serializedName:"Container_acquireLeaseHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const je={serializedName:"Container_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ze={serializedName:"Container_releaseLeaseHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ye={serializedName:"Container_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Je={serializedName:"Container_renewLeaseHeaders",type:{name:"Composite",className:"ContainerRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const We={serializedName:"Container_renewLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Xe={serializedName:"Container_breakLeaseHeaders",type:{name:"Composite",className:"ContainerBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const $e={serializedName:"Container_breakLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ke={serializedName:"Container_changeLeaseHeaders",type:{name:"Composite",className:"ContainerChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ze={serializedName:"Container_changeLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const et={serializedName:"Container_listBlobFlatSegmentHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const tt={serializedName:"Container_listBlobFlatSegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const rt={serializedName:"Container_listBlobHierarchySegmentHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const it={serializedName:"Container_listBlobHierarchySegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const nt={serializedName:"Container_getAccountInfoHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}};const st={serializedName:"Container_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ot={serializedName:"Blob_downloadHeaders",type:{name:"Composite",className:"BlobDownloadHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}};const ct={serializedName:"Blob_downloadExceptionHeaders",type:{name:"Composite",className:"BlobDownloadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pt={serializedName:"Blob_getPropertiesHeaders",type:{name:"Composite",className:"BlobGetPropertiesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},isIncrementalCopy:{serializedName:"x-ms-incremental-copy",xmlName:"x-ms-incremental-copy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"x-ms-copy-destination-snapshot",xmlName:"x-ms-copy-destination-snapshot",type:{name:"String"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},accessTier:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"String"}},accessTierInferred:{serializedName:"x-ms-access-tier-inferred",xmlName:"x-ms-access-tier-inferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"x-ms-archive-status",xmlName:"x-ms-archive-status",type:{name:"String"}},accessTierChangedOn:{serializedName:"x-ms-access-tier-change-time",xmlName:"x-ms-access-tier-change-time",type:{name:"DateTimeRfc1123"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},expiresOn:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const dt={serializedName:"Blob_getPropertiesExceptionHeaders",type:{name:"Composite",className:"BlobGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const At={serializedName:"Blob_deleteHeaders",type:{name:"Composite",className:"BlobDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ut={serializedName:"Blob_deleteExceptionHeaders",type:{name:"Composite",className:"BlobDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const mt={serializedName:"Blob_undeleteHeaders",type:{name:"Composite",className:"BlobUndeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ht={serializedName:"Blob_undeleteExceptionHeaders",type:{name:"Composite",className:"BlobUndeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ft={serializedName:"Blob_setExpiryHeaders",type:{name:"Composite",className:"BlobSetExpiryHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Et={serializedName:"Blob_setExpiryExceptionHeaders",type:{name:"Composite",className:"BlobSetExpiryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const yt={serializedName:"Blob_setHttpHeadersHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ct={serializedName:"Blob_setHttpHeadersExceptionHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const bt={serializedName:"Blob_setImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiry:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}}}};const It={serializedName:"Blob_setImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Bt={serializedName:"Blob_deleteImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const vt={serializedName:"Blob_deleteImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qt={serializedName:"Blob_setLegalHoldHeaders",type:{name:"Composite",className:"BlobSetLegalHoldHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}}};const wt={serializedName:"Blob_setLegalHoldExceptionHeaders",type:{name:"Composite",className:"BlobSetLegalHoldExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xt={serializedName:"Blob_setMetadataHeaders",type:{name:"Composite",className:"BlobSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const St={serializedName:"Blob_setMetadataExceptionHeaders",type:{name:"Composite",className:"BlobSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Nt={serializedName:"Blob_acquireLeaseHeaders",type:{name:"Composite",className:"BlobAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Rt={serializedName:"Blob_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"BlobAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Dt={serializedName:"Blob_releaseLeaseHeaders",type:{name:"Composite",className:"BlobReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Tt={serializedName:"Blob_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"BlobReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _t={serializedName:"Blob_renewLeaseHeaders",type:{name:"Composite",className:"BlobRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const kt={serializedName:"Blob_renewLeaseExceptionHeaders",type:{name:"Composite",className:"BlobRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ot={serializedName:"Blob_changeLeaseHeaders",type:{name:"Composite",className:"BlobChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Pt={serializedName:"Blob_changeLeaseExceptionHeaders",type:{name:"Composite",className:"BlobChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Lt={serializedName:"Blob_breakLeaseHeaders",type:{name:"Composite",className:"BlobBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Mt={serializedName:"Blob_breakLeaseExceptionHeaders",type:{name:"Composite",className:"BlobBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ft={serializedName:"Blob_createSnapshotHeaders",type:{name:"Composite",className:"BlobCreateSnapshotHeaders",modelProperties:{snapshot:{serializedName:"x-ms-snapshot",xmlName:"x-ms-snapshot",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ut={serializedName:"Blob_createSnapshotExceptionHeaders",type:{name:"Composite",className:"BlobCreateSnapshotExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ht={serializedName:"Blob_startCopyFromURLHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const qt={serializedName:"Blob_startCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Gt={serializedName:"Blob_copyFromURLHeaders",type:{name:"Composite",className:"BlobCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{defaultValue:"success",isConstant:true,serializedName:"x-ms-copy-status",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Vt={serializedName:"Blob_copyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const jt={serializedName:"Blob_abortCopyFromURLHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const zt={serializedName:"Blob_abortCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Yt={serializedName:"Blob_setTierHeaders",type:{name:"Composite",className:"BlobSetTierHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Jt={serializedName:"Blob_setTierExceptionHeaders",type:{name:"Composite",className:"BlobSetTierExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Wt={serializedName:"Blob_getAccountInfoHeaders",type:{name:"Composite",className:"BlobGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}};const Xt={serializedName:"Blob_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"BlobGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const $t={serializedName:"Blob_queryHeaders",type:{name:"Composite",className:"BlobQueryHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletionTime:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}};const Kt={serializedName:"Blob_queryExceptionHeaders",type:{name:"Composite",className:"BlobQueryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Zt={serializedName:"Blob_getTagsHeaders",type:{name:"Composite",className:"BlobGetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const er={serializedName:"Blob_getTagsExceptionHeaders",type:{name:"Composite",className:"BlobGetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const tr={serializedName:"Blob_setTagsHeaders",type:{name:"Composite",className:"BlobSetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const rr={serializedName:"Blob_setTagsExceptionHeaders",type:{name:"Composite",className:"BlobSetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ir={serializedName:"PageBlob_createHeaders",type:{name:"Composite",className:"PageBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const nr={serializedName:"PageBlob_createExceptionHeaders",type:{name:"Composite",className:"PageBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const sr={serializedName:"PageBlob_uploadPagesHeaders",type:{name:"Composite",className:"PageBlobUploadPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ar={serializedName:"PageBlob_uploadPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const or={serializedName:"PageBlob_clearPagesHeaders",type:{name:"Composite",className:"PageBlobClearPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const lr={serializedName:"PageBlob_clearPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobClearPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const cr={serializedName:"PageBlob_uploadPagesFromURLHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pr={serializedName:"PageBlob_uploadPagesFromURLExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const dr={serializedName:"PageBlob_getPageRangesHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ar={serializedName:"PageBlob_getPageRangesExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ur={serializedName:"PageBlob_getPageRangesDiffHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const mr={serializedName:"PageBlob_getPageRangesDiffExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const gr={serializedName:"PageBlob_resizeHeaders",type:{name:"Composite",className:"PageBlobResizeHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const hr={serializedName:"PageBlob_resizeExceptionHeaders",type:{name:"Composite",className:"PageBlobResizeExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const fr={serializedName:"PageBlob_updateSequenceNumberHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Er={serializedName:"PageBlob_updateSequenceNumberExceptionHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const yr={serializedName:"PageBlob_copyIncrementalHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Cr={serializedName:"PageBlob_copyIncrementalExceptionHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const br={serializedName:"AppendBlob_createHeaders",type:{name:"Composite",className:"AppendBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ir={serializedName:"AppendBlob_createExceptionHeaders",type:{name:"Composite",className:"AppendBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Br={serializedName:"AppendBlob_appendBlockHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const vr={serializedName:"AppendBlob_appendBlockExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qr={serializedName:"AppendBlob_appendBlockFromUrlHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const wr={serializedName:"AppendBlob_appendBlockFromUrlExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xr={serializedName:"AppendBlob_sealHeaders",type:{name:"Composite",className:"AppendBlobSealHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}}}}};const Sr={serializedName:"AppendBlob_sealExceptionHeaders",type:{name:"Composite",className:"AppendBlobSealExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Nr={serializedName:"BlockBlob_uploadHeaders",type:{name:"Composite",className:"BlockBlobUploadHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Rr={serializedName:"BlockBlob_uploadExceptionHeaders",type:{name:"Composite",className:"BlockBlobUploadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Dr={serializedName:"BlockBlob_putBlobFromUrlHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Tr={serializedName:"BlockBlob_putBlobFromUrlExceptionHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _r={serializedName:"BlockBlob_stageBlockHeaders",type:{name:"Composite",className:"BlockBlobStageBlockHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const kr={serializedName:"BlockBlob_stageBlockExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Or={serializedName:"BlockBlob_stageBlockFromURLHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Pr={serializedName:"BlockBlob_stageBlockFromURLExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Lr={serializedName:"BlockBlob_commitBlockListHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Mr={serializedName:"BlockBlob_commitBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Fr={serializedName:"BlockBlob_getBlockListHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ur={serializedName:"BlockBlob_getBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};var Hr=Object.freeze({__proto__:null,BlobServiceProperties:C,Logging:b,RetentionPolicy:I,Metrics:B,CorsRule:v,StaticWebsite:Q,StorageError:w,BlobServiceStatistics:x,GeoReplication:S,ListContainersSegmentResponse:N,ContainerItem:R,ContainerProperties:D,KeyInfo:T,UserDelegationKey:_,FilterBlobSegment:k,FilterBlobItem:O,BlobTags:P,BlobTag:L,SignedIdentifier:M,AccessPolicy:U,ListBlobsFlatSegmentResponse:H,BlobFlatListSegment:q,BlobItemInternal:G,BlobName:V,BlobPropertiesInternal:j,ListBlobsHierarchySegmentResponse:z,BlobHierarchyListSegment:Y,BlobPrefix:J,BlockLookupList:W,BlockList:X,Block:$,PageList:K,PageRange:Z,ClearRange:ee,QueryRequest:te,QuerySerialization:re,QueryFormat:ie,DelimitedTextConfiguration:ne,JsonTextConfiguration:se,ArrowConfiguration:ae,ArrowField:oe,ServiceSetPropertiesHeaders:le,ServiceSetPropertiesExceptionHeaders:ce,ServiceGetPropertiesHeaders:pe,ServiceGetPropertiesExceptionHeaders:de,ServiceGetStatisticsHeaders:Ae,ServiceGetStatisticsExceptionHeaders:ue,ServiceListContainersSegmentHeaders:me,ServiceListContainersSegmentExceptionHeaders:ge,ServiceGetUserDelegationKeyHeaders:he,ServiceGetUserDelegationKeyExceptionHeaders:fe,ServiceGetAccountInfoHeaders:Ee,ServiceGetAccountInfoExceptionHeaders:ye,ServiceSubmitBatchHeaders:Ce,ServiceSubmitBatchExceptionHeaders:be,ServiceFilterBlobsHeaders:Ie,ServiceFilterBlobsExceptionHeaders:Be,ContainerCreateHeaders:ve,ContainerCreateExceptionHeaders:Qe,ContainerGetPropertiesHeaders:we,ContainerGetPropertiesExceptionHeaders:xe,ContainerDeleteHeaders:Se,ContainerDeleteExceptionHeaders:Ne,ContainerSetMetadataHeaders:Re,ContainerSetMetadataExceptionHeaders:De,ContainerGetAccessPolicyHeaders:Te,ContainerGetAccessPolicyExceptionHeaders:_e,ContainerSetAccessPolicyHeaders:ke,ContainerSetAccessPolicyExceptionHeaders:Oe,ContainerRestoreHeaders:Pe,ContainerRestoreExceptionHeaders:Le,ContainerRenameHeaders:Me,ContainerRenameExceptionHeaders:Fe,ContainerSubmitBatchHeaders:Ue,ContainerSubmitBatchExceptionHeaders:He,ContainerFilterBlobsHeaders:qe,ContainerFilterBlobsExceptionHeaders:Ge,ContainerAcquireLeaseHeaders:Ve,ContainerAcquireLeaseExceptionHeaders:je,ContainerReleaseLeaseHeaders:ze,ContainerReleaseLeaseExceptionHeaders:Ye,ContainerRenewLeaseHeaders:Je,ContainerRenewLeaseExceptionHeaders:We,ContainerBreakLeaseHeaders:Xe,ContainerBreakLeaseExceptionHeaders:$e,ContainerChangeLeaseHeaders:Ke,ContainerChangeLeaseExceptionHeaders:Ze,ContainerListBlobFlatSegmentHeaders:et,ContainerListBlobFlatSegmentExceptionHeaders:tt,ContainerListBlobHierarchySegmentHeaders:rt,ContainerListBlobHierarchySegmentExceptionHeaders:it,ContainerGetAccountInfoHeaders:nt,ContainerGetAccountInfoExceptionHeaders:st,BlobDownloadHeaders:ot,BlobDownloadExceptionHeaders:ct,BlobGetPropertiesHeaders:pt,BlobGetPropertiesExceptionHeaders:dt,BlobDeleteHeaders:At,BlobDeleteExceptionHeaders:ut,BlobUndeleteHeaders:mt,BlobUndeleteExceptionHeaders:ht,BlobSetExpiryHeaders:ft,BlobSetExpiryExceptionHeaders:Et,BlobSetHttpHeadersHeaders:yt,BlobSetHttpHeadersExceptionHeaders:Ct,BlobSetImmutabilityPolicyHeaders:bt,BlobSetImmutabilityPolicyExceptionHeaders:It,BlobDeleteImmutabilityPolicyHeaders:Bt,BlobDeleteImmutabilityPolicyExceptionHeaders:vt,BlobSetLegalHoldHeaders:Qt,BlobSetLegalHoldExceptionHeaders:wt,BlobSetMetadataHeaders:xt,BlobSetMetadataExceptionHeaders:St,BlobAcquireLeaseHeaders:Nt,BlobAcquireLeaseExceptionHeaders:Rt,BlobReleaseLeaseHeaders:Dt,BlobReleaseLeaseExceptionHeaders:Tt,BlobRenewLeaseHeaders:_t,BlobRenewLeaseExceptionHeaders:kt,BlobChangeLeaseHeaders:Ot,BlobChangeLeaseExceptionHeaders:Pt,BlobBreakLeaseHeaders:Lt,BlobBreakLeaseExceptionHeaders:Mt,BlobCreateSnapshotHeaders:Ft,BlobCreateSnapshotExceptionHeaders:Ut,BlobStartCopyFromURLHeaders:Ht,BlobStartCopyFromURLExceptionHeaders:qt,BlobCopyFromURLHeaders:Gt,BlobCopyFromURLExceptionHeaders:Vt,BlobAbortCopyFromURLHeaders:jt,BlobAbortCopyFromURLExceptionHeaders:zt,BlobSetTierHeaders:Yt,BlobSetTierExceptionHeaders:Jt,BlobGetAccountInfoHeaders:Wt,BlobGetAccountInfoExceptionHeaders:Xt,BlobQueryHeaders:$t,BlobQueryExceptionHeaders:Kt,BlobGetTagsHeaders:Zt,BlobGetTagsExceptionHeaders:er,BlobSetTagsHeaders:tr,BlobSetTagsExceptionHeaders:rr,PageBlobCreateHeaders:ir,PageBlobCreateExceptionHeaders:nr,PageBlobUploadPagesHeaders:sr,PageBlobUploadPagesExceptionHeaders:ar,PageBlobClearPagesHeaders:or,PageBlobClearPagesExceptionHeaders:lr,PageBlobUploadPagesFromURLHeaders:cr,PageBlobUploadPagesFromURLExceptionHeaders:pr,PageBlobGetPageRangesHeaders:dr,PageBlobGetPageRangesExceptionHeaders:Ar,PageBlobGetPageRangesDiffHeaders:ur,PageBlobGetPageRangesDiffExceptionHeaders:mr,PageBlobResizeHeaders:gr,PageBlobResizeExceptionHeaders:hr,PageBlobUpdateSequenceNumberHeaders:fr,PageBlobUpdateSequenceNumberExceptionHeaders:Er,PageBlobCopyIncrementalHeaders:yr,PageBlobCopyIncrementalExceptionHeaders:Cr,AppendBlobCreateHeaders:br,AppendBlobCreateExceptionHeaders:Ir,AppendBlobAppendBlockHeaders:Br,AppendBlobAppendBlockExceptionHeaders:vr,AppendBlobAppendBlockFromUrlHeaders:Qr,AppendBlobAppendBlockFromUrlExceptionHeaders:wr,AppendBlobSealHeaders:xr,AppendBlobSealExceptionHeaders:Sr,BlockBlobUploadHeaders:Nr,BlockBlobUploadExceptionHeaders:Rr,BlockBlobPutBlobFromUrlHeaders:Dr,BlockBlobPutBlobFromUrlExceptionHeaders:Tr,BlockBlobStageBlockHeaders:_r,BlockBlobStageBlockExceptionHeaders:kr,BlockBlobStageBlockFromURLHeaders:Or,BlockBlobStageBlockFromURLExceptionHeaders:Pr,BlockBlobCommitBlockListHeaders:Lr,BlockBlobCommitBlockListExceptionHeaders:Mr,BlockBlobGetBlockListHeaders:Fr,BlockBlobGetBlockListExceptionHeaders:Ur});const qr={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Content-Type",type:{name:"String"}}};const Gr={parameterPath:"blobServiceProperties",mapper:C};const Vr={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const jr={parameterPath:"url",mapper:{serializedName:"url",required:true,xmlName:"url",type:{name:"String"}},skipEncoding:true};const zr={parameterPath:"restype",mapper:{defaultValue:"service",isConstant:true,serializedName:"restype",type:{name:"String"}}};const Yr={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Jr={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}};const Wr={parameterPath:"version",mapper:{defaultValue:"2022-11-02",isConstant:true,serializedName:"x-ms-version",type:{name:"String"}}};const Xr={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}};const $r={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const Kr={parameterPath:"comp",mapper:{defaultValue:"stats",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Zr={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ei={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}};const ti={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}};const ri={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}};const ii={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListContainersIncludeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["metadata","deleted","system"]}}}},collectionFormat:i.QueryCollectionFormat.Csv};const ni={parameterPath:"keyInfo",mapper:T};const si={parameterPath:"comp",mapper:{defaultValue:"userdelegationkey",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ai={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:true,serializedName:"restype",type:{name:"String"}}};const oi={parameterPath:"body",mapper:{serializedName:"body",required:true,xmlName:"body",type:{name:"Stream"}}};const li={parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ci={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:true,xmlName:"Content-Length",type:{name:"Number"}}};const pi={parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:true,xmlName:"Content-Type",type:{name:"String"}}};const di={parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Ai={parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}};const ui={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:true,serializedName:"restype",type:{name:"String"}}};const mi={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"}};const gi={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}};const hi={parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}};const fi={parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}};const Ei={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}};const yi={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}};const Ci={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}};const bi={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Ii={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Bi={parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:true,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}};const vi={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Qi={parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}};const wi={parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}};const xi={parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Si={parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:true,xmlName:"x-ms-source-container-name",type:{name:"String"}}};const Ni={parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}};const Ri={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Di={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Ti={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}};const _i={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}};const ki={parameterPath:"action",mapper:{defaultValue:"release",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Oi={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:true,xmlName:"x-ms-lease-id",type:{name:"String"}}};const Pi={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Li={parameterPath:"action",mapper:{defaultValue:"break",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Mi={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}};const Fi={parameterPath:"action",mapper:{defaultValue:"change",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Ui={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:true,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}};const Hi={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListBlobsIncludeItem",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["copy","deleted","metadata","snapshots","uncommittedblobs","versions","tags","immutabilitypolicy","legalhold","deletedwithversions"]}}}},collectionFormat:i.QueryCollectionFormat.Csv};const qi={parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:true,xmlName:"delimiter",type:{name:"String"}}};const Gi={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}};const Vi={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}};const ji={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}};const zi={parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}};const Yi={parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}};const Ji={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}};const Wi={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}};const Xi={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}};const $i={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}};const Ki={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}};const Zi={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}};const en={parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapshots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}};const tn={parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}};const rn={parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:true,serializedName:"comp",type:{name:"String"}}};const nn={parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:true,xmlName:"x-ms-expiry-option",type:{name:"String"}}};const sn={parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}};const an={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}};const on={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}};const ln={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}};const cn={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}};const pn={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}};const dn={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}};const An={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:true,serializedName:"comp",type:{name:"String"}}};const un={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}};const mn={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}};const gn={parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:true,serializedName:"comp",type:{name:"String"}}};const hn={parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:true,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}};const fn={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}};const En={parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:true,serializedName:"comp",type:{name:"String"}}};const yn={parameterPath:["options","tier"],mapper:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}};const Cn={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}};const bn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}};const In={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}};const Bn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}};const vn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}};const Qn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}};const wn={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:true,xmlName:"x-ms-copy-source",type:{name:"String"}}};const xn={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}};const Sn={parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}};const Nn={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}};const Rn={parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:true,serializedName:"x-ms-requires-sync",type:{name:"String"}}};const Dn={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}};const Tn={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}};const _n={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}};const kn={parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:true,serializedName:"comp",type:{name:"String"}}};const On={parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:true,serializedName:"x-ms-copy-action",type:{name:"String"}}};const Pn={parameterPath:"copyId",mapper:{serializedName:"copyid",required:true,xmlName:"copyid",type:{name:"String"}}};const Ln={parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Mn={parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:true,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}};const Fn={parameterPath:["options","queryRequest"],mapper:te};const Un={parameterPath:"comp",mapper:{defaultValue:"query",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Hn={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:true,serializedName:"comp",type:{name:"String"}}};const qn={parameterPath:["options","tags"],mapper:P};const Gn={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}};const Vn={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}};const jn={parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const zn={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:true,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}};const Yn={parameterPath:["options","blobSequenceNumber"],mapper:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}};const Jn={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:true,serializedName:"Content-Type",type:{name:"String"}}};const Wn={parameterPath:"body",mapper:{serializedName:"body",required:true,xmlName:"body",type:{name:"Stream"}}};const Xn={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const $n={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Kn={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:true,serializedName:"x-ms-page-write",type:{name:"String"}}};const Zn={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}};const es={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}};const ts={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}};const rs={parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:true,serializedName:"x-ms-page-write",type:{name:"String"}}};const is={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:true,xmlName:"x-ms-copy-source",type:{name:"String"}}};const ns={parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:true,xmlName:"x-ms-source-range",type:{name:"String"}}};const ss={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}};const as={parameterPath:"range",mapper:{serializedName:"x-ms-range",required:true,xmlName:"x-ms-range",type:{name:"String"}}};const os={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ls={parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}};const cs={parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}};const ps={parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:true,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}};const ds={parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:true,serializedName:"comp",type:{name:"String"}}};const As={parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const us={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ms={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}};const gs={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}};const hs={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}};const fs={parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Es={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const ys={parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}};const Cs={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:true,serializedName:"comp",type:{name:"String"}}};const bs={parameterPath:"blockId",mapper:{serializedName:"blockid",required:true,xmlName:"blockid",type:{name:"String"}}};const Is={parameterPath:"blocks",mapper:W};const Bs={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:true,serializedName:"comp",type:{name:"String"}}};const vs={parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:true,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}};class Service{constructor(e){this.client=e}setProperties(e,t){const r={blobServiceProperties:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ws)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,xs)}getStatistics(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ss)}listContainersSegment(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ns)}getUserDelegationKey(e,t){const r={keyInfo:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Rs)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ds)}submitBatch(e,t,r,i){const n={contentLength:e,multipartContentType:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,Ts)}filterBlobs(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,_s)}}const Qs=new g.Serializer(Hr,true);const ws={path:"/",httpMethod:"PUT",responses:{202:{headersMapper:le},default:{bodyMapper:w,headersMapper:ce}},requestBody:Gr,queryParameters:[zr,Yr,Jr],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const xs={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:C,headersMapper:pe},default:{bodyMapper:w,headersMapper:de}},queryParameters:[zr,Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Ss={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:x,headersMapper:Ae},default:{bodyMapper:w,headersMapper:ue}},queryParameters:[zr,Jr,Kr],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Ns={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:N,headersMapper:me},default:{bodyMapper:w,headersMapper:ge}},queryParameters:[Jr,Zr,ei,ti,ri,ii],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Rs={path:"/",httpMethod:"POST",responses:{200:{bodyMapper:_,headersMapper:he},default:{bodyMapper:w,headersMapper:fe}},requestBody:ni,queryParameters:[zr,Jr,si],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const Ds={path:"/",httpMethod:"GET",responses:{200:{headersMapper:Ee},default:{bodyMapper:w,headersMapper:ye}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:Qs};const Ts={path:"/",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Ce},default:{bodyMapper:w,headersMapper:be}},requestBody:oi,queryParameters:[Jr,li],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,ci,pi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const _s={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:k,headersMapper:Ie},default:{bodyMapper:w,headersMapper:Be}},queryParameters:[Jr,ti,ri,di,Ai],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};class Container{constructor(e){this.client=e}create(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Os)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ps)}delete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ls)}setMetadata(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ms)}getAccessPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Fs)}setAccessPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Us)}restore(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Hs)}rename(e,t){const r={sourceContainerName:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,qs)}submitBatch(e,t,r,i){const n={contentLength:e,multipartContentType:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,Gs)}filterBlobs(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Vs)}acquireLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,js)}releaseLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,zs)}renewLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ys)}breakLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Js)}changeLease(e,t,r){const i={leaseId:e,proposedLeaseId:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ws)}listBlobFlatSegment(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Xs)}listBlobHierarchySegment(e,t){const r={delimiter:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,$s)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ks)}}const ks=new g.Serializer(Hr,true);const Os={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ve},default:{bodyMapper:w,headersMapper:Qe}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,gi,hi,fi],isXML:true,serializer:ks};const Ps={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:we},default:{bodyMapper:w,headersMapper:xe}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei],isXML:true,serializer:ks};const Ls={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:Se},default:{bodyMapper:w,headersMapper:Ne}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci],isXML:true,serializer:ks};const Ms={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Re},default:{bodyMapper:w,headersMapper:De}},queryParameters:[Jr,ui,bi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi],isXML:true,serializer:ks};const Fs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:true,xmlElementName:"SignedIdentifier"},headersMapper:Te},default:{bodyMapper:w,headersMapper:_e}},queryParameters:[Jr,ui,Ii],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei],isXML:true,serializer:ks};const Us={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ke},default:{bodyMapper:w,headersMapper:Oe}},requestBody:Bi,queryParameters:[Jr,ui,Ii],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,gi,Ei,yi,Ci],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:ks};const Hs={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:Pe},default:{bodyMapper:w,headersMapper:Le}},queryParameters:[Jr,ui,vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Qi,wi],isXML:true,serializer:ks};const qs={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Me},default:{bodyMapper:w,headersMapper:Fe}},queryParameters:[Jr,ui,xi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Si,Ni],isXML:true,serializer:ks};const Gs={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Ue},default:{bodyMapper:w,headersMapper:He}},requestBody:oi,queryParameters:[Jr,li,ui],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,ci,pi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:ks};const Vs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:k,headersMapper:qe},default:{bodyMapper:w,headersMapper:Ge}},queryParameters:[Jr,ti,ri,di,Ai,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const js={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:Ve},default:{bodyMapper:w,headersMapper:je}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Di,Ti,_i],isXML:true,serializer:ks};const zs={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ze},default:{bodyMapper:w,headersMapper:Ye}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,ki,Oi],isXML:true,serializer:ks};const Ys={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Je},default:{bodyMapper:w,headersMapper:We}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Pi],isXML:true,serializer:ks};const Js={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:Xe},default:{bodyMapper:w,headersMapper:$e}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Li,Mi],isXML:true,serializer:ks};const Ws={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Ke},default:{bodyMapper:w,headersMapper:Ze}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Fi,Ui],isXML:true,serializer:ks};const Xs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:H,headersMapper:et},default:{bodyMapper:w,headersMapper:tt}},queryParameters:[Jr,Zr,ei,ti,ri,ui,Hi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const $s={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:z,headersMapper:rt},default:{bodyMapper:w,headersMapper:it}},queryParameters:[Jr,Zr,ei,ti,ri,ui,Hi,qi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const Ks={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:nt},default:{bodyMapper:w,headersMapper:st}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:ks};class Blob$1{constructor(e){this.client=e}download(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ea)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ta)}delete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ra)}undelete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ia)}setExpiry(e,t){const r={expiryOptions:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,na)}setHttpHeaders(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,sa)}setImmutabilityPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,aa)}deleteImmutabilityPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,oa)}setLegalHold(e,t){const r={legalHold:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,la)}setMetadata(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ca)}acquireLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,pa)}releaseLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,da)}renewLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Aa)}changeLease(e,t,r){const i={leaseId:e,proposedLeaseId:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,ua)}breakLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ma)}createSnapshot(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ga)}startCopyFromURL(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ha)}copyFromURL(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,fa)}abortCopyFromURL(e,t){const r={copyId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ea)}setTier(e,t){const r={tier:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ya)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ca)}query(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ba)}getTags(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ia)}setTags(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ba)}}const Zs=new g.Serializer(Hr,true);const ea={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ot},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ot},default:{bodyMapper:w,headersMapper:ct}},queryParameters:[Jr,Gi,Vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,zi,Yi,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,serializer:Zs};const ta={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:pt},default:{bodyMapper:w,headersMapper:dt}},queryParameters:[Jr,Gi,Vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,serializer:Zs};const ra={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:At},default:{bodyMapper:w,headersMapper:ut}},queryParameters:[Jr,Gi,Vi,tn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,en],isXML:true,serializer:Zs};const ia={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:mt},default:{bodyMapper:w,headersMapper:ht}},queryParameters:[Jr,vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Zs};const na={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ft},default:{bodyMapper:w,headersMapper:Et}},queryParameters:[Jr,rn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,nn,sn],isXML:true,serializer:Zs};const sa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:yt},default:{bodyMapper:w,headersMapper:Ct}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,an,on,ln,cn,pn,dn],isXML:true,serializer:Zs};const aa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:bt},default:{bodyMapper:w,headersMapper:It}},queryParameters:[Jr,An],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ci,un,mn],isXML:true,serializer:Zs};const oa={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:Bt},default:{bodyMapper:w,headersMapper:vt}},queryParameters:[Jr,An],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Zs};const la={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Qt},default:{bodyMapper:w,headersMapper:wt}},queryParameters:[Jr,gn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,hn],isXML:true,serializer:Zs};const ca={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:xt},default:{bodyMapper:w,headersMapper:St}},queryParameters:[Jr,bi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn],isXML:true,serializer:Zs};const pa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Nt},default:{bodyMapper:w,headersMapper:Rt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Di,Ti,_i,$i,Ki,Zi],isXML:true,serializer:Zs};const da={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Dt},default:{bodyMapper:w,headersMapper:Tt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,ki,Oi,$i,Ki,Zi],isXML:true,serializer:Zs};const Aa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:_t},default:{bodyMapper:w,headersMapper:kt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Pi,$i,Ki,Zi],isXML:true,serializer:Zs};const ua={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Ot},default:{bodyMapper:w,headersMapper:Pt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Fi,Ui,$i,Ki,Zi],isXML:true,serializer:Zs};const ma={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Lt},default:{bodyMapper:w,headersMapper:Mt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Li,Mi,$i,Ki,Zi],isXML:true,serializer:Zs};const ga={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Ft},default:{bodyMapper:w,headersMapper:Ut}},queryParameters:[Jr,En],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn],isXML:true,serializer:Zs};const ha={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Ht},default:{bodyMapper:w,headersMapper:qt}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,$i,Ki,Zi,un,mn,yn,Cn,bn,In,Bn,vn,Qn,wn,xn,Sn,Nn],isXML:true,serializer:Zs};const fa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Gt},default:{bodyMapper:w,headersMapper:Vt}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,$i,Ki,Zi,un,mn,fn,yn,bn,In,Bn,vn,wn,xn,Nn,Rn,Dn,Tn,_n],isXML:true,serializer:Zs};const Ea={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:jt},default:{bodyMapper:w,headersMapper:zt}},queryParameters:[Jr,kn,Pn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,On],isXML:true,serializer:Zs};const ya={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Yt},202:{headersMapper:Yt},default:{bodyMapper:w,headersMapper:Jt}},queryParameters:[Jr,Gi,Vi,Ln],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi,Cn,Mn],isXML:true,serializer:Zs};const Ca={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:Wt},default:{bodyMapper:w,headersMapper:Xt}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:Zs};const ba={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:$t},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:$t},default:{bodyMapper:w,headersMapper:Kt}},requestBody:Fn,queryParameters:[Jr,Gi,Un],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Zs};const Ia={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:P,headersMapper:Zt},default:{bodyMapper:w,headersMapper:er}},queryParameters:[Jr,Gi,Vi,Hn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi],isXML:true,serializer:Zs};const Ba={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:tr},default:{bodyMapper:w,headersMapper:rr}},requestBody:qn,queryParameters:[Jr,Vi,Hn],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,Ei,Zi,Gn,Vn],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Zs};class PageBlob{constructor(e){this.client=e}create(e,t,r){const i={contentLength:e,blobContentLength:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,wa)}uploadPages(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,xa)}clearPages(e,t){const r={contentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Sa)}uploadPagesFromURL(e,t,r,i,n){const s={sourceUrl:e,sourceRange:t,contentLength:r,range:i,options:g.operationOptionsToRequestOptionsBase(n||{})};return this.client.sendOperationRequest(s,Na)}getPageRanges(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ra)}getPageRangesDiff(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Da)}resize(e,t){const r={blobContentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ta)}updateSequenceNumber(e,t){const r={sequenceNumberAction:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,_a)}copyIncremental(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ka)}}const va=new g.Serializer(Hr,true);const Qa=new g.Serializer(Hr,false);const wa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:ir},default:{bodyMapper:w,headersMapper:nr}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,jn,zn,Yn],isXML:true,serializer:va};const xa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:sr},default:{bodyMapper:w,headersMapper:ar}},requestBody:Wn,queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,yi,Ci,ji,Ji,Wi,Xi,$i,Ki,Zi,fn,Gn,Vn,Jn,Xn,Kn,Zn,es,ts],mediaType:"binary",serializer:Qa};const Sa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:or},default:{bodyMapper:w,headersMapper:lr}},queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,ji,Ji,Wi,Xi,$i,Ki,Zi,fn,Zn,es,ts,rs],isXML:true,serializer:va};const Na={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:cr},default:{bodyMapper:w,headersMapper:pr}},queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,bn,In,Bn,vn,Dn,Tn,Kn,Zn,es,ts,is,ns,ss,as],isXML:true,serializer:va};const Ra={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:K,headersMapper:dr},default:{bodyMapper:w,headersMapper:Ar}},queryParameters:[Jr,ti,ri,Gi,os],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,$i,Ki,Zi],isXML:true,serializer:va};const Da={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:K,headersMapper:ur},default:{bodyMapper:w,headersMapper:mr}},queryParameters:[Jr,ti,ri,Gi,os,ls],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,$i,Ki,Zi,cs],isXML:true,serializer:va};const Ta={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:gr},default:{bodyMapper:w,headersMapper:hr}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,zn],isXML:true,serializer:va};const _a={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:fr},default:{bodyMapper:w,headersMapper:Er}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,Yn,ps],isXML:true,serializer:va};const ka={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:yr},default:{bodyMapper:w,headersMapper:Cr}},queryParameters:[Jr,ds],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,$i,Ki,Zi,wn],isXML:true,serializer:va};class AppendBlob{constructor(e){this.client=e}create(e,t){const r={contentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,La)}appendBlock(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ma)}appendBlockFromUrl(e,t,r){const i={sourceUrl:e,contentLength:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Fa)}seal(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ua)}}const Oa=new g.Serializer(Hr,true);const Pa=new g.Serializer(Hr,false);const La={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:br},default:{bodyMapper:w,headersMapper:Ir}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,xn,Nn,As],isXML:true,serializer:Oa};const Ma={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Br},default:{bodyMapper:w,headersMapper:vr}},requestBody:Wn,queryParameters:[Jr,us],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,Gn,Vn,Jn,Xn,ms,gs],mediaType:"binary",serializer:Pa};const Fa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Qr},default:{bodyMapper:w,headersMapper:wr}},queryParameters:[Jr,us],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,bn,In,Bn,vn,Dn,Tn,Gn,is,ss,ms,gs,hs],isXML:true,serializer:Oa};const Ua={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:xr},default:{bodyMapper:w,headersMapper:Sr}},queryParameters:[Jr,fs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,gs],isXML:true,serializer:Oa};class BlockBlob{constructor(e){this.client=e}upload(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ga)}putBlobFromUrl(e,t,r){const i={contentLength:e,copySource:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Va)}stageBlock(e,t,r,i){const n={blockId:e,contentLength:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,ja)}stageBlockFromURL(e,t,r,i){const n={blockId:e,contentLength:t,sourceUrl:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,za)}commitBlockList(e,t){const r={blocks:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ya)}getBlockList(e,t){const r={listType:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ja)}}const Ha=new g.Serializer(Hr,true);const qa=new g.Serializer(Hr,false);const Ga={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Nr},default:{bodyMapper:w,headersMapper:Rr}},requestBody:Wn,queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,Gn,Vn,Jn,Xn,Es],mediaType:"binary",serializer:qa};const Va={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Dr},default:{bodyMapper:w,headersMapper:Tr}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,fn,yn,bn,In,Bn,vn,Qn,wn,xn,Dn,Tn,_n,Gn,Es,ys],isXML:true,serializer:Ha};const ja={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:_r},default:{bodyMapper:w,headersMapper:kr}},requestBody:Wn,queryParameters:[Jr,Cs,bs],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,Ji,Wi,Xi,fn,Gn,Vn,Jn,Xn],mediaType:"binary",serializer:qa};const za={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Or},default:{bodyMapper:w,headersMapper:Pr}},queryParameters:[Jr,Cs,bs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,Ji,Wi,Xi,fn,bn,In,Bn,vn,Dn,Tn,is,ss,hs],isXML:true,serializer:Ha};const Ya={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Lr},default:{bodyMapper:w,headersMapper:Mr}},requestBody:Is,queryParameters:[Jr,Bs],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,Gn,Vn],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Ha};const Ja={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:X,headersMapper:Fr},default:{bodyMapper:w,headersMapper:Ur}},queryParameters:[Jr,Gi,Bs,vs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi],isXML:true,serializer:Ha};const Wa=a.createClientLogger("storage-blob");const Xa="12.14.0";const $a="2022-11-02";const Ka=256*1024*1024;const Za=4e3*1024*1024;const eo=5e4;const to=8*1024*1024;const ro=4*1024*1024;const io=5;const no=100*1e3;const so="https://storage.azure.com/.default";const ao={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};const oo={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};const lo={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version"};const co="";const po="*";const Ao=1*1024*1024;const uo=256;const mo=4*Ao;const go="\r\n";const ho="HTTP/1.1";const fo="AES256";const Eo=`DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;const yo=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"];const Co=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"];const bo="BlobUsesCustomerSpecifiedEncryption";const Io="BlobDoesNotUseCustomerSpecifiedEncryption";const Bo=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function escapeURLPath(e){const t=i.URLBuilder.parse(e);let r=t.getPath();r=r||"/";r=escape(r);t.setPath(r);return t.toString()}function getProxyUriFromDevConnString(e){let t="";if(e.search("DevelopmentStorageProxyUri=")!==-1){const r=e.split(";");for(const e of r){if(e.trim().startsWith("DevelopmentStorageProxyUri=")){t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1]}}}return t}function getValueInConnString(e,t){const r=e.split(";");for(const e of r){if(e.trim().startsWith(t)){return e.trim().match(t+"=(.*)")[1]}}return""}function extractConnectionStringParts(e){let t="";if(e.startsWith("UseDevelopmentStorage=true")){t=getProxyUriFromDevConnString(e);e=Eo}let r=getValueInConnString(e,"BlobEndpoint");r=r.endsWith("/")?r.slice(0,-1):r;if(e.search("DefaultEndpointsProtocol=")!==-1&&e.search("AccountKey=")!==-1){let i="";let n="";let s=Buffer.from("accountKey","base64");let a="";n=getValueInConnString(e,"AccountName");s=Buffer.from(getValueInConnString(e,"AccountKey"),"base64");if(!r){i=getValueInConnString(e,"DefaultEndpointsProtocol");const t=i.toLowerCase();if(t!=="https"&&t!=="http"){throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'")}a=getValueInConnString(e,"EndpointSuffix");if(!a){throw new Error("Invalid EndpointSuffix in the provided Connection String")}r=`${i}://${n}.blob.${a}`}if(!n){throw new Error("Invalid AccountName in the provided Connection String")}else if(s.length===0){throw new Error("Invalid AccountKey in the provided Connection String")}return{kind:"AccountConnString",url:r,accountName:n,accountKey:s,proxyUri:t}}else{const t=getValueInConnString(e,"SharedAccessSignature");const i=getAccountNameFromUrl(r);if(!r){throw new Error("Invalid BlobEndpoint in the provided SAS Connection String")}else if(!t){throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}return{kind:"SASConnString",url:r,accountName:i,accountSas:t}}}function escape(e){return encodeURIComponent(e).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function appendToURLPath(e,t){const r=i.URLBuilder.parse(e);let n=r.getPath();n=n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t;r.setPath(n);const s=new URL(r.toString());return s.toString()}function setURLParameter(e,t,r){const n=i.URLBuilder.parse(e);n.setQueryParameter(t,r);return n.toString()}function getURLParameter(e,t){const r=i.URLBuilder.parse(e);return r.getQueryParameterValue(t)}function setURLHost(e,t){const r=i.URLBuilder.parse(e);r.setHost(t);return r.toString()}function getURLPath(e){const t=i.URLBuilder.parse(e);return t.getPath()}function getURLScheme(e){const t=i.URLBuilder.parse(e);return t.getScheme()}function getURLPathAndQuery(e){const t=i.URLBuilder.parse(e);const r=t.getPath();if(!r){throw new RangeError("Invalid url without valid path.")}let n=t.getQuery()||"";n=n.trim();if(n!==""){n=n.startsWith("?")?n:`?${n}`}return`${r}${n}`}function getURLQueries(e){let t=i.URLBuilder.parse(e).getQuery();if(!t){return{}}t=t.trim();t=t.startsWith("?")?t.substr(1):t;let r=t.split("&");r=r.filter((e=>{const t=e.indexOf("=");const r=e.lastIndexOf("=");return t>0&&t===r&&rn){e=e.slice(0,n)}const s=e+padStart(t.toString(),r-e.length,"0");return base64encode(s)}async function delay(e,t,r){return new Promise(((i,n)=>{let s;const abortHandler=()=>{if(s!==undefined){clearTimeout(s)}n(r)};const resolveHandler=()=>{if(t!==undefined){t.removeEventListener("abort",abortHandler)}i()};s=setTimeout(resolveHandler,e);if(t!==undefined){t.addEventListener("abort",abortHandler)}}))}function padStart(e,t,r=" "){if(String.prototype.padStart){return e.padStart(t,r)}r=r||" ";if(e.length>t){return e}else{t=t-e.length;if(t>r.length){r+=r.repeat(t/r.length)}return r.slice(0,t)+e}}function iEqual(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function getAccountNameFromUrl(e){const t=i.URLBuilder.parse(e);let r;try{if(t.getHost().split(".")[1]==="blob"){r=t.getHost().split(".")[0]}else if(isIpEndpointStyle(t)){r=t.getPath().split("/")[1]}else{r=""}return r}catch(e){throw new Error("Unable to extract accountName with provided information.")}}function isIpEndpointStyle(e){if(e.getHost()===undefined){return false}const t=e.getHost()+(e.getPort()===undefined?"":":"+e.getPort());return/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||e.getPort()!==undefined&&Bo.includes(e.getPort())}function toBlobTagsString(e){if(e===undefined){return undefined}const t=[];for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(i)}`)}}return t.join("&")}function toBlobTags(e){if(e===undefined){return undefined}const t={blobTagSet:[]};for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.blobTagSet.push({key:r,value:i})}}return t}function toTags(e){if(e===undefined){return undefined}const t={};for(const r of e.blobTagSet){t[r.key]=r.value}return t}function toQuerySerialization(e){if(e===undefined){return undefined}switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||false}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function parseObjectReplicationRecord(e){if(!e){return undefined}if("policy-id"in e){return undefined}const t=[];for(const r in e){const i=r.split("_");const n="or-";if(i[0].startsWith(n)){i[0]=i[0].substring(n.length)}const s={ruleId:i[1],replicationStatus:e[r]};const a=t.findIndex((e=>e.policyId===i[0]));if(a>-1){t[a].rules.push(s)}else{t.push({policyId:i[0],rules:[s]})}}return t}function attachCredential(e,t){e.credential=t;return e}function httpAuthorizationToString(e){return e?e.scheme+" "+e.value:undefined}function BlobNameToString(e){if(e.encoded){return decodeURIComponent(e.content)}else{return e.content}}function ConvertInternalResponseOfListBlobFlat(e){return Object.assign(Object.assign({},e),{segment:{blobItems:e.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)});return t}))}})}function ConvertInternalResponseOfListBlobHierarchy(e){var t;return Object.assign(Object.assign({},e),{segment:{blobPrefixes:(t=e.segment.blobPrefixes)===null||t===void 0?void 0:t.map((e=>{const t={name:BlobNameToString(e.name)};return t})),blobItems:e.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)});return t}))}})}function*ExtractPageRangeInfoItems(e){let t=[];let r=[];if(e.pageRange)t=e.pageRange;if(e.clearRange)r=e.clearRange;let i=0;let n=0;while(i=1?Math.floor(r.maxTries):vo.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:vo.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:vo.maxRetryDelayInMs):vo.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:vo.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:vo.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,false,1)}async attemptSendRequest(e,t,r){const i=e.clone();const n=t||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||r%2===1;if(!n){i.url=setURLHost(i.url,this.retryOptions.secondaryHost)}if(this.retryOptions.tryTimeoutInMs){i.url=setURLParameter(i.url,ao.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString())}let s;try{Wa.info(`RetryPolicy: =====> Try=${r} ${n?"Primary":"Secondary"}`);s=await this._nextPolicy.sendRequest(i);if(!this.shouldRetry(n,r,s)){return s}t=t||!n&&s.status===404}catch(e){Wa.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`);if(!this.shouldRetry(n,r,s,e)){throw e}}await this.delay(n,r,e.abortSignal);return this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,i){if(t>=this.retryOptions.maxTries){Wa.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`);return false}const n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(const e of n){if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e){Wa.info(`RetryPolicy: Network error ${e} found, will retry.`);return true}}}if(r||i){const t=r?r.status:i?i.statusCode:0;if(!e&&t===404){Wa.info(`RetryPolicy: Secondary access with 404, will retry.`);return true}if(t===503||t===500){Wa.info(`RetryPolicy: Will retry for status code ${t}.`);return true}}if((i===null||i===void 0?void 0:i.code)==="PARSE_ERROR"&&(i===null||i===void 0?void 0:i.message.startsWith(`Error "Error: Unclosed root tag`))){Wa.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");return true}return false}async delay(e,r,i){let n=0;if(e){switch(this.retryOptions.retryPolicyType){case t.StorageRetryPolicyType.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case t.StorageRetryPolicyType.FIXED:n=this.retryOptions.retryDelayInMs;break}}else{n=Math.random()*1e3}Wa.info(`RetryPolicy: Delay for ${n}ms`);return delay(n,i,Qo)}}class StorageRetryPolicyFactory{constructor(e){this.retryOptions=e}create(e,t){return new StorageRetryPolicy(e,t,this.retryOptions)}}class CredentialPolicy extends i.BaseRequestPolicy{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}class AnonymousCredentialPolicy extends CredentialPolicy{constructor(e,t){super(e,t)}}class Credential{create(e,t){throw new Error("Method should be implemented in children classes.")}}class AnonymousCredential extends Credential{create(e,t){return new AnonymousCredentialPolicy(e,t)}}class TelemetryPolicy extends i.BaseRequestPolicy{constructor(e,t,r){super(e,t);this.telemetry=r}async sendRequest(e){if(i.isNode){if(!e.headers){e.headers=new i.HttpHeaders}if(!e.headers.get(lo.USER_AGENT)){e.headers.set(lo.USER_AGENT,this.telemetry)}}return this._nextPolicy.sendRequest(e)}}class TelemetryPolicyFactory{constructor(e){const t=[];if(i.isNode){if(e){const r=e.userAgentPrefix||"";if(r.length>0&&t.indexOf(r)===-1){t.push(r)}}const r=`azsdk-js-storageblob/${Xa}`;if(t.indexOf(r)===-1){t.push(r)}let i=`(NODE-VERSION ${process.version})`;if(h){i=`(NODE-VERSION ${process.version}; ${h.type()} ${h.release()})`}if(t.indexOf(i)===-1){t.push(i)}}this.telemetryString=t.join(" ")}create(e,t){return new TelemetryPolicy(e,t,this.telemetryString)}}const wo=new i.DefaultHttpClient;function getCachedDefaultHttpClient(){return wo}const xo={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}};const So={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,r){async function tryGetAccessToken(){if(Date.now()e.getToken(t,r);i=beginRefresh(tryGetAccessToken,s.retryIntervalInMs,(o=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&o!==void 0?o:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(a.mustRefresh)return refresh(e);if(a.shouldRefresh){refresh(e)}return n}}function getChallenge(e){const t=e.headers.get("WWW-Authenticate");if(e.status===401&&t){return t}return}function parseChallenge(e){const t=e.slice("Bearer ".length);const r=`${t.trim()} `.split(" ").filter((e=>e));const i=r.map((e=>(([e,t])=>({[e]:t}))(e.trim().split("="))));return i.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}function storageBearerTokenChallengeAuthenticationPolicy(e,t){let r=createTokenCycler(e,t);class StorageBearerTokenChallengeAuthenticationPolicy extends i.BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(t){if(!t.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const n=r;const s=(await n({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext}})).token;t.headers.set(xo.HeaderConstants.AUTHORIZATION,`Bearer ${s}`);const a=await this._nextPolicy.sendRequest(t);if((a===null||a===void 0?void 0:a.status)===401){const n=getChallenge(a);if(n){const s=parseChallenge(n);const a=s.resource_id+xo.DefaultScope;const o=i.URLBuilder.parse(s.authorization_uri);const l=o.getPath().split("/");const c=l[1];const p=createTokenCycler(e,a);const d=(await p({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext},tenantId:c})).token;r=p;t.headers.set(xo.HeaderConstants.AUTHORIZATION,`Bearer ${d}`);return this._nextPolicy.sendRequest(t)}}return a}}return{create:(e,t)=>new StorageBearerTokenChallengeAuthenticationPolicy(e,t)}}function isPipelineLike(e){if(!e||typeof e!=="object"){return false}const t=e;return Array.isArray(t.factories)&&typeof t.options==="object"&&typeof t.toServiceClientOptions==="function"}class Pipeline{constructor(e,t={}){this.factories=e;this.options=Object.assign(Object.assign({},t),{httpClient:t.httpClient||getCachedDefaultHttpClient()})}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}function newPipeline(e,t={}){var r;if(e===undefined){e=new AnonymousCredential}const n=new TelemetryPolicyFactory(t.userAgentOptions);const s=[i.tracingPolicy({userAgent:n.telemetryString}),i.keepAlivePolicy(t.keepAliveOptions),n,i.generateClientRequestIdPolicy(),new StorageBrowserPolicyFactory,new StorageRetryPolicyFactory(t.retryOptions),i.deserializationPolicy(undefined,{xmlCharKey:"#"}),i.logPolicy({logger:Wa.info,allowedHeaderNames:yo,allowedQueryParameters:Co})];if(i.isNode){s.push(i.proxyPolicy(t.proxyOptions));s.push(i.disableResponseDecompressionPolicy())}s.push(i.isTokenCredential(e)?attachCredential(storageBearerTokenChallengeAuthenticationPolicy(e,(r=t.audience)!==null&&r!==void 0?r:so),e):e);return new Pipeline(s,t)}class StorageSharedKeyCredentialPolicy extends CredentialPolicy{constructor(e,t,r){super(e,t);this.factory=r}signRequest(e){e.headers.set(lo.X_MS_DATE,(new Date).toUTCString());if(e.body&&(typeof e.body==="string"||e.body!==undefined)&&e.body.length>0){e.headers.set(lo.CONTENT_LENGTH,Buffer.byteLength(e.body))}const t=[e.method.toUpperCase(),this.getHeaderValueToSign(e,lo.CONTENT_LANGUAGE),this.getHeaderValueToSign(e,lo.CONTENT_ENCODING),this.getHeaderValueToSign(e,lo.CONTENT_LENGTH),this.getHeaderValueToSign(e,lo.CONTENT_MD5),this.getHeaderValueToSign(e,lo.CONTENT_TYPE),this.getHeaderValueToSign(e,lo.DATE),this.getHeaderValueToSign(e,lo.IF_MODIFIED_SINCE),this.getHeaderValueToSign(e,lo.IF_MATCH),this.getHeaderValueToSign(e,lo.IF_NONE_MATCH),this.getHeaderValueToSign(e,lo.IF_UNMODIFIED_SINCE),this.getHeaderValueToSign(e,lo.RANGE)].join("\n")+"\n"+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e);const r=this.factory.computeHMACSHA256(t);e.headers.set(lo.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${r}`);return e}getHeaderValueToSign(e,t){const r=e.headers.get(t);if(!r){return""}if(t===lo.CONTENT_LENGTH&&r==="0"){return""}return r}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter((e=>e.name.toLowerCase().startsWith(lo.PREFIX_FOR_STORAGE)));t.sort(((e,t)=>e.name.toLowerCase().localeCompare(t.name.toLowerCase())));t=t.filter(((e,t,r)=>{if(t>0&&e.name.toLowerCase()===r[t-1].name.toLowerCase()){return false}return true}));let r="";t.forEach((e=>{r+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}));return r}getCanonicalizedResourceString(e){const t=getURLPath(e.url)||"/";let r="";r+=`/${this.factory.accountName}${t}`;const i=getURLQueries(e.url);const n={};if(i){const e=[];for(const t in i){if(Object.prototype.hasOwnProperty.call(i,t)){const r=t.toLowerCase();n[r]=i[t];e.push(r)}}e.sort();for(const t of e){r+=`\n${t}:${decodeURIComponent(n[t])}`}}return r}}class StorageSharedKeyCredential extends Credential{constructor(e,t){super();this.accountName=e;this.accountKey=Buffer.from(t,"base64")}create(e,t){return new StorageSharedKeyCredentialPolicy(e,t,this)}computeHMACSHA256(e){return c.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}}const No="azure-storage-blob";const Ro="12.14.0";class StorageClientContext extends g.ServiceClient{constructor(e,t){if(e===undefined){throw new Error("'url' cannot be null")}if(!t){t={}}if(!t.userAgent){const e=g.getDefaultUserAgentValue();t.userAgent=`${No}/${Ro} ${e}`}super(undefined,t);this.requestContentType="application/json; charset=utf-8";this.baseUri=t.endpoint||"{url}";this.url=e;this.version=t.version||"2022-11-02"}}class StorageClient{constructor(e,t){this.url=escapeURLPath(e);this.accountName=getAccountNameFromUrl(e);this.pipeline=t;this.storageClientContext=new StorageClientContext(this.url,t.toServiceClientOptions());this.isHttps=iEqual(getURLScheme(this.url)||"","https");this.credential=new AnonymousCredential;for(const e of this.pipeline.factories){if(i.isNode&&e instanceof StorageSharedKeyCredential||e instanceof AnonymousCredential){this.credential=e}else if(i.isTokenCredential(e.credential)){this.credential=e.credential}}const r=this.storageClientContext;r.requestContentType=undefined}}const Do=s.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function convertTracingToRequestOptionsBase(e){var t,r;return{spanOptions:(t=e===null||e===void 0?void 0:e.tracingOptions)===null||t===void 0?void 0:t.spanOptions,tracingContext:(r=e===null||e===void 0?void 0:e.tracingOptions)===null||r===void 0?void 0:r.tracingContext}}class BlobSASPermissions{constructor(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false;this.permanentDelete=false}static parse(e){const t=new BlobSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"x":t.deleteVersion=true;break;case"t":t.tag=true;break;case"m":t.move=true;break;case"e":t.execute=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;default:throw new RangeError(`Invalid permission: ${r}`)}}return t}static from(e){const t=new BlobSASPermissions;if(e.read){t.read=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.deleteVersion){t.deleteVersion=true}if(e.tag){t.tag=true}if(e.move){t.move=true}if(e.execute){t.execute=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}return e.join("")}}class ContainerSASPermissions{constructor(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false;this.permanentDelete=false;this.filterByTags=false}static parse(e){const t=new ContainerSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"l":t.list=true;break;case"t":t.tag=true;break;case"x":t.deleteVersion=true;break;case"m":t.move=true;break;case"e":t.execute=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;case"f":t.filterByTags=true;break;default:throw new RangeError(`Invalid permission ${r}`)}}return t}static from(e){const t=new ContainerSASPermissions;if(e.read){t.read=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.list){t.list=true}if(e.deleteVersion){t.deleteVersion=true}if(e.tag){t.tag=true}if(e.move){t.move=true}if(e.execute){t.execute=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}if(e.filterByTags){t.filterByTags=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.list){e.push("l")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}if(this.filterByTags){e.push("f")}return e.join("")}}class UserDelegationKeyCredential{constructor(e,t){this.accountName=e;this.userDelegationKey=t;this.key=Buffer.from(t.value,"base64")}computeHMACSHA256(e){return c.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}}function ipRangeToString(e){return e.end?`${e.start}-${e.end}`:e.start}t.SASProtocol=void 0;(function(e){e["Https"]="https";e["HttpsAndHttp"]="https,http"})(t.SASProtocol||(t.SASProtocol={}));class SASQueryParameters{constructor(e,t,r,i,n,s,a,o,l,c,p,d,A,u,m,g,h,E,y,C){this.version=e;this.signature=t;if(r!==undefined&&typeof r!=="string"){this.permissions=r.permissions;this.services=r.services;this.resourceTypes=r.resourceTypes;this.protocol=r.protocol;this.startsOn=r.startsOn;this.expiresOn=r.expiresOn;this.ipRangeInner=r.ipRange;this.identifier=r.identifier;this.encryptionScope=r.encryptionScope;this.resource=r.resource;this.cacheControl=r.cacheControl;this.contentDisposition=r.contentDisposition;this.contentEncoding=r.contentEncoding;this.contentLanguage=r.contentLanguage;this.contentType=r.contentType;if(r.userDelegationKey){this.signedOid=r.userDelegationKey.signedObjectId;this.signedTenantId=r.userDelegationKey.signedTenantId;this.signedStartsOn=r.userDelegationKey.signedStartsOn;this.signedExpiresOn=r.userDelegationKey.signedExpiresOn;this.signedService=r.userDelegationKey.signedService;this.signedVersion=r.userDelegationKey.signedVersion;this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId;this.correlationId=r.correlationId}}else{this.services=i;this.resourceTypes=n;this.expiresOn=o;this.permissions=r;this.protocol=s;this.startsOn=a;this.ipRangeInner=l;this.encryptionScope=C;this.identifier=c;this.resource=p;this.cacheControl=d;this.contentDisposition=A;this.contentEncoding=u;this.contentLanguage=m;this.contentType=g;if(h){this.signedOid=h.signedObjectId;this.signedTenantId=h.signedTenantId;this.signedStartsOn=h.signedStartsOn;this.signedExpiresOn=h.signedExpiresOn;this.signedService=h.signedService;this.signedVersion=h.signedVersion;this.preauthorizedAgentObjectId=E;this.correlationId=y}}}get ipRange(){if(this.ipRangeInner){return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}return undefined}toString(){const e=["sv","ss","srt","spr","st","se","sip","si","ses","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"];const t=[];for(const r of e){switch(r){case"sv":this.tryAppendQueryParameter(t,r,this.version);break;case"ss":this.tryAppendQueryParameter(t,r,this.services);break;case"srt":this.tryAppendQueryParameter(t,r,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,r,this.protocol);break;case"st":this.tryAppendQueryParameter(t,r,this.startsOn?truncatedISO8061Date(this.startsOn,false):undefined);break;case"se":this.tryAppendQueryParameter(t,r,this.expiresOn?truncatedISO8061Date(this.expiresOn,false):undefined);break;case"sip":this.tryAppendQueryParameter(t,r,this.ipRange?ipRangeToString(this.ipRange):undefined);break;case"si":this.tryAppendQueryParameter(t,r,this.identifier);break;case"ses":this.tryAppendQueryParameter(t,r,this.encryptionScope);break;case"skoid":this.tryAppendQueryParameter(t,r,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,r,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,r,this.signedStartsOn?truncatedISO8061Date(this.signedStartsOn,false):undefined);break;case"ske":this.tryAppendQueryParameter(t,r,this.signedExpiresOn?truncatedISO8061Date(this.signedExpiresOn,false):undefined);break;case"sks":this.tryAppendQueryParameter(t,r,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,r,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,r,this.resource);break;case"sp":this.tryAppendQueryParameter(t,r,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,r,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,r,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,r,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,r,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,r,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,r,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,r,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,r,this.correlationId);break}}return t.join("&")}tryAppendQueryParameter(e,t,r){if(!r){return}t=encodeURIComponent(t);r=encodeURIComponent(r);if(t.length>0&&r.length>0){e.push(`${t}=${r}`)}}}function generateBlobSASQueryParameters(e,t,r){const i=e.version?e.version:$a;const n=t instanceof StorageSharedKeyCredential?t:undefined;let s;if(n===undefined&&r!==undefined){s=new UserDelegationKeyCredential(r,t)}if(n===undefined&&s===undefined){throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.")}if(i>="2020-12-06"){if(n!==undefined){return generateBlobSASQueryParameters20201206(e,n)}else{return generateBlobSASQueryParametersUDK20201206(e,s)}}if(i>="2018-11-09"){if(n!==undefined){return generateBlobSASQueryParameters20181109(e,n)}else{if(i>="2020-02-10"){return generateBlobSASQueryParametersUDK20200210(e,s)}else{return generateBlobSASQueryParametersUDK20181109(e,s)}}}if(i>="2015-04-05"){if(n!==undefined){return generateBlobSASQueryParameters20150405(e,n)}else{throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}}throw new RangeError("'version' must be >= '2015-04-05'.")}function generateBlobSASQueryParameters20150405(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";if(e.blobName){r="b"}let i;if(e.permissions){if(e.blobName){i=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{i=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const n=[i?i:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const s=t.computeHMACSHA256(n);return new SASQueryParameters(e.version,s,i,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20181109(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20201206(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,undefined,undefined,undefined,e.encryptionScope)}function generateBlobSASQueryParametersUDK20181109(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}function generateBlobSASQueryParametersUDK20200210(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}function generateBlobSASQueryParametersUDK20201206(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope)}function getCanonicalName(e,t,r){const i=[`/blob/${e}/${t}`];if(r){i.push(`/${r}`)}return i.join("")}function SASSignatureValuesSanityCheckAndAutofill(e){const t=e.version?e.version:$a;if(e.snapshotTime&&t<"2018-11-09"){throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.")}if(e.blobName===undefined&&e.snapshotTime){throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.")}if(e.versionId&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.")}if(e.blobName===undefined&&e.versionId){throw RangeError("Must provide 'blobName' when providing 'versionId'.")}if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.")}if(e.permissions&&e.permissions.permanentDelete&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.")}if(e.permissions&&e.permissions.tag&&t<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.")}if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute)){throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.")}if(t<"2021-04-10"&&e.permissions&&e.permissions.filterByTags){throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.")}if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId)){throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.")}if(e.encryptionScope&&t<"2020-12-06"){throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.")}e.version=t;return e}class BlobLeaseClient{constructor(e,t){const r=new StorageClientContext(e.url,e.pipeline.toServiceClientOptions());this._url=e.url;if(e.name===undefined){this._isContainer=true;this._containerOrBlobOperation=new Container(r)}else{this._isContainer=false;this._containerOrBlobOperation=new Blob$1(r)}if(!t){t=i.generateUuid()}this._leaseId=t}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-acquireLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions}),proposedLeaseId:this._leaseId},convertTracingToRequestOptionsBase(p)))}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}async changeLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-changeLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{const r=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions})},convertTracingToRequestOptionsBase(p)));this._leaseId=e;return r}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}async releaseLease(e={}){var t,r,i,n,a,o;const{span:l,updatedOptions:c}=Do("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==co||((i=e.conditions)===null||i===void 0?void 0:i.ifNoneMatch)&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==co||((a=e.conditions)===null||a===void 0?void 0:a.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.releaseLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async renewLease(e={}){var t,r,i,n,a,o;const{span:l,updatedOptions:c}=Do("BlobLeaseClient-renewLease",e);if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==co||((i=e.conditions)===null||i===void 0?void 0:i.ifNoneMatch)&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==co||((a=e.conditions)===null||a===void 0?void 0:a.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.renewLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async breakLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-breakLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{const r=Object.assign({abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions})},convertTracingToRequestOptionsBase(p));return await this._containerOrBlobOperation.breakLease(r)}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}}class RetriableReadableStream extends p.Readable{constructor(e,t,r,i,n={}){super({highWaterMark:n.highWaterMark});this.retries=0;this.sourceDataHandler=e=>{if(this.options.doInjectErrorOnce){this.options.doInjectErrorOnce=undefined;this.source.pause();this.source.removeAllListeners("data");this.source.emit("end");return}this.offset+=e.length;if(this.onProgress){this.onProgress({loadedBytes:this.offset-this.start})}if(!this.push(e)){this.source.pause()}};this.sourceErrorOrEndHandler=e=>{if(e&&e.name==="AbortError"){this.destroy(e);return}this.removeSourceEventHandlers();if(this.offset-1===this.end){this.push(null)}else if(this.offset<=this.end){if(this.retries{this.source=e;this.setSourceEventHandlers();return})).catch((e=>{this.destroy(e)}))}else{this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset-1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`))}}else{this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`))}};this.getter=t;this.source=e;this.start=r;this.offset=r;this.end=r+i-1;this.maxRetryRequests=n.maxRetryRequests&&n.maxRetryRequests>=0?n.maxRetryRequests:0;this.onProgress=n.onProgress;this.options=n;this.setSourceEventHandlers()}_read(){this.source.resume()}setSourceEventHandlers(){this.source.on("data",this.sourceDataHandler);this.source.on("end",this.sourceErrorOrEndHandler);this.source.on("error",this.sourceErrorOrEndHandler)}removeSourceEventHandlers(){this.source.removeListener("data",this.sourceDataHandler);this.source.removeListener("end",this.sourceErrorOrEndHandler);this.source.removeListener("error",this.sourceErrorOrEndHandler)}_destroy(e,t){this.removeSourceEventHandlers();this.source.destroy();t(e===null?undefined:e)}}class BlobDownloadResponse{constructor(e,t,r,i,n={}){this.originalResponse=e;this.blobDownloadStream=new RetriableReadableStream(this.originalResponse.readableStreamBody,t,r,i,n)}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return this.originalResponse.copyCompletedOn}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get tagCount(){return this.originalResponse.tagCount}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get lastAccessed(){return this.originalResponse.lastAccessed}get createdOn(){return this.originalResponse.createdOn}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get versionId(){return this.originalResponse.versionId}get isCurrentVersion(){return this.originalResponse.isCurrentVersion}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get objectReplicationDestinationPolicyId(){return this.originalResponse.objectReplicationDestinationPolicyId}get objectReplicationSourceProperties(){return this.originalResponse.objectReplicationSourceProperties}get isSealed(){return this.originalResponse.isSealed}get immutabilityPolicyExpiresOn(){return this.originalResponse.immutabilityPolicyExpiresOn}get immutabilityPolicyMode(){return this.originalResponse.immutabilityPolicyMode}get legalHold(){return this.originalResponse.legalHold}get contentAsBlob(){return this.originalResponse.blobBody}get readableStreamBody(){return i.isNode?this.blobDownloadStream:undefined}get _response(){return this.originalResponse._response}}const To=16;const _o=new Uint8Array([79,98,106,1]);const ko="avro.codec";const Oo="avro.schema";class AvroParser{static async readFixedBytes(e,t,r={}){const i=await e.read(t,{abortSignal:r.abortSignal});if(i.length!==t){throw new Error("Hit stream end.")}return i}static async readByte(e,t={}){const r=await AvroParser.readFixedBytes(e,1,t);return r[0]}static async readZigZagLong(e,t={}){let r=0;let i=0;let n,s,a;do{n=await AvroParser.readByte(e,t);s=n&128;r|=(n&127)<Number.MAX_SAFE_INTEGER){throw new Error("Integer overflow.")}return i}return r>>1^-(r&1)}static async readLong(e,t={}){return AvroParser.readZigZagLong(e,t)}static async readInt(e,t={}){return AvroParser.readZigZagLong(e,t)}static async readNull(){return null}static async readBoolean(e,t={}){const r=await AvroParser.readByte(e,t);if(r===1){return true}else if(r===0){return false}else{throw new Error("Byte was not a boolean.")}}static async readFloat(e,t={}){const r=await AvroParser.readFixedBytes(e,4,t);const i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.getFloat32(0,true)}static async readDouble(e,t={}){const r=await AvroParser.readFixedBytes(e,8,t);const i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.getFloat64(0,true)}static async readBytes(e,t={}){const r=await AvroParser.readLong(e,t);if(r<0){throw new Error("Bytes size was negative.")}return e.read(r,{abortSignal:t.abortSignal})}static async readString(e,t={}){const r=await AvroParser.readBytes(e,t);const i=new TextDecoder;return i.decode(r)}static async readMapPair(e,t,r={}){const i=await AvroParser.readString(e,r);const n=await t(e,r);return{key:i,value:n}}static async readMap(e,t,r={}){const readPairMethod=(e,r={})=>AvroParser.readMapPair(e,t,r);const i=await AvroParser.readArray(e,readPairMethod,r);const n={};for(const e of i){n[e.key]=e.value}return n}static async readArray(e,t,r={}){const i=[];for(let n=await AvroParser.readLong(e,r);n!==0;n=await AvroParser.readLong(e,r)){if(n<0){await AvroParser.readLong(e,r);n=-n}while(n--){const n=await t(e,r);i.push(n)}}return i}}var Po;(function(e){e["RECORD"]="record";e["ENUM"]="enum";e["ARRAY"]="array";e["MAP"]="map";e["UNION"]="union";e["FIXED"]="fixed"})(Po||(Po={}));var Lo;(function(e){e["NULL"]="null";e["BOOLEAN"]="boolean";e["INT"]="int";e["LONG"]="long";e["FLOAT"]="float";e["DOUBLE"]="double";e["BYTES"]="bytes";e["STRING"]="string"})(Lo||(Lo={}));class AvroType{static fromSchema(e){if(typeof e==="string"){return AvroType.fromStringSchema(e)}else if(Array.isArray(e)){return AvroType.fromArraySchema(e)}else{return AvroType.fromObjectSchema(e)}}static fromStringSchema(e){switch(e){case Lo.NULL:case Lo.BOOLEAN:case Lo.INT:case Lo.LONG:case Lo.FLOAT:case Lo.DOUBLE:case Lo.BYTES:case Lo.STRING:return new AvroPrimitiveType(e);default:throw new Error(`Unexpected Avro type ${e}`)}}static fromArraySchema(e){return new AvroUnionType(e.map(AvroType.fromSchema))}static fromObjectSchema(e){const t=e.type;try{return AvroType.fromStringSchema(t)}catch(e){}switch(t){case Po.RECORD:if(e.aliases){throw new Error(`aliases currently is not supported, schema: ${e}`)}if(!e.name){throw new Error(`Required attribute 'name' doesn't exist on schema: ${e}`)}const r={};if(!e.fields){throw new Error(`Required attribute 'fields' doesn't exist on schema: ${e}`)}for(const t of e.fields){r[t.name]=AvroType.fromSchema(t.type)}return new AvroRecordType(r,e.name);case Po.ENUM:if(e.aliases){throw new Error(`aliases currently is not supported, schema: ${e}`)}if(!e.symbols){throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${e}`)}return new AvroEnumType(e.symbols);case Po.MAP:if(!e.values){throw new Error(`Required attribute 'values' doesn't exist on schema: ${e}`)}return new AvroMapType(AvroType.fromSchema(e.values));case Po.ARRAY:case Po.FIXED:default:throw new Error(`Unexpected Avro type ${t} in ${e}`)}}}class AvroPrimitiveType extends AvroType{constructor(e){super();this._primitive=e}read(e,t={}){switch(this._primitive){case Lo.NULL:return AvroParser.readNull();case Lo.BOOLEAN:return AvroParser.readBoolean(e,t);case Lo.INT:return AvroParser.readInt(e,t);case Lo.LONG:return AvroParser.readLong(e,t);case Lo.FLOAT:return AvroParser.readFloat(e,t);case Lo.DOUBLE:return AvroParser.readDouble(e,t);case Lo.BYTES:return AvroParser.readBytes(e,t);case Lo.STRING:return AvroParser.readString(e,t);default:throw new Error("Unknown Avro Primitive")}}}class AvroEnumType extends AvroType{constructor(e){super();this._symbols=e}async read(e,t={}){const r=await AvroParser.readInt(e,t);return this._symbols[r]}}class AvroUnionType extends AvroType{constructor(e){super();this._types=e}async read(e,t={}){const r=await AvroParser.readInt(e,t);return this._types[r].read(e,t)}}class AvroMapType extends AvroType{constructor(e){super();this._itemType=e}read(e,t={}){const readItemMethod=(e,t)=>this._itemType.read(e,t);return AvroParser.readMap(e,readItemMethod,t)}}class AvroRecordType extends AvroType{constructor(e,t){super();this._fields=e;this._name=t}async read(e,t={}){const r={};r["$schema"]=this._name;for(const i in this._fields){if(Object.prototype.hasOwnProperty.call(this._fields,i)){r[i]=await this._fields[i].read(e,t)}}return r}}function arraysEqual(e,t){if(e===t)return true;if(e==null||t==null)return false;if(e.length!==t.length)return false;for(let r=0;r0){for(let t=0;t0}parseObjects(e={}){return n.__asyncGenerator(this,arguments,(function*parseObjects_1(){if(!this._initialized){yield n.__await(this.initialize(e))}while(this.hasNext()){const t=yield n.__await(this._itemType.read(this._dataStream,{abortSignal:e.abortSignal}));this._itemsRemainingInBlock--;this._objectIndex++;if(this._itemsRemainingInBlock===0){const t=yield n.__await(AvroParser.readFixedBytes(this._dataStream,To,{abortSignal:e.abortSignal}));this._blockOffset=this._initialBlockOffset+this._dataStream.position;this._objectIndex=0;if(!arraysEqual(this._syncMarker,t)){throw new Error("Stream is not a valid Avro file.")}try{this._itemsRemainingInBlock=yield n.__await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}))}catch(e){this._itemsRemainingInBlock=0}if(this._itemsRemainingInBlock>0){yield n.__await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}))}}yield yield n.__await(t)}}))}}class AvroReadable{}const Mo=new o.AbortError("Reading from the avro stream was aborted.");class AvroReadableFromStream extends AvroReadable{constructor(e){super();this._readable=e;this._position=0}toUint8Array(e){if(typeof e==="string"){return Buffer.from(e)}return e}get position(){return this._position}async read(e,t={}){var r;if((r=t.abortSignal)===null||r===void 0?void 0:r.aborted){throw Mo}if(e<0){throw new Error(`size parameter should be positive: ${e}`)}if(e===0){return new Uint8Array}if(!this._readable.readable){throw new Error("Stream no longer readable.")}const i=this._readable.read(e);if(i){this._position+=i.length;return this.toUint8Array(i)}else{return new Promise(((r,i)=>{const cleanUp=()=>{this._readable.removeListener("readable",readableCallback);this._readable.removeListener("error",rejectCallback);this._readable.removeListener("end",rejectCallback);this._readable.removeListener("close",rejectCallback);if(t.abortSignal){t.abortSignal.removeEventListener("abort",abortHandler)}};const readableCallback=()=>{const t=this._readable.read(e);if(t){this._position+=t.length;cleanUp();r(this.toUint8Array(t))}};const rejectCallback=()=>{cleanUp();i()};const abortHandler=()=>{cleanUp();i(Mo)};this._readable.on("readable",readableCallback);this._readable.once("error",rejectCallback);this._readable.once("end",rejectCallback);this._readable.once("close",rejectCallback);if(t.abortSignal){t.abortSignal.addEventListener("abort",abortHandler)}}))}}}class BlobQuickQueryStream extends p.Readable{constructor(e,t={}){super();this.avroPaused=true;this.source=e;this.onProgress=t.onProgress;this.onError=t.onError;this.avroReader=new AvroReader(new AvroReadableFromStream(this.source));this.avroIter=this.avroReader.parseObjects({abortSignal:t.abortSignal})}_read(){if(this.avroPaused){this.readInternal().catch((e=>{this.emit("error",e)}))}}async readInternal(){this.avroPaused=false;let e;do{e=await this.avroIter.next();if(e.done){break}const t=e.value;const r=t.$schema;if(typeof r!=="string"){throw Error("Missing schema in avro record.")}switch(r){case"com.microsoft.azure.storage.queryBlobContents.resultData":{const e=t.data;if(e instanceof Uint8Array===false){throw Error("Invalid data in avro result record.")}if(!this.push(Buffer.from(e))){this.avroPaused=true}}break;case"com.microsoft.azure.storage.queryBlobContents.progress":{const e=t.bytesScanned;if(typeof e!=="number"){throw Error("Invalid bytesScanned in avro progress record.")}if(this.onProgress){this.onProgress({loadedBytes:e})}}break;case"com.microsoft.azure.storage.queryBlobContents.end":if(this.onProgress){const e=t.totalBytes;if(typeof e!=="number"){throw Error("Invalid totalBytes in avro end record.")}this.onProgress({loadedBytes:e})}this.push(null);break;case"com.microsoft.azure.storage.queryBlobContents.error":if(this.onError){const e=t.fatal;if(typeof e!=="boolean"){throw Error("Invalid fatal in avro error record.")}const r=t.name;if(typeof r!=="string"){throw Error("Invalid name in avro error record.")}const i=t.description;if(typeof i!=="string"){throw Error("Invalid description in avro error record.")}const n=t.position;if(typeof n!=="number"){throw Error("Invalid position in avro error record.")}this.onError({position:n,name:r,isFatal:e,description:i})}break;default:throw Error(`Unknown schema ${r} in avro progress record.`)}}while(!e.done&&!this.avroPaused)}}class BlobQueryResponse{constructor(e,t={}){this.originalResponse=e;this.blobDownloadStream=new BlobQuickQueryStream(this.originalResponse.readableStreamBody,t)}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return undefined}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){return undefined}get readableStreamBody(){return i.isNode?this.blobDownloadStream:undefined}get _response(){return this.originalResponse._response}}t.BlockBlobTier=void 0;(function(e){e["Hot"]="Hot";e["Cool"]="Cool";e["Cold"]="Cold";e["Archive"]="Archive"})(t.BlockBlobTier||(t.BlockBlobTier={}));t.PremiumPageBlobTier=void 0;(function(e){e["P4"]="P4";e["P6"]="P6";e["P10"]="P10";e["P15"]="P15";e["P20"]="P20";e["P30"]="P30";e["P40"]="P40";e["P50"]="P50";e["P60"]="P60";e["P70"]="P70";e["P80"]="P80"})(t.PremiumPageBlobTier||(t.PremiumPageBlobTier={}));function toAccessTier(e){if(e===undefined){return undefined}return e}function ensureCpkIfSpecified(e,t){if(e&&!t){throw new RangeError("Customer-provided encryption key must be used over HTTPS.")}if(e&&!e.encryptionAlgorithm){e.encryptionAlgorithm=fo}}t.StorageBlobAudience=void 0;(function(e){e["StorageOAuthScopes"]="https://storage.azure.com/.default";e["DiskComputeOAuthScopes"]="https://disk.compute.azure.com/.default"})(t.StorageBlobAudience||(t.StorageBlobAudience={}));function rangeResponseFromModel(e){const t=(e._response.parsedBody.pageRange||[]).map((e=>({offset:e.start,count:e.end-e.start})));const r=(e._response.parsedBody.clearRange||[]).map((e=>({offset:e.start,count:e.end-e.start})));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}class BlobBeginCopyFromUrlPoller extends d.Poller{constructor(e){const{blobClient:t,copySource:r,intervalInMs:i=15e3,onProgress:n,resumeFrom:s,startCopyFromURLOptions:a}=e;let o;if(s){o=JSON.parse(s).state}const l=makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({},o),{blobClient:t,copySource:r,startCopyFromURLOptions:a}));super(l);if(typeof n==="function"){this.onProgress(n)}this.intervalInMs=i}delay(){return i.delay(this.intervalInMs)}}const Fo=async function cancel(e={}){const t=this.state;const{copyId:r}=t;if(t.isCompleted){return makeBlobBeginCopyFromURLPollOperation(t)}if(!r){t.isCancelled=true;return makeBlobBeginCopyFromURLPollOperation(t)}await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal});t.isCancelled=true;return makeBlobBeginCopyFromURLPollOperation(t)};const Uo=async function update(e={}){const t=this.state;const{blobClient:r,copySource:i,startCopyFromURLOptions:n}=t;if(!t.isStarted){t.isStarted=true;const e=await r.startCopyFromURL(i,n);t.copyId=e.copyId;if(e.copyStatus==="success"){t.result=e;t.isCompleted=true}}else if(!t.isCompleted){try{const r=await t.blobClient.getProperties({abortSignal:e.abortSignal});const{copyStatus:i,copyProgress:n}=r;const s=t.copyProgress;if(n){t.copyProgress=n}if(i==="pending"&&n!==s&&typeof e.fireProgress==="function"){e.fireProgress(t)}else if(i==="success"){t.result=r;t.isCompleted=true}else if(i==="failed"){t.error=new Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`);t.isCompleted=true}}catch(e){t.error=e;t.isCompleted=true}}return makeBlobBeginCopyFromURLPollOperation(t)};const Ho=function toString(){return JSON.stringify({state:this.state},((e,t)=>{if(e==="blobClient"){return undefined}return t}))};function makeBlobBeginCopyFromURLPollOperation(e){return{state:Object.assign({},e),cancel:Fo,toString:Ho,update:Uo}}function rangeToString(e){if(e.offset<0){throw new RangeError(`Range.offset cannot be smaller than 0.`)}if(e.count&&e.count<=0){throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`)}return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var qo;(function(e){e[e["Good"]=0]="Good";e[e["Error"]=1]="Error"})(qo||(qo={}));class Batch{constructor(e=5){this.actives=0;this.completed=0;this.offset=0;this.operations=[];this.state=qo.Good;if(e<1){throw new RangeError("concurrency must be larger than 0")}this.concurrency=e;this.emitter=new A.EventEmitter}addOperation(e){this.operations.push((async()=>{try{this.actives++;await e();this.actives--;this.completed++;this.parallelExecute()}catch(e){this.emitter.emit("error",e)}}))}async do(){if(this.operations.length===0){return Promise.resolve()}this.parallelExecute();return new Promise(((e,t)=>{this.emitter.on("finish",e);this.emitter.on("error",(e=>{this.state=qo.Error;t(e)}))}))}nextOperation(){if(this.offset=this.operations.length){this.emitter.emit("finish");return}while(this.actives=this.byteLength){this.push(null)}if(!e){e=this.readableHighWaterMark}const t=[];let r=0;while(re-r){const i=this.byteOffsetInCurrentBuffer+e-r;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,i));this.pushedBytesLength+=e-r;this.byteOffsetInCurrentBuffer=i;r=e;break}else{const e=this.byteOffsetInCurrentBuffer+s;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,e));if(s===n){this.byteOffsetInCurrentBuffer=0;this.bufferIndex++}else{this.byteOffsetInCurrentBuffer=e}this.pushedBytesLength+=s;r+=s}}if(t.length>1){this.push(Buffer.concat(t))}else if(t.length===1){this.push(t[0])}}}const Go=r(4300).constants.MAX_LENGTH;class PooledBuffer{constructor(e,t,r){this.buffers=[];this.capacity=e;this._size=0;const i=Math.ceil(e/Go);for(let t=0;t0){e[0]=e[0].slice(s)}}getReadableStream(){return new BuffersStream(this.buffers,this.size)}}class BufferScheduler{constructor(e,t,r,i,n,s){this.emitter=new A.EventEmitter;this.offset=0;this.isStreamEnd=false;this.isError=false;this.executingOutgoingHandlers=0;this.numBuffers=0;this.unresolvedDataArray=[];this.unresolvedLength=0;this.incoming=[];this.outgoing=[];if(t<=0){throw new RangeError(`bufferSize must be larger than 0, current is ${t}`)}if(r<=0){throw new RangeError(`maxBuffers must be larger than 0, current is ${r}`)}if(n<=0){throw new RangeError(`concurrency must be larger than 0, current is ${n}`)}this.bufferSize=t;this.maxBuffers=r;this.readable=e;this.outgoingHandler=i;this.concurrency=n;this.encoding=s}async do(){return new Promise(((e,t)=>{this.readable.on("data",(e=>{e=typeof e==="string"?Buffer.from(e,this.encoding):e;this.appendUnresolvedData(e);if(!this.resolveData()){this.readable.pause()}}));this.readable.on("error",(e=>{this.emitter.emit("error",e)}));this.readable.on("end",(()=>{this.isStreamEnd=true;this.emitter.emit("checkEnd")}));this.emitter.on("error",(e=>{this.isError=true;this.readable.pause();t(e)}));this.emitter.on("checkEnd",(()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0){if(this.unresolvedLength>0&&this.unresolvedLengthr.getReadableStream()),r.size,this.offset).then(e).catch(t)}else if(this.unresolvedLength>=this.bufferSize){return}else{e()}}}))}))}appendUnresolvedData(e){this.unresolvedDataArray.push(e);this.unresolvedLength+=e.length}shiftBufferFromUnresolvedDataArray(e){if(!e){e=new PooledBuffer(this.bufferSize,this.unresolvedDataArray,this.unresolvedLength)}else{e.fill(this.unresolvedDataArray,this.unresolvedLength)}this.unresolvedLength-=e.size;return e}resolveData(){while(this.unresolvedLength>=this.bufferSize){let e;if(this.incoming.length>0){e=this.incoming.shift();this.shiftBufferFromUnresolvedDataArray(e)}else{if(this.numBuffers=this.concurrency){return}e=this.outgoing.shift();if(e){this.triggerOutgoingHandler(e)}}while(e)}async triggerOutgoingHandler(e){const t=e.size;this.executingOutgoingHandlers++;this.offset+=t;try{await this.outgoingHandler((()=>e.getReadableStream()),t,this.offset-t)}catch(e){this.emitter.emit("error",e);return}this.executingOutgoingHandlers--;this.reuseBuffer(e);this.emitter.emit("checkEnd")}reuseBuffer(e){this.incoming.push(e);if(!this.isError&&this.resolveData()&&!this.isStreamEnd){this.readable.resume()}}}async function streamToBuffer(e,t,r,i,n){let s=0;const a=i-r;return new Promise(((i,o)=>{const l=setTimeout((()=>o(new Error(`The operation cannot be completed in timeout.`))),no);e.on("readable",(()=>{if(s>=a){clearTimeout(l);i();return}let o=e.read();if(!o){return}if(typeof o==="string"){o=Buffer.from(o,n)}const c=s+o.length>a?a-s:o.length;t.fill(o.slice(0,c),r+s,r+s+c);s+=c}));e.on("end",(()=>{clearTimeout(l);if(s{clearTimeout(l);o(e)}))}))}async function streamToBuffer2(e,t,r){let i=0;const n=t.length;return new Promise(((s,a)=>{e.on("readable",(()=>{let s=e.read();if(!s){return}if(typeof s==="string"){s=Buffer.from(s,r)}if(i+s.length>n){a(new Error(`Stream exceeds buffer size. Buffer size: ${n}`));return}t.fill(s,i,i+s.length);i+=s.length}));e.on("end",(()=>{s(i)}));e.on("error",a)}))}async function readStreamToLocalFile(e,t){return new Promise(((r,i)=>{const n=E.createWriteStream(t);e.on("error",(e=>{i(e)}));n.on("error",(e=>{i(e)}));n.on("close",r);e.pipe(n)}))}const Vo=y.promisify(E.stat);const jo=E.createReadStream;class BlobClient extends StorageClient{constructor(e,t,r,n){n=n||{};let s;let a;if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;if(r&&typeof r!=="string"){n=r}s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl());this.blobContext=new Blob$1(this.storageClientContext);this._snapshot=getURLParameter(this.url,ao.Parameters.SNAPSHOT);this._versionId=getURLParameter(this.url,ao.Parameters.VERSIONID)}get name(){return this._name}get containerName(){return this._containerName}withSnapshot(e){return new BlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}withVersion(e){return new BlobClient(setURLParameter(this.url,ao.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)}getAppendBlobClient(){return new AppendBlobClient(this.url,this.pipeline)}getBlockBlobClient(){return new BlockBlobClient(this.url,this.pipeline)}getPageBlobClient(){return new PageBlobClient(this.url,this.pipeline)}async download(e=0,t,r={}){var n;r.conditions=r.conditions||{};r.conditions=r.conditions||{};ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);const{span:a,updatedOptions:o}=Do("BlobClient-download",r);try{const s=await this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:i.isNode?undefined:r.onProgress},range:e===0&&!t?undefined:rangeToString({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},convertTracingToRequestOptionsBase(o)));const a=Object.assign(Object.assign({},s),{_response:s._response,objectReplicationDestinationPolicyId:s.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(s.objectReplicationRules)});if(!i.isNode){return a}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=io}if(s.contentLength===undefined){throw new RangeError(`File download response doesn't contain valid content length header`)}if(!s.etag){throw new RangeError(`File download response doesn't contain valid etag header`)}return new BlobDownloadResponse(a,(async t=>{var i;const n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||s.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions},range:rangeToString({count:e+s.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},n))).readableStreamBody}),e,s.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async exists(e={}){const{span:t,updatedOptions:r}=Do("BlobClient-exists",e);try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:r.tracingOptions});return true}catch(e){if(e.statusCode===404){return false}else if(e.statusCode===409&&(e.details.errorCode===bo||e.details.errorCode===Io)){return true}t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async getProperties(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-getProperties",e);try{e.conditions=e.conditions||{};ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);const r=await this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},convertTracingToRequestOptionsBase(i)));return Object.assign(Object.assign({},r),{_response:r._response,objectReplicationDestinationPolicyId:r.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(r.objectReplicationRules)})}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async delete(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-delete",e);e.conditions=e.conditions||{};try{return await this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async deleteIfExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("BlobClient-deleteIfExists",e);try{const e=await this.delete(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async undelete(e={}){const{span:t,updatedOptions:r}=Do("BlobClient-undelete",e);try{return await this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setHTTPHeaders(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setHTTPHeaders",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setMetadata(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setMetadata",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,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},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setTags(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setTags",t);try{return await this.blobContext.setTags(Object.assign(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})},convertTracingToRequestOptionsBase(n)),{tags:toBlobTags(e)}))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async getTags(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-getTags",e);try{const r=await this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)));const n=Object.assign(Object.assign({},r),{_response:r._response,tags:toTags({blobTagSet:r.blobTagSet})||{}});return n}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async createSnapshot(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-createSnapshot",e);e.conditions=e.conditions||{};try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return await this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async beginCopyFromURL(e,t={}){const r={abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)};const i=new BlobBeginCopyFromUrlPoller({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});await i.poll();return i}async abortCopyFromURL(e,t={}){const{span:r,updatedOptions:i}=Do("BlobClient-abortCopyFromURL",t);try{return await this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async syncCopyFromURL(e,t={}){var r,i,n;const{span:a,updatedOptions:o}=Do("BlobClient-syncCopyFromURL",t);t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};try{return await this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),immutabilityPolicyExpiry:(i=t.immutabilityPolicy)===null||i===void 0?void 0:i.expiriesOn,immutabilityPolicyMode:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async setAccessTier(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setAccessTier",t);try{return await this.blobContext.setTier(toAccessTier(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}),rehydratePriority:t.rehydratePriority},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async downloadToBuffer(e,t,r,i={}){let n;let a=0;let o=0;let l=i;if(e instanceof Buffer){n=e;a=t||0;o=typeof r==="number"?r:0}else{a=typeof e==="number"?e:0;o=typeof t==="number"?t:0;l=r||{}}const{span:c,updatedOptions:p}=Do("BlobClient-downloadToBuffer",l);try{if(!l.blockSize){l.blockSize=0}if(l.blockSize<0){throw new RangeError("blockSize option must be >= 0")}if(l.blockSize===0){l.blockSize=ro}if(a<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!l.conditions){l.conditions={}}if(!o){const e=await this.getProperties(Object.assign(Object.assign({},l),{tracingOptions:Object.assign(Object.assign({},l.tracingOptions),convertTracingToRequestOptionsBase(p))}));o=e.contentLength-a;if(o<0){throw new RangeError(`offset ${a} shouldn't be larger than blob size ${e.contentLength}`)}}if(!n){try{n=Buffer.alloc(o)}catch(e){throw new Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}}if(n.length{let t=a+o;if(r+l.blockSize{if(!(this.credential instanceof StorageSharedKeyCredential)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}const r=generateBlobSASQueryParameters(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).toString();t(appendToURLQuery(this.url,r))}))}async deleteImmutabilityPolicy(e){const{span:t,updatedOptions:r}=Do("BlobClient-deleteImmutabilityPolicy",e);try{return await this.blobContext.deleteImmutabilityPolicy(Object.assign({abortSignal:e===null||e===void 0?void 0:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setImmutabilityPolicy(e,t){const{span:r,updatedOptions:i}=Do("BlobClient-setImmutabilityPolicy",t);try{return await this.blobContext.setImmutabilityPolicy(Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal,immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,modifiedAccessConditions:t===null||t===void 0?void 0:t.modifiedAccessCondition},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async setLegalHold(e,t){const{span:r,updatedOptions:i}=Do("BlobClient-setLegalHold",t);try{return await this.blobContext.setLegalHold(e,Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}}class AppendBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.appendBlobContext=new AppendBlob(this.storageClientContext)}withSnapshot(e){return new AppendBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e={}){var t,r,i;const{span:n,updatedOptions:a}=Do("AppendBlobClient-create",e);e.conditions=e.conditions||{};try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return await this.appendBlobContext.create(0,Object.assign({abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:(r=e.immutabilityPolicy)===null||r===void 0?void 0:r.expiriesOn,immutabilityPolicyMode:(i=e.immutabilityPolicy)===null||i===void 0?void 0:i.policyMode,legalHold:e.legalHold,blobTagsString:toBlobTagsString(e.tags)},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async createIfNotExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("AppendBlobClient-createIfNotExists",e);const a={ifNoneMatch:po};try{const e=await this.create(Object.assign(Object.assign({},n),{conditions:a}));return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobAlreadyExists"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async seal(e={}){var t;const{span:r,updatedOptions:i}=Do("AppendBlobClient-seal",e);e.conditions=e.conditions||{};try{return await this.appendBlobContext.seal(Object.assign({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async appendBlock(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("AppendBlobClient-appendBlock",r);r.conditions=r.conditions||{};try{ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);return await this.appendBlobContext.appendBlock(t,e,Object.assign({abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async appendBlockFromURL(e,t,r,i={}){var n;const{span:a,updatedOptions:o}=Do("AppendBlobClient-appendBlockFromURL",i);i.conditions=i.conditions||{};i.sourceConditions=i.sourceConditions||{};try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.appendBlobContext.appendBlockFromUrl(e,0,Object.assign({abortSignal:i.abortSignal,sourceRange:rangeToString({offset:t,count:r}),sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,appendPositionAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:i.sourceConditions.ifMatch,sourceIfModifiedSince:i.sourceConditions.ifModifiedSince,sourceIfNoneMatch:i.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:i.sourceConditions.ifUnmodifiedSince},copySourceAuthorization:httpAuthorizationToString(i.sourceAuthorization),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}}class BlockBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;if(r&&typeof r!=="string"){n=r}s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.blockBlobContext=new BlockBlob(this.storageClientContext);this._blobContext=new Blob$1(this.storageClientContext)}withSnapshot(e){return new BlockBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async query(e,t={}){var r;ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);const{span:n,updatedOptions:a}=Do("BlockBlobClient-query",t);try{if(!i.isNode){throw new Error("This operation currently is only supported in Node.js.")}ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);const n=await this._blobContext.query(Object.assign({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:toQuerySerialization(t.inputTextConfiguration),outputSerialization:toQuerySerialization(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey},convertTracingToRequestOptionsBase(a)));return new BlobQueryResponse(n,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async upload(e,t,r={}){var i,n,a;r.conditions=r.conditions||{};const{span:o,updatedOptions:l}=Do("BlockBlobClient-upload",r);try{ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);return await this.blockBlobContext.upload(t,e,Object.assign({abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:(n=r.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=r.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:r.legalHold,tier:toAccessTier(r.tier),blobTagsString:toBlobTagsString(r.tags)},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async syncUploadFromURL(e,t={}){var r,i,n,a,o;t.conditions=t.conditions||{};const{span:l,updatedOptions:c}=Do("BlockBlobClient-syncUploadFromURL",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:t.conditions.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:(r=t.sourceConditions)===null||r===void 0?void 0:r.ifMatch,sourceIfModifiedSince:(i=t.sourceConditions)===null||i===void 0?void 0:i.ifModifiedSince,sourceIfNoneMatch:(n=t.sourceConditions)===null||n===void 0?void 0:n.ifNoneMatch,sourceIfUnmodifiedSince:(a=t.sourceConditions)===null||a===void 0?void 0:a.ifUnmodifiedSince,sourceIfTags:(o=t.sourceConditions)===null||o===void 0?void 0:o.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),copySourceTags:t.copySourceTags}),convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async stageBlock(e,t,r,i={}){const{span:n,updatedOptions:a}=Do("BlockBlobClient-stageBlock",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.blockBlobContext.stageBlock(e,r,t,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,requestOptions:{onUploadProgress:i.onProgress},transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async stageBlockFromURL(e,t,r=0,i,n={}){const{span:a,updatedOptions:o}=Do("BlockBlobClient-stageBlockFromURL",n);try{ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps);return await this.blockBlobContext.stageBlockFromURL(e,0,t,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,sourceRange:r===0&&!i?undefined:rangeToString({offset:r,count:i}),cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async commitBlockList(e,t={}){var r,i,n;t.conditions=t.conditions||{};const{span:a,updatedOptions:o}=Do("BlockBlobClient-commitBlockList",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blockBlobContext.commitBlockList({latest:e},Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,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:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async getBlockList(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlockBlobClient-getBlockList",t);try{const i=await this.blockBlobContext.getBlockList(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})},convertTracingToRequestOptionsBase(n)));if(!i.committedBlocks){i.committedBlocks=[]}if(!i.uncommittedBlocks){i.uncommittedBlocks=[]}return i}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async uploadData(e,t={}){const{span:r,updatedOptions:n}=Do("BlockBlobClient-uploadData",t);try{if(i.isNode){let t;if(e instanceof Buffer){t=e}else if(e instanceof ArrayBuffer){t=Buffer.from(e)}else{e=e;t=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}return this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.byteLength,n)}else{const t=new Blob([e]);return this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.size,n)}}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadBrowserData(e,t={}){const{span:r,updatedOptions:i}=Do("BlockBlobClient-uploadBrowserData",t);try{const t=new Blob([e]);return await this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.size,i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadSeekableInternal(e,t,r={}){if(!r.blockSize){r.blockSize=0}if(r.blockSize<0||r.blockSize>Za){throw new RangeError(`blockSize option must be >= 0 and <= ${Za}`)}if(r.maxSingleShotSize!==0&&!r.maxSingleShotSize){r.maxSingleShotSize=Ka}if(r.maxSingleShotSize<0||r.maxSingleShotSize>Ka){throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${Ka}`)}if(r.blockSize===0){if(t>Za*eo){throw new RangeError(`${t} is too larger to upload to a block blob.`)}if(t>r.maxSingleShotSize){r.blockSize=Math.ceil(t/eo);if(r.blockSizeeo){throw new RangeError(`The buffer's size is too big or the BlockSize is too small;`+`the number of blocks must be <= ${eo}`)}const s=[];const o=i.generateUuid();let l=0;const c=new Batch(r.concurrency);for(let i=0;i{const c=generateBlockID(o,i);const p=r.blockSize*i;const d=i===n-1?t:p+r.blockSize;const A=d-p;s.push(c);await this.stageBlock(c,e(p,A),A,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:a.tracingOptions});l+=A;if(r.onProgress){r.onProgress({loadedBytes:l})}}))}await c.do();return this.commitBlockList(s,a)}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadFile(e,t={}){const{span:r,updatedOptions:i}=Do("BlockBlobClient-uploadFile",t);try{const r=(await Vo(e)).size;return await this.uploadSeekableInternal(((t,r)=>()=>jo(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:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadStream(e,t=to,r=5,n={}){if(!n.blobHTTPHeaders){n.blobHTTPHeaders={}}if(!n.conditions){n.conditions={}}const{span:a,updatedOptions:o}=Do("BlockBlobClient-uploadStream",n);try{let s=0;const a=i.generateUuid();let l=0;const c=[];const p=new BufferScheduler(e,t,r,(async(e,t)=>{const r=generateBlockID(a,s);c.push(r);s++;await this.stageBlock(r,e,t,{conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:o.tracingOptions});l+=t;if(n.onProgress){n.onProgress({loadedBytes:l})}}),Math.ceil(r/4*3));await p.do();return await this.commitBlockList(c,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),convertTracingToRequestOptionsBase(o))}))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}}class PageBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(e){return new PageBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e,t={}){var r,i,n;t.conditions=t.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async createIfNotExists(e,t={}){var r,i;const{span:n,updatedOptions:a}=Do("PageBlobClient-createIfNotExists",t);try{const r={ifNoneMatch:po};const i=await this.create(e,Object.assign(Object.assign({},t),{conditions:r,tracingOptions:a.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"){n.setStatus({code:s.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})}n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadPages(e,t,r,i={}){var n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.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){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async uploadPagesFromURL(e,t,r,i,n={}){var a;n.conditions=n.conditions||{};n.sourceConditions=n.sourceConditions||{};const{span:o,updatedOptions:l}=Do("PageBlobClient-uploadPagesFromURL",n);try{ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(e,rangeToString({offset:t,count:i}),0,rangeToString({offset:r,count:i}),Object.assign({abortSignal:n.abortSignal,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,sequenceNumberAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:n.sourceConditions.ifMatch,sourceIfModifiedSince:n.sourceConditions.ifModifiedSince,sourceIfNoneMatch:n.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:n.sourceConditions.ifUnmodifiedSince},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization)},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async clearPages(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async getPageRanges(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async listPageRangesSegment(e=0,t,r,i={}){var n;const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),range:rangeToString({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}listPageRangeItemSegments(e=0,t,r,i={}){return n.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let s;if(!!r||r===undefined){do{s=yield n.__await(this.listPageRangesSegment(e,t,r,i));r=s.continuationToken;yield yield n.__await(yield n.__await(s))}while(r)}}))}listPageRangeItems(e=0,t,r={}){return n.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var i,s;let a;try{for(var o=n.__asyncValues(this.listPageRangeItemSegments(e,t,a,r)),l;l=yield n.__await(o.next()),!l.done;){const e=l.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){i={error:e}}finally{try{if(l&&!l.done&&(s=o.return))yield n.__await(s.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 n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async listPageRangesDiffSegment(e,t,r,i,n){var a;const{span:o,updatedOptions:l}=Do("PageBlobClient-getPageRangesDiffSegment",n);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n===null||n===void 0?void 0:n.abortSignal,leaseAccessConditions:n===null||n===void 0?void 0:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n===null||n===void 0?void 0:n.conditions),{ifTags:(a=n===null||n===void 0?void 0:n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),marker:i,maxPageSize:n===null||n===void 0?void 0:n.maxPageSize},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}listPageRangeDiffItemSegments(e,t,r,i,s){return n.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let a;if(!!i||i===undefined){do{a=yield n.__await(this.listPageRangesDiffSegment(e,t,r,i,s));i=a.continuationToken;yield yield n.__await(yield n.__await(a))}while(i)}}))}listPageRangeDiffItems(e,t,r,i){return n.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var s,a;let o;try{for(var l=n.__asyncValues(this.listPageRangeDiffItemSegments(e,t,r,o,i)),c;c=yield n.__await(l.next()),!c.done;){const e=c.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){s={error:e}}finally{try{if(c&&!c.done&&(a=l.return))yield n.__await(a.call(l))}finally{if(s)throw s.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const n=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next(){return n.next()},[Symbol.asyncIterator](){return this},byPage:(n={})=>this.listPageRangeDiffItemSegments(e,t,r,n.continuationToken,Object.assign({maxPageSize:n.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){var n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),prevSnapshotUrl:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async resize(e,t={}){var r;t.conditions=t.conditions||{};const{span:i,updatedOptions:n}=Do("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(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async updateSequenceNumber(e,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async startCopyIncremental(e,t={}){var r;const{span:i,updatedOptions:n}=Do("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(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}}async function getBodyAsText(e){let t=Buffer.alloc(mo);const r=await streamToBuffer2(e.readableStreamBody,t);t=t.slice(0,r);return t.toString()}function utf8ByteLength(e){return Buffer.byteLength(e)}const zo=": ";const Yo=" ";const Jo=-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}${go}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==oo.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 n=new Array(r);let s=0;let a=0;for(let e=0;e=0&&A{if(this.keys[e]===undefined||this.keys[e]===Wo.UNLOCKED){this.keys[e]=Wo.LOCKED;t()}else{this.onUnlockEvent(e,(()=>{this.keys[e]=Wo.LOCKED;t()}))}}))}static async unlock(e){return new Promise((t=>{if(this.keys[e]===Wo.LOCKED){this.emitUnlockEvent(e)}delete this.keys[e];t()}))}static onUnlockEvent(e,t){if(this.listeners[e]===undefined){this.listeners[e]=[t]}else{this.listeners[e].push(t)}}static emitUnlockEvent(e){if(this.listeners[e]!==undefined&&this.listeners[e].length>0){const t=this.listeners[e].shift();setImmediate((()=>{t.call(this)}))}}}Mutex.keys={};Mutex.listeners={};class BlobBatch{constructor(){this.batch="batch";this.batchRequest=new InnerBatchRequest}getMultiPartContentType(){return this.batchRequest.getMultipartContentType()}getHttpRequestBody(){return this.batchRequest.getHttpRequestBody()}getSubRequests(){return this.batchRequest.getSubRequests()}async addSubRequestInternal(e,t){await Mutex.lock(this.batch);try{this.batchRequest.preAddSubRequest(e);await t();this.batchRequest.postAddSubRequest(e)}finally{await Mutex.unlock(this.batch)}}setBatchType(e){if(!this.batchType){this.batchType=e}if(this.batchType!==e){throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`)}}async deleteBlob(e,t,r){let n;let a;if(typeof e==="string"&&(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t))){n=e;a=t}else if(e instanceof BlobClient){n=e.url;a=e.credential;r=t}else{throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.")}if(!r){r={}}const{span:o,updatedOptions:l}=Do("BatchDeleteRequest-addSubRequest",r);try{this.setBatchType("delete");await this.addSubRequestInternal({url:n,credential:a},(async()=>{await new BlobClient(n,this.batchRequest.createPipeline(a)).delete(l)}))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async setBlobAccessTier(e,t,r,n){let a;let o;let l;if(typeof e==="string"&&(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t))){a=e;o=t;l=r}else if(e instanceof BlobClient){a=e.url;o=e.credential;l=t;n=r}else{throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.")}if(!n){n={}}const{span:c,updatedOptions:p}=Do("BatchSetTierRequest-addSubRequest",n);try{this.setBatchType("setAccessTier");await this.addSubRequestInternal({url:a,credential:o},(async()=>{await new BlobClient(a,this.batchRequest.createPipeline(o)).setAccessTier(l,p)}))}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}}class InnerBatchRequest{constructor(){this.operationCount=0;this.body="";const e=i.generateUuid();this.boundary=`batch_${e}`;this.subRequestPrefix=`--${this.boundary}${go}${lo.CONTENT_TYPE}: application/http${go}${lo.CONTENT_TRANSFER_ENCODING}: binary`;this.multipartContentType=`multipart/mixed; boundary=${this.boundary}`;this.batchRequestEnding=`--${this.boundary}--`;this.subRequests=new Map}createPipeline(e){const t=e instanceof AnonymousCredential;const r=3+(t?0:1);const n=new Array(r);n[0]=i.deserializationPolicy();n[1]=new BatchHeaderFilterPolicyFactory;if(!t){n[2]=i.isTokenCredential(e)?attachCredential(i.bearerTokenAuthenticationPolicy(e,so),e):e}n[r-1]=new BatchRequestAssemblePolicyFactory(this);return new Pipeline(n,{})}appendSubRequestToBody(e){this.body+=[this.subRequestPrefix,`${lo.CONTENT_ID}: ${this.operationCount}`,"",`${e.method.toString()} ${getURLPathAndQuery(e.url)} ${ho}${go}`].join(go);for(const t of e.headers.headersArray()){this.body+=`${t.name}: ${t.value}${go}`}this.body+=go}preAddSubRequest(e){if(this.operationCount>=uo){throw new RangeError(`Cannot exceed ${uo} sub requests in a single batch`)}const t=getURLPath(e.url);if(!t||t===""){throw new RangeError(`Invalid url for sub request: '${e.url}'`)}}postAddSubRequest(e){this.subRequests.set(this.operationCount,e);this.operationCount++}getHttpRequestBody(){return`${this.body}${this.batchRequestEnding}${go}`}getMultipartContentType(){return this.multipartContentType}getSubRequests(){return this.subRequests}}class BatchRequestAssemblePolicy extends i.BaseRequestPolicy{constructor(e,t,r){super(t,r);this.dummyResponse={request:new i.WebResource,status:200,headers:new i.HttpHeaders};this.batchRequest=e}async sendRequest(e){await this.batchRequest.appendSubRequestToBody(e);return this.dummyResponse}}class BatchRequestAssemblePolicyFactory{constructor(e){this.batchRequest=e}create(e,t){return new BatchRequestAssemblePolicy(this.batchRequest,e,t)}}class BatchHeaderFilterPolicy extends i.BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){let t="";for(const r of e.headers.headersArray()){if(iEqual(r.name,lo.X_MS_VERSION)){t=r.name}}if(t!==""){e.headers.remove(t)}return this._nextPolicy.sendRequest(e)}}class BatchHeaderFilterPolicyFactory{create(e,t){return new BatchHeaderFilterPolicy(e,t)}}class BlobBatchClient{constructor(e,t,r){let i;if(isPipelineLike(t)){i=t}else if(!t){i=newPipeline(new AnonymousCredential,r)}else{i=newPipeline(t,r)}const n=new StorageClientContext(e,i.toServiceClientOptions());const s=getURLPath(e);if(s&&s!=="/"){this.serviceOrContainerContext=new Container(n)}else{this.serviceOrContainerContext=new Service(n)}}createBatch(){return new BlobBatch}async deleteBlobs(e,t,r){const i=new BlobBatch;for(const n of e){if(typeof n==="string"){await i.deleteBlob(n,t,r)}else{await i.deleteBlob(n,t)}}return this.submitBatch(i)}async setBlobsAccessTier(e,t,r,i){const n=new BlobBatch;for(const s of e){if(typeof s==="string"){await n.setBlobAccessTier(s,t,r,i)}else{await n.setBlobAccessTier(s,t,r)}}return this.submitBatch(n)}async submitBatch(e,t={}){if(!e||e.getSubRequests().size===0){throw new RangeError("Batch request should contain one or more sub requests.")}const{span:r,updatedOptions:i}=Do("BlobBatchClient-submitBatch",t);try{const r=e.getHttpRequestBody();const n=await this.serviceOrContainerContext.submitBatch(utf8ByteLength(r),e.getMultiPartContentType(),r,Object.assign(Object.assign({},t),convertTracingToRequestOptionsBase(i)));const s=new BatchResponseParser(n,e.getSubRequests());const a=await s.parseBatchResponse();const o={_response:n._response,contentType:n.contentType,errorCode:n.errorCode,requestId:n.requestId,clientRequestId:n.clientRequestId,version:n.version,subResponses:a.subResponses,subResponsesSucceededCount:a.subResponsesSucceededCount,subResponsesFailedCount:a.subResponsesFailedCount};return o}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}}class ContainerClient extends StorageClient{constructor(e,t,r){let n;let s;r=r||{};if(isPipelineLike(t)){s=e;n=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){s=e;n=newPipeline(t,r)}else if(!t&&typeof t!=="string"){s=e;n=newPipeline(new AnonymousCredential,r)}else if(t&&typeof t==="string"){const a=t;const o=extractConnectionStringParts(e);if(o.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(o.accountName,o.accountKey);s=appendToURLPath(o.url,encodeURIComponent(a));if(!r.proxyOptions){r.proxyOptions=i.getDefaultProxySettings(o.proxyUri)}n=newPipeline(e,r)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(o.kind==="SASConnString"){s=appendToURLPath(o.url,encodeURIComponent(a))+"?"+o.accountSas;n=newPipeline(new AnonymousCredential,r)}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 parameter")}super(s,n);this._containerName=this.getContainerNameFromUrl();this.containerContext=new Container(this.storageClientContext)}get containerName(){return this._containerName}async create(e={}){const{span:t,updatedOptions:r}=Do("ContainerClient-create",e);try{return await this.containerContext.create(Object.assign(Object.assign({},e),convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async createIfNotExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("ContainerClient-createIfNotExists",e);try{const e=await this.create(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="ContainerAlreadyExists"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when creating a container only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async exists(e={}){const{span:t,updatedOptions:r}=Do("ContainerClient-exists",e);try{await this.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions});return true}catch(e){if(e.statusCode===404){t.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when checking container existence"});return false}t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}getBlobClient(e){return new BlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getAppendBlobClient(e){return new AppendBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getBlockBlobClient(e){return new BlockBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getPageBlobClient(e){return new PageBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}async getProperties(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-getProperties",e);try{return await this.containerContext.getProperties(Object.assign(Object.assign({abortSignal:e.abortSignal},e.conditions),convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async delete(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-delete",e);try{return await this.containerContext.delete(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:e.conditions},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async deleteIfExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("ContainerClient-deleteIfExists",e);try{const e=await this.delete(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="ContainerNotFound"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when deleting a container only if it exists."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setMetadata(e,t={}){if(!t.conditions){t.conditions={}}if(t.conditions.ifUnmodifiedSince){throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service")}const{span:r,updatedOptions:i}=Do("ContainerClient-setMetadata",t);try{return await this.containerContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:t.conditions},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async getAccessPolicy(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-getAccessPolicy",e);try{const t=await this.containerContext.getAccessPolicy(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions},convertTracingToRequestOptionsBase(r)));const i={_response:t._response,blobPublicAccess:t.blobPublicAccess,date:t.date,etag:t.etag,errorCode:t.errorCode,lastModified:t.lastModified,requestId:t.requestId,clientRequestId:t.clientRequestId,signedIdentifiers:[],version:t.version};for(const e of t){let t=undefined;if(e.accessPolicy){t={permissions:e.accessPolicy.permissions};if(e.accessPolicy.expiresOn){t.expiresOn=new Date(e.accessPolicy.expiresOn)}if(e.accessPolicy.startsOn){t.startsOn=new Date(e.accessPolicy.startsOn)}}i.signedIdentifiers.push({accessPolicy:t,id:e.id})}return i}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setAccessPolicy(e,t,r={}){r.conditions=r.conditions||{};const{span:i,updatedOptions:n}=Do("ContainerClient-setAccessPolicy",r);try{const i=[];for(const e of t||[]){i.push({accessPolicy:{expiresOn:e.accessPolicy.expiresOn?truncatedISO8061Date(e.accessPolicy.expiresOn):"",permissions:e.accessPolicy.permissions,startsOn:e.accessPolicy.startsOn?truncatedISO8061Date(e.accessPolicy.startsOn):""},id:e.id})}return await this.containerContext.setAccessPolicy(Object.assign({abortSignal:r.abortSignal,access:e,containerAcl:i,leaseAccessConditions:r.conditions,modifiedAccessConditions:r.conditions},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async uploadBlockBlob(e,t,r,i={}){const{span:n,updatedOptions:a}=Do("ContainerClient-uploadBlockBlob",i);try{const i=this.getBlockBlobClient(e);const n=await i.upload(t,r,a);return{blockBlobClient:i,response:n}}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async deleteBlob(e,t={}){const{span:r,updatedOptions:i}=Do("ContainerClient-deleteBlob",t);try{let r=this.getBlobClient(e);if(t.versionId){r=r.withVersion(t.versionId)}return await r.delete(i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async listBlobFlatSegment(e,t={}){const{span:r,updatedOptions:i}=Do("ContainerClient-listBlobFlatSegment",t);try{const r=await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({marker:e},t),convertTracingToRequestOptionsBase(i)));const n=Object.assign(Object.assign({},r),{_response:Object.assign(Object.assign({},r._response),{parsedBody:ConvertInternalResponseOfListBlobFlat(r._response.parsedBody)}),segment:Object.assign(Object.assign({},r.segment),{blobItems:r.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)});return t}))})});return n}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async listBlobHierarchySegment(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("ContainerClient-listBlobHierarchySegment",r);try{const n=await this.containerContext.listBlobHierarchySegment(e,Object.assign(Object.assign({marker:t},r),convertTracingToRequestOptionsBase(a)));const s=Object.assign(Object.assign({},n),{_response:Object.assign(Object.assign({},n._response),{parsedBody:ConvertInternalResponseOfListBlobHierarchy(n._response.parsedBody)}),segment:Object.assign(Object.assign({},n.segment),{blobItems:n.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)});return t})),blobPrefixes:(i=n.segment.blobPrefixes)===null||i===void 0?void 0:i.map((e=>{const t={name:BlobNameToString(e.name)};return t}))})});return s}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}listSegments(e,t={}){return n.__asyncGenerator(this,arguments,(function*listSegments_1(){let r;if(!!e||e===undefined){do{r=yield n.__await(this.listBlobFlatSegment(e,t));e=r.continuationToken;yield yield n.__await(yield n.__await(r))}while(e)}}))}listItems(e={}){return n.__asyncGenerator(this,arguments,(function*listItems_1(){var t,r;let i;try{for(var s=n.__asyncValues(this.listSegments(i,e)),a;a=yield n.__await(s.next()),!a.done;){const e=a.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.segment.blobItems)))}}catch(e){t={error:e}}finally{try{if(a&&!a.done&&(r=s.return))yield n.__await(r.call(s))}finally{if(t)throw t.error}}}))}listBlobsFlat(e={}){const t=[];if(e.includeCopy){t.push("copy")}if(e.includeDeleted){t.push("deleted")}if(e.includeMetadata){t.push("metadata")}if(e.includeSnapshots){t.push("snapshots")}if(e.includeVersions){t.push("versions")}if(e.includeUncommitedBlobs){t.push("uncommittedblobs")}if(e.includeTags){t.push("tags")}if(e.includeDeletedWithVersions){t.push("deletedwithversions")}if(e.includeImmutabilityPolicy){t.push("immutabilitypolicy")}if(e.includeLegalHold){t.push("legalhold")}if(e.prefix===""){e.prefix=undefined}const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{});const i=this.listItems(r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}listHierarchySegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*listHierarchySegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.listBlobHierarchySegment(e,t,r));t=i.continuationToken;yield yield n.__await(yield n.__await(i))}while(t)}}))}listItemsByHierarchy(e,t={}){return n.__asyncGenerator(this,arguments,(function*listItemsByHierarchy_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.listHierarchySegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;const t=e.segment;if(t.blobPrefixes){for(const e of t.blobPrefixes){yield yield n.__await(Object.assign({kind:"prefix"},e))}}for(const e of t.blobItems){yield yield n.__await(Object.assign({kind:"blob"},e))}}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}listBlobsByHierarchy(e,t={}){if(e===""){throw new RangeError("delimiter should contain one or more characters")}const r=[];if(t.includeCopy){r.push("copy")}if(t.includeDeleted){r.push("deleted")}if(t.includeMetadata){r.push("metadata")}if(t.includeSnapshots){r.push("snapshots")}if(t.includeVersions){r.push("versions")}if(t.includeUncommitedBlobs){r.push("uncommittedblobs")}if(t.includeTags){r.push("tags")}if(t.includeDeletedWithVersions){r.push("deletedwithversions")}if(t.includeImmutabilityPolicy){r.push("immutabilitypolicy")}if(t.includeLegalHold){r.push("legalhold")}if(t.prefix===""){t.prefix=undefined}const i=Object.assign(Object.assign({},t),r.length>0?{include:r}:{});const n=this.listItemsByHierarchy(e,i);return{async next(){return n.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.listHierarchySegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},i))}}async findBlobsByTagsSegment(e,t,r={}){const{span:i,updatedOptions:n}=Do("ContainerClient-findBlobsByTagsSegment",r);try{const i=await this.containerContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize},convertTracingToRequestOptionsBase(n)));const s=Object.assign(Object.assign({},i),{_response:i._response,blobs:i.blobs.map((e=>{var t;let r="";if(((t=e.tags)===null||t===void 0?void 0:t.blobTagSet.length)===1){r=e.tags.blobTagSet[0].value}return Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))});return s}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}findBlobsByTagsSegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsSegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.findBlobsByTagsSegment(e,t,r));i.blobs=i.blobs||[];t=i.continuationToken;yield yield n.__await(i)}while(t)}}))}findBlobsByTagsItems(e,t={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsItems_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.findBlobsByTagsSegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.blobs)))}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t);const i=this.findBlobsByTagsItems(e,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}getContainerNameFromUrl(){let e;try{const t=i.URLBuilder.parse(this.url);if(t.getHost().split(".")[1]==="blob"){e=t.getPath().split("/")[1]}else if(isIpEndpointStyle(t)){e=t.getPath().split("/")[2]}else{e=t.getPath().split("/")[1]}e=decodeURIComponent(e);if(!e){throw new Error("Provided containerName is invalid.")}return e}catch(e){throw new Error("Unable to extract containerName with provided information.")}}generateSasUrl(e){return new Promise((t=>{if(!(this.credential instanceof StorageSharedKeyCredential)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}const r=generateBlobSASQueryParameters(Object.assign({containerName:this._containerName},e),this.credential).toString();t(appendToURLQuery(this.url,r))}))}getBlobBatchClient(){return new BlobBatchClient(this.url,this.pipeline)}}class AccountSASPermissions{constructor(){this.read=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.add=false;this.create=false;this.update=false;this.process=false;this.tag=false;this.filter=false;this.setImmutabilityPolicy=false;this.permanentDelete=false}static parse(e){const t=new AccountSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"x":t.deleteVersion=true;break;case"l":t.list=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"u":t.update=true;break;case"p":t.process=true;break;case"t":t.tag=true;break;case"f":t.filter=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;default:throw new RangeError(`Invalid permission character: ${r}`)}}return t}static from(e){const t=new AccountSASPermissions;if(e.read){t.read=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.deleteVersion){t.deleteVersion=true}if(e.filter){t.filter=true}if(e.tag){t.tag=true}if(e.list){t.list=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.update){t.update=true}if(e.process){t.process=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.filter){e.push("f")}if(this.tag){e.push("t")}if(this.list){e.push("l")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.update){e.push("u")}if(this.process){e.push("p")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}return e.join("")}}class AccountSASResourceTypes{constructor(){this.service=false;this.container=false;this.object=false}static parse(e){const t=new AccountSASResourceTypes;for(const r of e){switch(r){case"s":t.service=true;break;case"c":t.container=true;break;case"o":t.object=true;break;default:throw new RangeError(`Invalid resource type: ${r}`)}}return t}toString(){const e=[];if(this.service){e.push("s")}if(this.container){e.push("c")}if(this.object){e.push("o")}return e.join("")}}class AccountSASServices{constructor(){this.blob=false;this.file=false;this.queue=false;this.table=false}static parse(e){const t=new AccountSASServices;for(const r of e){switch(r){case"b":t.blob=true;break;case"f":t.file=true;break;case"q":t.queue=true;break;case"t":t.table=true;break;default:throw new RangeError(`Invalid service character: ${r}`)}}return t}toString(){const e=[];if(this.blob){e.push("b")}if(this.table){e.push("t")}if(this.queue){e.push("q")}if(this.file){e.push("f")}return e.join("")}}function generateAccountSASQueryParameters(e,t){const r=e.version?e.version:$a;if(e.permissions&&e.permissions.setImmutabilityPolicy&&r<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&r<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.")}if(e.permissions&&e.permissions.permanentDelete&&r<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.")}if(e.permissions&&e.permissions.tag&&r<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission.")}if(e.permissions&&e.permissions.filter&&r<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.")}if(e.encryptionScope&&r<"2020-12-06"){throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.")}const i=AccountSASPermissions.parse(e.permissions.toString());const n=AccountSASServices.parse(e.services).toString();const s=AccountSASResourceTypes.parse(e.resourceTypes).toString();let a;if(r>="2020-12-06"){a=[t.accountName,i,n,s,e.startsOn?truncatedISO8061Date(e.startsOn,false):"",truncatedISO8061Date(e.expiresOn,false),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,e.encryptionScope?e.encryptionScope:"",""].join("\n")}else{a=[t.accountName,i,n,s,e.startsOn?truncatedISO8061Date(e.startsOn,false):"",truncatedISO8061Date(e.expiresOn,false),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,""].join("\n")}const o=t.computeHMACSHA256(a);return new SASQueryParameters(r,o,i.toString(),n,s,e.protocol,e.startsOn,e.expiresOn,e.ipRange,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,e.encryptionScope)}class BlobServiceClient extends StorageClient{constructor(e,t,r){let n;if(isPipelineLike(t)){n=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){n=newPipeline(t,r)}else{n=newPipeline(new AnonymousCredential,r)}super(e,n);this.serviceContext=new Service(this.storageClientContext)}static fromConnectionString(e,t){t=t||{};const r=extractConnectionStringParts(e);if(r.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(r.accountName,r.accountKey);if(!t.proxyOptions){t.proxyOptions=i.getDefaultProxySettings(r.proxyUri)}const n=newPipeline(e,t);return new BlobServiceClient(r.url,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(r.kind==="SASConnString"){const e=newPipeline(new AnonymousCredential,t);return new BlobServiceClient(r.url+"?"+r.accountSas,e)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}getContainerClient(e){return new ContainerClient(appendToURLPath(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-createContainer",t);try{const t=this.getContainerClient(e);const r=await t.create(i);return{containerClient:t,containerCreateResponse:r}}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async deleteContainer(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-deleteContainer",t);try{const t=this.getContainerClient(e);return await t.delete(i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async undeleteContainer(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-undeleteContainer",r);try{const i=this.getContainerClient(r.destinationContainerName||e);const s=new Container(i["storageClientContext"]);const a=await s.restore(Object.assign({deletedContainerName:e,deletedContainerVersion:t},n));return{containerClient:i,containerUndeleteResponse:a}}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async renameContainer(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("BlobServiceClient-renameContainer",r);try{const n=this.getContainerClient(t);const s=new Container(n["storageClientContext"]);const o=await s.rename(e,Object.assign(Object.assign({},a),{sourceLeaseId:(i=r.sourceCondition)===null||i===void 0?void 0:i.leaseId}));return{containerClient:n,containerRenameResponse:o}}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async getProperties(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setProperties(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-setProperties",t);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:t.abortSignal},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async getStatistics(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async getAccountInfo(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async listContainersSegment(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-listContainersSegment",t);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:t.abortSignal,marker:e},t),{include:typeof t.include==="string"?[t.include]:t.include}),convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async findBlobsByTagsSegment(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-findBlobsByTagsSegment",r);try{const i=await this.serviceContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize},convertTracingToRequestOptionsBase(n)));const s=Object.assign(Object.assign({},i),{_response:i._response,blobs:i.blobs.map((e=>{var t;let r="";if(((t=e.tags)===null||t===void 0?void 0:t.blobTagSet.length)===1){r=e.tags.blobTagSet[0].value}return Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))});return s}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}findBlobsByTagsSegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsSegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.findBlobsByTagsSegment(e,t,r));i.blobs=i.blobs||[];t=i.continuationToken;yield yield n.__await(i)}while(t)}}))}findBlobsByTagsItems(e,t={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsItems_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.findBlobsByTagsSegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.blobs)))}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t);const i=this.findBlobsByTagsItems(e,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}listSegments(e,t={}){return n.__asyncGenerator(this,arguments,(function*listSegments_1(){let r;if(!!e||e===undefined){do{r=yield n.__await(this.listContainersSegment(e,t));r.containerItems=r.containerItems||[];e=r.continuationToken;yield yield n.__await(yield n.__await(r))}while(e)}}))}listItems(e={}){return n.__asyncGenerator(this,arguments,(function*listItems_1(){var t,r;let i;try{for(var s=n.__asyncValues(this.listSegments(i,e)),a;a=yield n.__await(s.next()),!a.done;){const e=a.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.containerItems)))}}catch(e){t={error:e}}finally{try{if(a&&!a.done&&(r=s.return))yield n.__await(r.call(s))}finally{if(t)throw t.error}}}))}listContainers(e={}){if(e.prefix===""){e.prefix=undefined}const t=[];if(e.includeDeleted){t.push("deleted")}if(e.includeMetadata){t.push("metadata")}if(e.includeSystem){t.push("system")}const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{});const i=this.listItems(r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}async getUserDelegationKey(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-getUserDelegationKey",r);try{const i=await this.serviceContext.getUserDelegationKey({startsOn:truncatedISO8061Date(e,false),expiresOn:truncatedISO8061Date(t,false)},Object.assign({abortSignal:r.abortSignal},convertTracingToRequestOptionsBase(n)));const s={signedObjectId:i.signedObjectId,signedTenantId:i.signedTenantId,signedStartsOn:new Date(i.signedStartsOn),signedExpiresOn:new Date(i.signedExpiresOn),signedService:i.signedService,signedVersion:i.signedVersion,value:i.value};const a=Object.assign({_response:i._response,requestId:i.requestId,clientRequestId:i.clientRequestId,version:i.version,date:i.date,errorCode:i.errorCode},s);return a}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}getBlobBatchClient(){return new BlobBatchClient(this.url,this.pipeline)}generateAccountSasUrl(e,t=AccountSASPermissions.parse("r"),r="sco",i={}){if(!(this.credential instanceof StorageSharedKeyCredential)){throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential")}if(e===undefined){const t=new Date;e=new Date(t.getTime()+3600*1e3)}const n=generateAccountSASQueryParameters(Object.assign({permissions:t,expiresOn:e,resourceTypes:r,services:AccountSASServices.parse("b").toString()},i),this.credential).toString();return appendToURLQuery(this.url,n)}}t.KnownEncryptionAlgorithmType=void 0;(function(e){e["AES256"]="AES256"})(t.KnownEncryptionAlgorithmType||(t.KnownEncryptionAlgorithmType={}));Object.defineProperty(t,"BaseRequestPolicy",{enumerable:true,get:function(){return i.BaseRequestPolicy}});Object.defineProperty(t,"HttpHeaders",{enumerable:true,get:function(){return i.HttpHeaders}});Object.defineProperty(t,"RequestPolicyOptions",{enumerable:true,get:function(){return i.RequestPolicyOptions}});Object.defineProperty(t,"RestError",{enumerable:true,get:function(){return i.RestError}});Object.defineProperty(t,"WebResource",{enumerable:true,get:function(){return i.WebResource}});Object.defineProperty(t,"deserializationPolicy",{enumerable:true,get:function(){return i.deserializationPolicy}});t.AccountSASPermissions=AccountSASPermissions;t.AccountSASResourceTypes=AccountSASResourceTypes;t.AccountSASServices=AccountSASServices;t.AnonymousCredential=AnonymousCredential;t.AnonymousCredentialPolicy=AnonymousCredentialPolicy;t.AppendBlobClient=AppendBlobClient;t.BlobBatch=BlobBatch;t.BlobBatchClient=BlobBatchClient;t.BlobClient=BlobClient;t.BlobLeaseClient=BlobLeaseClient;t.BlobSASPermissions=BlobSASPermissions;t.BlobServiceClient=BlobServiceClient;t.BlockBlobClient=BlockBlobClient;t.ContainerClient=ContainerClient;t.ContainerSASPermissions=ContainerSASPermissions;t.Credential=Credential;t.CredentialPolicy=CredentialPolicy;t.PageBlobClient=PageBlobClient;t.Pipeline=Pipeline;t.SASQueryParameters=SASQueryParameters;t.StorageBrowserPolicy=StorageBrowserPolicy;t.StorageBrowserPolicyFactory=StorageBrowserPolicyFactory;t.StorageOAuthScopes=so;t.StorageRetryPolicy=StorageRetryPolicy;t.StorageRetryPolicyFactory=StorageRetryPolicyFactory;t.StorageSharedKeyCredential=StorageSharedKeyCredential;t.StorageSharedKeyCredentialPolicy=StorageSharedKeyCredentialPolicy;t.generateAccountSASQueryParameters=generateAccountSASQueryParameters;t.generateBlobSASQueryParameters=generateBlobSASQueryParameters;t.isPipelineLike=isPipelineLike;t.logger=Wa;t.newPipeline=newPipeline},6361:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.BuildKit=void 0;const a=s(r(2186));const o=s(r(3220));const l=r(9994);const c=r(7991);const p=r(1019);const d=r(1949);class BuildKit{buildx;config;constructor(e){this.config=new p.Config;this.buildx=e?.buildx||new l.Buildx}async getVersion(e){if(!e.buildkit&&e.name){try{return await this.getVersionWithinImage(e.name)}catch(e){a.warning(e)}}return e.buildkit}async getVersionWithinImage(e){a.debug(`BuildKit.getVersionWithinImage nodeName: ${e}`);return d.Exec.getExecOutput(`docker`,["inspect","--format","{{.Config.Image}}",`${l.Buildx.containerNamePrefix}${e}`],{ignoreReturnCode:true,silent:true}).then((e=>{if(e.exitCode==0&&e.stdout.length>0){a.debug(`BuildKit.getVersionWithinImage image: ${e.stdout.trim()}`);return d.Exec.getExecOutput(`docker`,["run","--rm",e.stdout.trim(),"--version"],{ignoreReturnCode:true,silent:true}).then((t=>{if(t.exitCode==0&&t.stdout.length>0){return`${e.stdout.trim()} => ${t.stdout.trim()}`}else if(t.stderr.length>0){throw new Error(e.stderr.trim())}return t.stdout.trim()}))}else if(e.stderr.length>0){throw new Error(e.stderr.trim())}return e.stdout.trim()}))}async versionSatisfies(e,t,r){if(!r){r=await new c.Builder({buildx:this.buildx}).inspect(e)}for(const e of r.nodes){let i=e.buildkit;a.debug(`BuildKit.versionSatisfies ${i}: ${t}`);if(!i){try{i=await this.getVersionWithinImage(e.name||"")}catch(t){a.debug(`BuildKit.versionSatisfies ${e.name}: can't get version`);return false}}a.debug(`BuildKit.versionSatisfies ${e.name}: version ${i}`);if(r.driver=="docker"&&!i.endsWith("-moby")){return false}if(!o.satisfies(i.replace(/-moby$/,""),t)){return false}}return true}}t.BuildKit=BuildKit},1019:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Config=void 0;const n=i(r(7147));const s=r(4051);class Config{resolveFromString(e){return this.resolve(e,false)}resolveFromFile(e){return this.resolve(e,true)}resolve(e,t){if(t){if(!n.default.existsSync(e)){throw new Error(`config file ${e} not found`)}e=n.default.readFileSync(e,{encoding:"utf-8"})}const r=s.Context.tmpName({tmpdir:s.Context.tmpDir()});n.default.writeFileSync(r,e);return r}}t.Config=Config},2008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Bake=void 0;const i=r(9994);const n=r(1949);const s=r(5284);const a=r(8662);class Bake{buildx;constructor(e){this.buildx=e?.buildx||new i.Buildx}async parseDefinitions(e,t,r,i,s,o){const l=["bake"];let c;const p=[];if(e){for(const t of e.map((e=>e.trim()))){if(t.length==0){continue}if(!a.Util.isValidRef(t)){p.push(t);continue}if(c){throw new Error(`Only one remote bake definition is allowed`)}c=t}}if(c){l.push(c)}for(const e of p){l.push("--file",e)}if(r){for(const e of r){l.push("--set",e)}}if(i){l.push("--load")}if(s){l.push("--push")}const d=await this.buildx.getCommand([...l,"--print",...t||[]]);return await n.Exec.getExecOutput(d.command,d.args,{cwd:o,ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(`cannot parse bake definitions: ${e.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`)}return JSON.parse(e.stdout.trim())}))}static hasLocalExporter(e){return s.Inputs.hasExporterType("local",Bake.exporters(e))}static hasTarExporter(e){return s.Inputs.hasExporterType("tar",Bake.exporters(e))}static hasDockerExporter(e,t){return t||s.Inputs.hasExporterType("docker",Bake.exporters(e))}static exporters(e){const t=new Array;for(const r in e.target){const i=e.target[r];if(i.output){t.push(...i.output)}}return t}}t.Bake=Bake},7991:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Builder=void 0;const a=s(r(2186));const o=r(9994);const l=r(1949);class Builder{buildx;constructor(e){this.buildx=e?.buildx||new o.Buildx}async exists(e){const t=await this.buildx.getCommand(["inspect",e]);const r=await l.Exec.getExecOutput(t.command,t.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){a.debug(`Builder.exists cmd err: ${e.stderr.trim()}`);return false}return e.exitCode==0})).catch((e=>{a.debug(`Builder.exists error: ${e}`);return false}));a.debug(`Builder.exists: ${r}`);return r}async inspect(e){const t=await this.buildx.getCommand(["inspect",e]);return await l.Exec.getExecOutput(t.command,t.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr.trim())}return Builder.parseInspect(e.stdout)}))}static parseInspect(e){const t={nodes:[]};let r;let i={};let n;for(const s of e.trim().split(`\n`)){const[e,...a]=s.split(":");const o=e.toLowerCase();const l=a.map((e=>e.trim())).join(":");if(e.length==0){continue}switch(true){case o=="name":{r=undefined;if(t.name==undefined){t.name=l}else{if(n&&i.gcPolicy){i.gcPolicy.push(n);n=undefined}if(i.name){t.nodes.push(i)}i={name:l}}break}case o=="driver":{r=undefined;t.driver=l;break}case o=="last activity":{r=undefined;t.lastActivity=new Date(l);break}case o=="endpoint":{r=undefined;i.endpoint=l;break}case o=="driver options":{r=undefined;i["driver-opts"]=(l.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map((e=>e.replace(/^(.*)="(.*)"$/g,"$1=$2")));break}case o=="status":{r=undefined;i.status=l;break}case o=="flags":{r=undefined;i["buildkitd-flags"]=l;break}case o=="buildkit":{r=undefined;i.buildkit=l;break}case o=="platforms":{r=undefined;if(!l){break}let e=[];if(l.includes("*")){for(const t of l.split(", ")){if(t.includes("*")){e.push(t.replace(/\*/g,""))}}}else{e=l.split(", ")}i.platforms=e.join(",");break}case o=="labels":{r="label";i.labels={};break}case o.startsWith("gc policy rule#"):{r="gcpolicy";if(i.gcPolicy&&n){i.gcPolicy.push(n);n=undefined}break}default:{switch(r||""){case"label":{i.labels=i.labels||{};i.labels[e.trim()]=l;break}case"gcpolicy":{i.gcPolicy=i.gcPolicy||[];n=n||{};switch(o.trim()){case"all":{n.all=l=="true";break}case"filters":{if(l){n.filter=l.split(",")}break}case"keep duration":{n.keepDuration=l;break}case"keep bytes":{n.keepBytes=l;break}}break}}}}}if(n&&i.gcPolicy){i.gcPolicy.push(n)}if(i.name){t.nodes.push(i)}return t}}t.Builder=Builder},9994:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Buildx=void 0;const o=a(r(7147));const l=a(r(1017));const c=s(r(2186));const p=s(r(3220));const d=r(976);const A=r(1949);class Buildx{_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone;this._version="";this._versionOnce=false}static get configDir(){return process.env.BUILDX_CONFIG||l.default.join(d.Docker.configDir,"buildx")}static get certsDir(){return l.default.join(Buildx.configDir,"certs")}async isStandalone(){const e=this._standalone??!await d.Docker.isAvailable();c.debug(`Buildx.isStandalone: ${e}`);return e}async getCommand(e){const t=await this.isStandalone();return{command:t?"buildx":"docker",args:t?e:["buildx",...e]}}async isAvailable(){const e=await this.getCommand([]);const t=await A.Exec.getExecOutput(e.command,e.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){c.debug(`Buildx.isAvailable cmd err: ${e.stderr.trim()}`);return false}return e.exitCode==0})).catch((e=>{c.debug(`Buildx.isAvailable error: ${e}`);return false}));c.debug(`Buildx.isAvailable: ${t}`);return t}async printInspect(e){const t=await this.getCommand(["inspect",e]);await A.Exec.exec(t.command,t.args,{failOnStdErr:false})}async version(){if(this._versionOnce){return this._version}this._versionOnce=true;const e=await this.getCommand(["version"]);this._version=await A.Exec.getExecOutput(e.command,e.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr.trim())}return Buildx.parseVersion(e.stdout.trim())}));return this._version}async printVersion(){const e=await this.getCommand(["version"]);await A.Exec.exec(e.command,e.args,{failOnStdErr:false})}static parseVersion(e){const t=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!t){throw new Error(`Cannot parse buildx version`)}return t[1]}async versionSatisfies(e,t){const r=t??await this.version();if(!r){c.debug(`Buildx.versionSatisfies false: undefined version`);return false}const i=p.satisfies(r,e)||/^[0-9a-f]{7}$/.exec(r)!==null;c.debug(`Buildx.versionSatisfies ${r} statisfies ${e}: ${i}`);return i}static resolveCertsDriverOpts(e,t,r){let i;try{i=new URL(t)}catch(e){return[]}if(i.protocol!="tcp:"){return[]}const n=[];if(Object.keys(r).length==0){return n}let s=i.hostname;if(i.port.length>0){s+=`-${i.port}`}if(r.cacert!==undefined){const e=l.default.join(Buildx.certsDir,`cacert_${s}.pem`);o.default.writeFileSync(e,r.cacert);n.push(`cacert=${e}`)}if(r.cert!==undefined){const e=l.default.join(Buildx.certsDir,`cert_${s}.pem`);o.default.writeFileSync(e,r.cert);n.push(`cert=${e}`)}if(r.key!==undefined){const e=l.default.join(Buildx.certsDir,`key_${s}.pem`);o.default.writeFileSync(e,r.key);n.push(`key=${e}`)}if(e!="remote"){return[]}return n}}t.Buildx=Buildx},5284:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Inputs=void 0;const o=a(r(7147));const l=a(r(1017));const c=s(r(2186));const p=r(4393);const d=r(4051);const A=r(6276);const parseKvp=e=>{const t=e.indexOf("=");const r=e.substring(0,t);const i=e.substring(t+1);if(r.length==0||i.length==0){throw new Error(`${e} is not a valid secret`)}return[r,i]};class Inputs{static getBuildImageIDFilePath(){return l.default.join(d.Context.tmpDir(),"iidfile")}static getBuildMetadataFilePath(){return l.default.join(d.Context.tmpDir(),"metadata-file")}static resolveBuildImageID(){const e=Inputs.getBuildImageIDFilePath();if(!o.default.existsSync(e)){return undefined}return o.default.readFileSync(e,{encoding:"utf-8"}).trim()}static resolveBuildMetadata(){const e=Inputs.getBuildMetadataFilePath();if(!o.default.existsSync(e)){return undefined}const t=o.default.readFileSync(e,{encoding:"utf-8"}).trim();if(t==="null"){return undefined}return t}static resolveDigest(){const e=Inputs.resolveBuildMetadata();if(e===undefined){return undefined}const t=JSON.parse(e);if(t["containerimage.digest"]){return t["containerimage.digest"]}return undefined}static resolveBuildSecretString(e){return Inputs.resolveBuildSecret(e,false)}static resolveBuildSecretFile(e){return Inputs.resolveBuildSecret(e,true)}static resolveBuildSecretEnv(e){const[t,r]=parseKvp(e);return`id=${t},env=${r}`}static resolveBuildSecret(e,t){const[r,i]=parseKvp(e);let n=i;if(t){if(!o.default.existsSync(n)){throw new Error(`secret file ${n} not found`)}n=o.default.readFileSync(n,{encoding:"utf-8"})}const s=d.Context.tmpName({tmpdir:d.Context.tmpDir()});o.default.writeFileSync(s,n);return`id=${r},src=${s}`}static getProvenanceInput(e){const t=c.getInput(e);if(!t){return t}try{return c.getBooleanInput(e)?`builder-id=${A.GitHub.workflowRunURL}`:"false"}catch(e){return Inputs.resolveProvenanceAttrs(t)}}static resolveProvenanceAttrs(e){if(!e){return`builder-id=${A.GitHub.workflowRunURL}`}const t=(0,p.parse)(e,{relaxColumnCount:true,skipEmptyLines:true})[0];for(const r of t){const t=r.toString().split(/(?<=^[^=]+?)=/).map((e=>e.trim()));if(t[0]=="builder-id"){return e}}return`${e},builder-id=${A.GitHub.workflowRunURL}`}static hasLocalExporter(e){return Inputs.hasExporterType("local",e)}static hasTarExporter(e){return Inputs.hasExporterType("tar",e)}static hasDockerExporter(e,t){return t||Inputs.hasExporterType("docker",e)}static hasExporterType(e,t){const r=(0,p.parse)(t.join(`\n`),{delimiter:",",trim:true,columns:false,relaxColumnCount:true});for(const t of r){if(t.length==1&&!t[0].startsWith("type=")){return e=="local"}for(const[r,i]of t.map((e=>e.split("=").map((e=>e.trim()))))){if(r=="type"&&i==e){return true}}}return false}static hasGitAuthTokenSecret(e){for(const t of e){if(t.startsWith("GIT_AUTH_TOKEN=")){return true}}return false}}t.Inputs=Inputs},2262:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Install=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(6255));const A=s(r(7784));const u=s(r(3220));const m=s(r(3837));const g=r(9994);const h=r(1455);const E=r(4051);const y=r(1949);const C=r(976);const b=r(6074);const I=r(8662);class Install{_standalone;constructor(e){this._standalone=e?.standalone}async download(e,t){const r=await Install.getDownloadVersion(e);p.debug(`Install.download version: ${r.version}`);const i=await Install.getRelease(r);p.debug(`Install.download release tag name: ${i.tag_name}`);const n=await this.vspec(i.tag_name);p.debug(`Install.download vspec: ${n}`);const s=u.clean(n)||"";if(!u.valid(s)){throw new Error(`Invalid Buildx version "${n}".`)}const a=new h.Cache({htcName:r.key!="official"?`buildx-dl-bin-${r.key}`:"buildx-dl-bin",htcVersion:n,baseCacheDir:c.default.join(g.Buildx.configDir,".bin"),cacheFile:l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx",ghaNoCache:t});const o=await a.find();if(o){p.info(`Buildx binary found in ${o}`);return o}const d=m.format(r.downloadURL,n,this.filename(n));p.info(`Downloading ${d}`);const E=await A.downloadTool(d);p.debug(`Install.download htcDownloadPath: ${E}`);const y=await a.save(E);p.info(`Cached to ${y}`);return y}async build(e,t){const r=await this.vspec(e);p.debug(`Install.build vspec: ${r}`);const i=new h.Cache({htcName:"buildx-build-bin",htcVersion:r,baseCacheDir:c.default.join(g.Buildx.configDir,".bin"),cacheFile:l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx",ghaNoCache:t});const n=await i.find();if(n){p.info(`Buildx binary found in ${n}`);return n}const s=c.default.join(E.Context.tmpDir(),"buildx-build-cache");const a=await this.buildCommand(e,s);const o=await y.Exec.getExecOutput(a.command,a.args,{ignoreReturnCode:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(`build failed with: ${e.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`)}return`${s}/buildx`}));const d=await i.save(o);p.info(`Cached to ${d}`);return d}async installStandalone(e,t){p.info("Standalone mode");t=t||E.Context.tmpDir();const r=c.default.join(t,"buildx-bin-standalone");if(!o.default.existsSync(r)){o.default.mkdirSync(r,{recursive:true})}const i=l.default.platform()=="win32"?"buildx.exe":"buildx";const n=c.default.join(r,i);o.default.copyFileSync(e,n);p.info("Fixing perms");o.default.chmodSync(n,"0755");p.addPath(r);p.info("Added Buildx to PATH");p.info(`Binary path: ${n}`);return n}async installPlugin(e,t){p.info("Docker plugin mode");t=t||C.Docker.configDir;const r=c.default.join(t,"cli-plugins");if(!o.default.existsSync(r)){o.default.mkdirSync(r,{recursive:true})}const i=l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx";const n=c.default.join(r,i);o.default.copyFileSync(e,n);p.info("Fixing perms");o.default.chmodSync(n,"0755");p.info(`Plugin path: ${n}`);return n}async buildCommand(e,t){const r=await new g.Buildx({standalone:true}).isAvailable();const i=await new g.Buildx({standalone:false}).isAvailable();let n=false;if(await this.isStandalone()&&r){p.debug(`Install.buildCommand: Buildx standalone found, build with it`);n=true}else if(!await this.isStandalone()&&i){p.debug(`Install.buildCommand: Buildx plugin found, build with it`);n=false}else if(r){p.debug(`Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it`);n=true}else if(i){p.debug(`Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it`);n=false}else{throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`)}const s=["build","--target","binaries","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${t}`];if(process.env.GIT_AUTH_TOKEN){s.push("--secret","id=GIT_AUTH_TOKEN")}s.push(e);return await new g.Buildx({standalone:n}).getCommand(s)}async isStandalone(){const e=this._standalone??!await C.Docker.isAvailable();p.debug(`Install.isStandalone: ${e}`);return e}filename(e){let t;switch(l.default.arch()){case"x64":{t="amd64";break}case"ppc64":{t="ppc64le";break}case"arm":{const e=process.config.variables.arm_version;t=e?"arm-v"+e:"arm";break}default:{t=l.default.arch();break}}const r=l.default.platform()=="win32"?"windows":l.default.platform();const i=l.default.platform()=="win32"?".exe":"";return m.format("buildx-v%s.%s-%s%s",e,r,t,i)}async vspec(e){if(!I.Util.isValidRef(e)){const t=e.replace(/^v+|v+$/g,"");p.info(`Use ${t} version spec cache key for ${e}`);return t}let[t,r]=e.split("#");if(r.length==0){r="master"}let i;if(r.match(/^[0-9a-fA-F]{40}$/)){i=r}else{i=await b.Git.remoteSha(t,r,process.env.GIT_AUTH_TOKEN)}const[n,s]=t.substring("https://github.com/".length).split("/");const a=`${n}/${I.Util.trimSuffix(s,".git")}/${i}`;const o=I.Util.hash(a);p.info(`Use ${o} version spec cache key for ${a}`);return o}static async getDownloadVersion(e){let[t,r]=e.split(":");if(!r){r=t;t="official"}switch(t){case"official":{return{key:t,version:r,downloadURL:"https://github.com/docker/buildx/releases/download/v%s/%s",releasesURL:"https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json"}}case"lab":{return{key:t,version:r,downloadURL:"https://github.com/docker/buildx-desktop/releases/download/v%s/%s",releasesURL:"https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json"}}default:{throw new Error(`Cannot find buildx version for ${e}`)}}}static async getRelease(e){const t=new d.HttpClient("docker-actions-toolkit");const r=await t.get(e.releasesURL);const i=await r.readBody();const n=r.message.statusCode||500;if(n>=400){throw new Error(`Failed to get Buildx releases from ${e.releasesURL} with status code ${n}: ${i}`)}const s=JSON.parse(i);if(!s[e.version]){throw new Error(`Cannot find Buildx release ${e.version} in ${e.releasesURL}`)}return s[e.version]}}t.Install=Install},1455:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Cache=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(7784));const A=s(r(7799));const u=s(r(3837));class Cache{opts;ghaCacheKey;ghaNoCache;cacheDir;cachePath;constructor(e){this.opts=e;this.ghaCacheKey=u.format("%s-%s-%s",this.opts.htcName,this.opts.htcVersion,this.platform());this.ghaNoCache=this.opts.ghaNoCache;this.cacheDir=c.default.join(this.opts.baseCacheDir,this.opts.htcVersion,this.platform());this.cachePath=c.default.join(this.cacheDir,this.opts.cacheFile);if(!o.default.existsSync(this.cacheDir)){o.default.mkdirSync(this.cacheDir,{recursive:true})}}async save(e){p.debug(`Cache.save ${e}`);const t=this.copyToCache(e);const r=await d.cacheDir(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());p.debug(`Cache.save cached to hosted tool cache ${r}`);if(!this.ghaNoCache&&A.isFeatureAvailable()){p.debug(`Cache.save caching ${this.ghaCacheKey} to GitHub Actions cache`);await A.saveCache([this.cacheDir],this.ghaCacheKey)}return t}async find(){let e=d.find(this.opts.htcName,this.opts.htcVersion,this.platform());if(e){p.info(`Restored from hosted tool cache ${e}`);return this.copyToCache(`${e}/${this.opts.cacheFile}`)}if(!this.ghaNoCache&&A.isFeatureAvailable()){p.debug(`GitHub Actions cache feature available`);if(await A.restoreCache([this.cacheDir],this.ghaCacheKey)){p.info(`Restored ${this.ghaCacheKey} from GitHub Actions cache`);e=await d.cacheDir(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());p.info(`Restored to hosted tool cache ${e}`);return this.copyToCache(`${e}/${this.opts.cacheFile}`)}}else if(this.ghaNoCache){p.info(`GitHub Actions cache disabled`)}else{p.info(`GitHub Actions cache feature not available`)}return""}copyToCache(e){p.debug(`Copying ${e} to ${this.cachePath}`);o.default.copyFileSync(e,this.cachePath);return this.cachePath}platform(){const e=process.config.variables.arm_version;return`${l.default.platform()}-${l.default.arch()}${e?"v"+e:""}`}}t.Cache=Cache},4051:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Context=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(8517));const d=s(r(5438));const A=r(6276);class Context{static _tmpDir=o.default.mkdtempSync(c.default.join(Context.ensureDirExists(process.env.RUNNER_TEMP||l.default.tmpdir()),"docker-actions-toolkit-"));static ensureDirExists(e){o.default.mkdirSync(e,{recursive:true});return e}static tmpDir(){return Context._tmpDir}static tmpName(e){return p.tmpNameSync(e)}static gitRef(){let e=d.context.ref;if(d.context.sha&&e&&!e.startsWith("refs/")){e=`refs/heads/${d.context.ref}`}if(d.context.sha&&!e.startsWith(`refs/pull/`)){e=d.context.sha}return e}static gitContext(){return`${A.GitHub.serverURL}/${d.context.repo.owner}/${d.context.repo.repo}.git#${Context.gitRef()}`}static provenanceBuilderID(){return`${A.GitHub.serverURL}/${d.context.repo.owner}/${d.context.repo.repo}/actions/runs/${d.context.runId}`}}t.Context=Context},976:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Docker=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(7436));const A=r(1949);class Docker{static get configDir(){return process.env.DOCKER_CONFIG||c.default.join(l.default.homedir(),".docker")}static configFile(){const e=c.default.join(Docker.configDir,"config.json");if(!o.default.existsSync(e)){return undefined}return JSON.parse(o.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await d.which("docker",true).then((e=>{p.debug(`Docker.isAvailable ok: ${e}`);return true})).catch((e=>{p.debug(`Docker.isAvailable error: ${e}`);return false}))}static async context(e){const t=["context","inspect","--format","{{.Name}}"];if(e){t.push(e)}return await A.Exec.getExecOutput(`docker`,t,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr)}return e.stdout.trim()}))}static async printVersion(){await A.Exec.exec("docker",["version"])}static async printInfo(){await A.Exec.exec("docker",["info"])}}t.Docker=Docker},1949:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Exec=void 0;const a=s(r(2186));const o=s(r(1514));class Exec{static async exec(e,t,r){a.debug(`Exec.exec: ${e} ${t?.join(" ")}`);return o.exec(e,t,r)}static async getExecOutput(e,t,r){a.debug(`Exec.getExecOutput: ${e} ${t?.join(" ")}`);return o.getExecOutput(e,t,r)}}t.Exec=Exec},6074:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Git=void 0;const a=s(r(2186));const o=r(6762);const l=r(3044);const c=r(1949);const p=r(6276);const d=r(4087);class Git{static async context(){const e=new d.Context;e.ref=await Git.ref();e.sha=await Git.fullCommit();return e}static async isInsideWorkTree(){return await Git.exec(["rev-parse","--is-inside-work-tree"]).then((e=>e==="true")).catch((()=>false))}static async remoteSha(e,t,r){const i=e.match(/github.com\/([^/]+)\/([^/]+?)(?:\.git)?(\/|$)/);if(r&&i){a.setSecret(r);const n=new(o.Octokit.plugin(l.restEndpointMethods).defaults({baseUrl:p.GitHub.apiURL}))({auth:r});const[s,c]=i.slice(1,3);try{return(await n.rest.repos.listCommits({owner:s,repo:c,sha:t,per_page:1})).data[0].sha}catch(r){throw new Error(`Cannot find remote ref for ${e}#${t}: ${r.message}`)}}return await Git.exec(["ls-remote",e,t]).then((r=>{const[i]=r.split(/[\s\t]/);if(i.length==0){throw new Error(`Cannot find remote ref for ${e}#${t}`)}return i}))}static async remoteURL(){return await Git.exec(["remote","get-url","origin"]).then((e=>{if(e.length==0){return Git.exec(["remote","get-url","upstream"]).then((e=>{if(e.length==0){throw new Error(`Cannot find remote URL for origin or upstream`)}return e}))}return e}))}static async ref(){const e=await Git.isHeadDetached();if(e){return await Git.getDetachedRef()}return await Git.exec(["symbolic-ref","HEAD"])}static async fullCommit(){return await Git.exec(["show","--format=%H","HEAD","--quiet","--"])}static async shortCommit(){return await Git.exec(["show","--format=%h","HEAD","--quiet","--"])}static async tag(){return await Git.exec(["tag","--points-at","HEAD","--sort","-version:creatordate"]).then((e=>{if(e.length==0){return Git.exec(["describe","--tags","--abbrev=0"])}return e.split("\n")[0]}))}static async isHeadDetached(){return await Git.exec(["branch","--show-current"]).then((e=>e.length==0))}static async getDetachedRef(){const e=await Git.exec(["show","-s","--pretty=%D"]);const t=e.match(/^(grafted, )?HEAD, (.*)$/);if(!t||!t[2]){throw new Error(`Cannot find detached HEAD ref in "${e}"`)}const r=t[2].trim();if(r.startsWith("tag: ")){return`refs/tags/${r.split(":")[1].trim()}`}const i=r.match(/^[^/]+\/[^/]+, (.+)$/);if(i){return`refs/heads/${i[1].trim()}`}const n=r.match(/^pull\/\d+\/(head|merge)$/);if(n){return`refs/${r}`}throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await c.Exec.getExecOutput(`git`,e,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr)}return e.stdout.trim()}))}}t.Git=Git},6276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.GitHub=void 0;const a=s(r(2186));const o=s(r(5438));const l=r(2971);class GitHub{octokit;constructor(e){this.octokit=o.getOctokit(`${e?.token}`)}repoData(){return this.octokit.rest.repos.get({...o.context.repo}).then((e=>e.data))}static get context(){return o.context}static get serverURL(){return process.env.GITHUB_SERVER_URL||"https://github.com"}static get apiURL(){return process.env.GITHUB_API_URL||"https://api.github.com"}static get workflowRunURL(){return`${GitHub.serverURL}/${o.context.repo.owner}/${o.context.repo.repo}/actions/runs/${o.context.runId}`}static get actionsRuntimeToken(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";return e?(0,l.jwtDecode)(e):undefined}static async printActionsRuntimeTokenACs(){let e;try{e=GitHub.actionsRuntimeToken}catch(e){throw new Error(`Cannot parse GitHub Actions Runtime Token: ${e.message}`)}if(!e){throw new Error(`ACTIONS_RUNTIME_TOKEN not set`)}try{JSON.parse(`${e.ac}`).forEach((e=>{let t;switch(e.Permission){case 1:t="read";break;case 2:t="write";break;case 3:t="read/write";break;default:t=`unimplemented (${e.Permission})`}a.info(`${e.Scope}: ${t}`)}))}catch(e){throw new Error(`Cannot parse GitHub Actions Runtime Token ACs: ${e.message}`)}}}t.GitHub=GitHub},6618:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.run=void 0;const a=s(r(2186));const o=!!process.env["STATE_isPost"];if(!o){a.saveState("isPost","true")}async function run(e,t){if(!o){try{await e()}catch(e){a.setFailed(e.message)}}else if(t){await t()}}t.run=run},2680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Toolkit=void 0;const i=r(9994);const n=r(2262);const s=r(2008);const a=r(7991);const o=r(6361);const l=r(6276);class Toolkit{github;buildx;buildxInstall;bake;builder;buildkit;constructor(e={}){this.github=new l.GitHub({token:e.githubToken});this.buildx=new i.Buildx;this.buildxInstall=new n.Install;this.bake=new s.Bake({buildx:this.buildx});this.builder=new a.Builder({buildx:this.buildx});this.buildkit=new o.BuildKit({buildx:this.buildx})}}t.Toolkit=Toolkit},8662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Util=void 0;const o=a(r(6113));const l=a(r(7147));const c=s(r(2186));const p=s(r(7436));const d=r(4393);class Util{static getInputList(e,t){return this.getList(c.getInput(e),t)}static getList(e,t){const r=[];if(e==""){return r}const i=(0,d.parse)(e,{columns:false,relaxQuotes:true,comment:t?.comment,relaxColumnCount:true,skipEmptyLines:true,quote:t?.quote});for(const e of i){if(e.length==1){if(t?.ignoreComma){r.push(e[0])}else{r.push(...e[0].split(","))}}else if(!t?.ignoreComma){r.push(...e)}else{r.push(e.join(","))}}return r.filter((e=>e)).map((e=>e.trim()))}static async asyncForEach(e,t){for(let r=0;rsetTimeout(t,e*1e3)))}static hash(e){return o.default.createHash("sha256").update(e).digest("hex")}}t.Util=Util},4274:(e,t,r)=>{"use strict";const i=r(8208);const n=Symbol("max");const s=Symbol("length");const a=Symbol("lengthCalculator");const o=Symbol("allowStale");const l=Symbol("maxAge");const c=Symbol("dispose");const p=Symbol("noDisposeOnSet");const d=Symbol("lruList");const A=Symbol("cache");const u=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[a]=typeof r!=="function"?naiveLength:r;this[o]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[c]=e.dispose;this[p]=e.noDisposeOnSet||false;this[u]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;trim(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[a]){this[a]=e;this[s]=0;this[d].forEach((e=>{e.length=this[a](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[a]}get length(){return this[s]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;r!==null;){const i=r.prev;forEachStep(this,e,r,t);r=i}}forEach(e,t){t=t||this;for(let r=this[d].head;r!==null;){const i=r.next;forEachStep(this,e,r,t);r=i}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){if(this[c]&&this[d]&&this[d].length){this[d].forEach((e=>this[c](e.key,e.value)))}this[A]=new Map;this[d]=new i;this[s]=0}dump(){return this[d].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const i=r?Date.now():0;const o=this[a](t,e);if(this[A].has(e)){if(o>this[n]){del(this,this[A].get(e));return false}const a=this[A].get(e);const l=a.value;if(this[c]){if(!this[p])this[c](e,l.value)}l.now=i;l.maxAge=r;l.value=t;this[s]+=o-l.length;l.length=o;this.get(e);trim(this);return true}const u=new Entry(e,t,o,i,r);if(u.length>this[n]){if(this[c])this[c](e,t);return false}this[s]+=u.length;this[d].unshift(u);this[A].set(e,this[d].head);trim(this);return true}has(e){if(!this[A].has(e))return false;const t=this[A].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[d].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[A].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r];const n=i.e||0;if(n===0)this.set(i.k,i.v);else{const e=n-t;if(e>0){this.set(i.k,i.v,e)}}}}prune(){this[A].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const i=e[A].get(t);if(i){const t=i.value;if(isStale(e,t)){del(e,i);if(!e[o])return undefined}else{if(r){if(e[u])i.value.now=Date.now();e[d].unshiftNode(i)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const trim=e=>{if(e[s]>e[n]){for(let t=e[d].tail;e[s]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[c])e[c](r.key,r.value);e[s]-=r.length;e[A].delete(r.key);e[d].removeNode(t)}};class Entry{constructor(e,t,r,i,n){this.key=e;this.value=t;this.length=r;this.now=i;this.maxAge=n||0}}const forEachStep=(e,t,r,i)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[o])n=undefined}if(n)t.call(i,n.value,n.key,e)};e.exports=LRUCache},5790:(e,t,r)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=i}else{this.semver=new c(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===i||e===i){return true}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}return o(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new p(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new p(this.value,t).test(e.semver)}t=n(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(o(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(o(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const n=r(5326);const{safeRe:s,t:a}=r(7693);const o=r(8822);const l=r(3528);const c=r(3863);const p=r(8330)},8330:(e,t,r)=>{class Range{constructor(e,t){t=s(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof a){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&m)|(this.options.loose&&g);const r=t+":"+e;const i=n.get(r);if(i){return i}const s=this.options.loose;const l=s?c[p.HYPHENRANGELOOSE]:c[p.HYPHENRANGE];e=e.replace(l,hyphenReplace(this.options.includePrerelease));o("hyphen replace",e);e=e.replace(c[p.COMPARATORTRIM],d);o("comparator trim",e);e=e.replace(c[p.TILDETRIM],A);o("tilde trim",e);e=e.replace(c[p.CARETTRIM],u);o("caret trim",e);let h=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(s){h=h.filter((e=>{o("loose invalid filter",e,this.options);return!!e.match(c[p.COMPARATORLOOSE])}))}o("range list",h);const E=new Map;const y=h.map((e=>new a(e,this.options)));for(const e of y){if(isNullSet(e)){return[e]}E.set(e.value,e)}if(E.size>1&&E.has("")){E.delete("")}const C=[...E.values()];n.set(r,C);return C}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const i=e.slice();let n=i.pop();while(r&&i.length){r=i.every((e=>n.intersects(e,t)));n=i.pop()}return r};const parseComparator=(e,t)=>{o("comp",e,t);e=replaceCarets(e,t);o("caret",e);e=replaceTildes(e,t);o("tildes",e);e=replaceXRanges(e,t);o("xrange",e);e=replaceStars(e,t);o("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?c[p.TILDELOOSE]:c[p.TILDE];return e.replace(r,((t,r,i,n,s)=>{o("tilde",e,t,r,i,n,s);let a;if(isX(r)){a=""}else if(isX(i)){a=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`}else if(s){o("replaceTilde pr",s);a=`>=${r}.${i}.${n}-${s} <${r}.${+i+1}.0-0`}else{a=`>=${r}.${i}.${n} <${r}.${+i+1}.0-0`}o("tilde return",a);return a}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{o("caret",e,t);const r=t.loose?c[p.CARETLOOSE]:c[p.CARET];const i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,s,a)=>{o("caret",e,t,r,n,s,a);let l;if(isX(r)){l=""}else if(isX(n)){l=`>=${r}.0.0${i} <${+r+1}.0.0-0`}else if(isX(s)){if(r==="0"){l=`>=${r}.${n}.0${i} <${r}.${+n+1}.0-0`}else{l=`>=${r}.${n}.0${i} <${+r+1}.0.0-0`}}else if(a){o("replaceCaret pr",a);if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${s}-${a} <${r}.${n}.${+s+1}-0`}else{l=`>=${r}.${n}.${s}-${a} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${s}-${a} <${+r+1}.0.0-0`}}else{o("no pr");if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${s}${i} <${r}.${n}.${+s+1}-0`}else{l=`>=${r}.${n}.${s}${i} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${s} <${+r+1}.0.0-0`}}o("caret return",l);return l}))};const replaceXRanges=(e,t)=>{o("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?c[p.XRANGELOOSE]:c[p.XRANGE];return e.replace(r,((r,i,n,s,a,l)=>{o("xRange",e,r,i,n,s,a,l);const c=isX(n);const p=c||isX(s);const d=p||isX(a);const A=d;if(i==="="&&A){i=""}l=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){r="<0.0.0-0"}else{r="*"}}else if(i&&A){if(p){s=0}a=0;if(i===">"){i=">=";if(p){n=+n+1;s=0;a=0}else{s=+s+1;a=0}}else if(i==="<="){i="<";if(p){n=+n+1}else{s=+s+1}}if(i==="<"){l="-0"}r=`${i+n}.${s}.${a}${l}`}else if(p){r=`>=${n}.0.0${l} <${+n+1}.0.0-0`}else if(d){r=`>=${n}.${s}.0${l} <${n}.${+s+1}.0-0`}o("xRange return",r);return r}))};const replaceStars=(e,t)=>{o("replaceStars",e,t);return e.trim().replace(c[p.STAR],"")};const replaceGTE0=(e,t)=>{o("replaceGTE0",e,t);return e.trim().replace(c[t.includePrerelease?p.GTE0PRE:p.GTE0],"")};const hyphenReplace=e=>(t,r,i,n,s,a,o,l,c,p,d,A,u)=>{if(isX(i)){r=""}else if(isX(n)){r=`>=${i}.0.0${e?"-0":""}`}else if(isX(s)){r=`>=${i}.${n}.0${e?"-0":""}`}else if(a){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(c)){l=""}else if(isX(p)){l=`<${+c+1}.0.0-0`}else if(isX(d)){l=`<${c}.${+p+1}.0-0`}else if(A){l=`<=${c}.${p}.${d}-${A}`}else if(e){l=`<${c}.${p}.${+d+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch){return true}}}return false}return true}},3863:(e,t,r)=>{const i=r(3528);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:s}=r(1728);const{safeRe:a,t:o}=r(7693);const l=r(5326);const{compareIdentifiers:c}=r(5212);class SemVer{constructor(e,t){t=l(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}i("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(t===this.prerelease.join(".")&&r===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let i=[t,e];if(r===false){i=[t]}if(c(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=i}}else{this.prerelease=i}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},4909:(e,t,r)=>{const i=r(7269);const clean=(e,t)=>{const r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},8822:(e,t,r)=>{const i=r(2801);const n=r(3610);const s=r(8489);const a=r(9541);const o=r(2351);const l=r(576);const cmp=(e,t,r,c)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return i(e,r,c);case"!=":return n(e,r,c);case">":return s(e,r,c);case">=":return a(e,r,c);case"<":return o(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},6132:(e,t,r)=>{const i=r(3863);const n=r(7269);const{safeRe:s,t:a}=r(7693);const coerce=(e,t)=>{if(e instanceof i){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(s[a.COERCE])}else{let t;while((t=s[a.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}s[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}s[a.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},4081:(e,t,r)=>{const i=r(3863);const compareBuild=(e,t,r)=>{const n=new i(e,r);const s=new i(t,r);return n.compare(s)||n.compareBuild(s)};e.exports=compareBuild},6254:(e,t,r)=>{const i=r(74);const compareLoose=(e,t)=>i(e,t,true);e.exports=compareLoose},74:(e,t,r)=>{const i=r(3863);const compare=(e,t,r)=>new i(e,r).compare(new i(t,r));e.exports=compare},2941:(e,t,r)=>{const i=r(7269);const diff=(e,t)=>{const r=i(e,null,true);const n=i(t,null,true);const s=r.compare(n);if(s===0){return null}const a=s>0;const o=a?r:n;const l=a?n:r;const c=!!o.prerelease.length;const p=!!l.prerelease.length;if(p&&!c){if(!l.patch&&!l.minor){return"major"}if(o.patch){return"patch"}if(o.minor){return"minor"}return"major"}const d=c?"pre":"";if(r.major!==n.major){return d+"major"}if(r.minor!==n.minor){return d+"minor"}if(r.patch!==n.patch){return d+"patch"}return"prerelease"};e.exports=diff},2801:(e,t,r)=>{const i=r(74);const eq=(e,t,r)=>i(e,t,r)===0;e.exports=eq},8489:(e,t,r)=>{const i=r(74);const gt=(e,t,r)=>i(e,t,r)>0;e.exports=gt},9541:(e,t,r)=>{const i=r(74);const gte=(e,t,r)=>i(e,t,r)>=0;e.exports=gte},8300:(e,t,r)=>{const i=r(3863);const inc=(e,t,r,n,s)=>{if(typeof r==="string"){s=n;n=r;r=undefined}try{return new i(e instanceof i?e.version:e,r).inc(t,n,s).version}catch(e){return null}};e.exports=inc},2351:(e,t,r)=>{const i=r(74);const lt=(e,t,r)=>i(e,t,r)<0;e.exports=lt},576:(e,t,r)=>{const i=r(74);const lte=(e,t,r)=>i(e,t,r)<=0;e.exports=lte},6490:(e,t,r)=>{const i=r(3863);const major=(e,t)=>new i(e,t).major;e.exports=major},1313:(e,t,r)=>{const i=r(3863);const minor=(e,t)=>new i(e,t).minor;e.exports=minor},3610:(e,t,r)=>{const i=r(74);const neq=(e,t,r)=>i(e,t,r)!==0;e.exports=neq},7269:(e,t,r)=>{const i=r(3863);const parse=(e,t,r=false)=>{if(e instanceof i){return e}try{return new i(e,t)}catch(e){if(!r){return null}throw e}};e.exports=parse},738:(e,t,r)=>{const i=r(3863);const patch=(e,t)=>new i(e,t).patch;e.exports=patch},3097:(e,t,r)=>{const i=r(7269);const prerelease=(e,t)=>{const r=i(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6440:(e,t,r)=>{const i=r(74);const rcompare=(e,t,r)=>i(t,e,r);e.exports=rcompare},4197:(e,t,r)=>{const i=r(4081);const rsort=(e,t)=>e.sort(((e,r)=>i(r,e,t)));e.exports=rsort},981:(e,t,r)=>{const i=r(8330);const satisfies=(e,t,r)=>{try{t=new i(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},4631:(e,t,r)=>{const i=r(4081);const sort=(e,t)=>e.sort(((e,r)=>i(e,r,t)));e.exports=sort},5995:(e,t,r)=>{const i=r(7269);const valid=(e,t)=>{const r=i(e,t);return r?r.version:null};e.exports=valid},3220:(e,t,r)=>{const i=r(7693);const n=r(1728);const s=r(3863);const a=r(5212);const o=r(7269);const l=r(5995);const c=r(4909);const p=r(8300);const d=r(2941);const A=r(6490);const u=r(1313);const m=r(738);const g=r(3097);const h=r(74);const E=r(6440);const y=r(6254);const C=r(4081);const b=r(4631);const I=r(4197);const B=r(8489);const v=r(2351);const Q=r(2801);const w=r(3610);const x=r(9541);const S=r(576);const N=r(8822);const R=r(6132);const D=r(5790);const T=r(8330);const _=r(981);const k=r(6967);const O=r(473);const P=r(2180);const L=r(3870);const M=r(6040);const U=r(5966);const H=r(9556);const q=r(6632);const G=r(5447);const V=r(2529);const j=r(7542);e.exports={parse:o,valid:l,clean:c,inc:p,diff:d,major:A,minor:u,patch:m,prerelease:g,compare:h,rcompare:E,compareLoose:y,compareBuild:C,sort:b,rsort:I,gt:B,lt:v,eq:Q,neq:w,gte:x,lte:S,cmp:N,coerce:R,Comparator:D,Range:T,satisfies:_,toComparators:k,maxSatisfying:O,minSatisfying:P,minVersion:L,validRange:M,outside:U,gtr:H,ltr:q,intersects:G,simplifyRange:V,subset:j,SemVer:s,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},1728:e=>{const t="2.0.0";const r=256;const i=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;const s=r-6;const a=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:i,RELEASE_TYPES:a,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},3528:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},5212:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const i=t.test(e);const n=t.test(r);if(i&&n){e=+e;r=+r}return e===r?0:i&&!n?-1:n&&!i?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},5326:e=>{const t=Object.freeze({loose:true});const r=Object.freeze({});const parseOptions=e=>{if(!e){return r}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},7693:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=r(1728);const a=r(3528);t=e.exports={};const o=t.re=[];const l=t.safeRe=[];const c=t.src=[];const p=t.t={};let d=0;const A="[a-zA-Z0-9-]";const u=[["\\s",1],["\\d",s],[A,n]];const makeSafeRegex=e=>{for(const[t,r]of u){e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`)}return e};const createToken=(e,t,r)=>{const i=makeSafeRegex(t);const n=d++;a(e,n,t);p[e]=n;c[n]=t;o[n]=new RegExp(t,r?"g":undefined);l[n]=new RegExp(i,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${A}*`);createToken("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.`+`(${c[p.NUMERICIDENTIFIER]})\\.`+`(${c[p.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.`+`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.`+`(${c[p.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${c[p.NUMERICIDENTIFIER]}|${c[p.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NUMERICIDENTIFIERLOOSE]}|${c[p.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${A}+`);createToken("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`);createToken("FULL",`^${c[p.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`);createToken("LOOSE",`^${c[p.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})`+`(?:\\.(${c[p.XRANGEIDENTIFIER]})`+`(?:\\.(${c[p.XRANGEIDENTIFIER]})`+`(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${i}})`+`(?:\\.(\\d{1,${i}}))?`+`(?:\\.(\\d{1,${i}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",c[p.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${c[p.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${c[p.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9556:(e,t,r)=>{const i=r(5966);const gtr=(e,t,r)=>i(e,t,">",r);e.exports=gtr},5447:(e,t,r)=>{const i=r(8330);const intersects=(e,t,r)=>{e=new i(e,r);t=new i(t,r);return e.intersects(t,r)};e.exports=intersects},6632:(e,t,r)=>{const i=r(5966);const ltr=(e,t,r)=>i(e,t,"<",r);e.exports=ltr},473:(e,t,r)=>{const i=r(3863);const n=r(8330);const maxSatisfying=(e,t,r)=>{let s=null;let a=null;let o=null;try{o=new n(t,r)}catch(e){return null}e.forEach((e=>{if(o.test(e)){if(!s||a.compare(e)===-1){s=e;a=new i(s,r)}}}));return s};e.exports=maxSatisfying},2180:(e,t,r)=>{const i=r(3863);const n=r(8330);const minSatisfying=(e,t,r)=>{let s=null;let a=null;let o=null;try{o=new n(t,r)}catch(e){return null}e.forEach((e=>{if(o.test(e)){if(!s||a.compare(e)===1){s=e;a=new i(s,r)}}}));return s};e.exports=minSatisfying},3870:(e,t,r)=>{const i=r(3863);const n=r(8330);const s=r(8489);const minVersion=(e,t)=>{e=new n(e,t);let r=new i("0.0.0");if(e.test(r)){return r}r=new i("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new i(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!a||s(t,a)){a=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(a&&(!r||s(r,a))){r=a}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},5966:(e,t,r)=>{const i=r(3863);const n=r(5790);const{ANY:s}=n;const a=r(8330);const o=r(981);const l=r(8489);const c=r(2351);const p=r(576);const d=r(9541);const outside=(e,t,r,A)=>{e=new i(e,A);t=new a(t,A);let u,m,g,h,E;switch(r){case">":u=l;m=p;g=c;h=">";E=">=";break;case"<":u=c;m=d;g=l;h="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,A)){return false}for(let r=0;r{if(e.semver===s){e=new n(">=0.0.0")}a=a||e;o=o||e;if(u(e.semver,a.semver,A)){a=e}else if(g(e.semver,o.semver,A)){o=e}}));if(a.operator===h||a.operator===E){return false}if((!o.operator||o.operator===h)&&m(e,o.semver)){return false}else if(o.operator===E&&g(e,o.semver)){return false}}return true};e.exports=outside},2529:(e,t,r)=>{const i=r(981);const n=r(74);e.exports=(e,t,r)=>{const s=[];let a=null;let o=null;const l=e.sort(((e,t)=>n(e,t,r)));for(const e of l){const n=i(e,t,r);if(n){o=e;if(!a){a=e}}else{if(o){s.push([a,o])}o=null;a=null}}if(a){s.push([a,null])}const c=[];for(const[e,t]of s){if(e===t){c.push(e)}else if(!t&&e===l[0]){c.push("*")}else if(!t){c.push(`>=${e}`)}else if(e===l[0]){c.push(`<=${t}`)}else{c.push(`${e} - ${t}`)}}const p=c.join(" || ");const d=typeof t.raw==="string"?t.raw:String(t);return p.length{const i=r(8330);const n=r(5790);const{ANY:s}=n;const a=r(981);const o=r(74);const subset=(e,t,r={})=>{if(e===t){return true}e=new i(e,r);t=new i(t,r);let n=false;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const l=[new n(">=0.0.0-0")];const c=[new n(">=0.0.0")];const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===s){if(t.length===1&&t[0].semver===s){return true}else if(r.includePrerelease){e=l}else{e=c}}if(t.length===1&&t[0].semver===s){if(r.includePrerelease){return true}else{t=c}}const i=new Set;let n,p;for(const t of e){if(t.operator===">"||t.operator===">="){n=higherGT(n,t,r)}else if(t.operator==="<"||t.operator==="<="){p=lowerLT(p,t,r)}else{i.add(t.semver)}}if(i.size>1){return null}let d;if(n&&p){d=o(n.semver,p.semver,r);if(d>0){return null}else if(d===0&&(n.operator!==">="||p.operator!=="<=")){return null}}for(const e of i){if(n&&!a(e,String(n),r)){return null}if(p&&!a(e,String(p),r)){return null}for(const i of t){if(!a(e,String(i),r)){return false}}return true}let A,u;let m,g;let h=p&&!r.includePrerelease&&p.semver.prerelease.length?p.semver:false;let E=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:false;if(h&&h.prerelease.length===1&&p.operator==="<"&&h.prerelease[0]===0){h=false}for(const e of t){g=g||e.operator===">"||e.operator===">=";m=m||e.operator==="<"||e.operator==="<=";if(n){if(E){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===E.major&&e.semver.minor===E.minor&&e.semver.patch===E.patch){E=false}}if(e.operator===">"||e.operator===">="){A=higherGT(n,e,r);if(A===e&&A!==n){return false}}else if(n.operator===">="&&!a(n.semver,String(e),r)){return false}}if(p){if(h){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===h.major&&e.semver.minor===h.minor&&e.semver.patch===h.patch){h=false}}if(e.operator==="<"||e.operator==="<="){u=lowerLT(p,e,r);if(u===e&&u!==p){return false}}else if(p.operator==="<="&&!a(p.semver,String(e),r)){return false}}if(!e.operator&&(p||n)&&d!==0){return false}}if(n&&m&&!p&&d!==0){return false}if(p&&g&&!n&&d!==0){return false}if(E||h){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const i=o(e.semver,t.semver,r);return i>0?e:i<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const i=o(e.semver,t.semver,r);return i<0?e:i>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},6967:(e,t,r)=>{const i=r(8330);const toComparators=(e,t)=>new i(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},6040:(e,t,r)=>{const i=r(8330);const validRange=(e,t)=>{try{return new i(e,t).range||"*"}catch(e){return null}};e.exports=validRange},8940:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},8208:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,i=arguments.length;r1){r=t}else if(this.head){i=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;i!==null;n++){r=e(r,i.value,n);i=i.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var i=this.tail;if(arguments.length>1){r=t}else if(this.tail){i=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;i!==null;n--){r=e(r,i.value,n);i=i.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var i=0,n=this.head;n!==null&&ithis.length){t=this.length}for(var i=this.length,n=this.tail;n!==null&&i>t;i--){n=n.prev}for(;n!==null&&i>e;i--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var i=0,n=this.head;n!==null&&i{"use strict";const i=r(4492).Writable;const n=r(7261).inherits;const s=r(8534);const a=r(8710);const o=r(333);const l=45;const c=Buffer.from("-");const p=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}i.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new o(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}n(Dicer,i);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{i.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const i=r(5673).EventEmitter;const n=r(7261).inherits;const s=r(9692);const a=r(8534);const o=Buffer.from("\r\n\r\n");const l=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){i.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=s(e,"maxHeaderPairs",2e3);this.maxHeaderSize=s(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(o);this.ss.on("info",(function(e,r,i,n){if(r&&!t.maxed){if(t.nread+n-i>=t.maxHeaderSize){n=t.maxHeaderSize-t.nread+i;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=n-i}t.buffer+=r.toString("binary",i,n)}if(e){t._finish()}}))}n(HeaderParser,i);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,i;for(var n=0;n{"use strict";const i=r(7261).inherits;const n=r(4492).Readable;function PartStream(e){n.call(this,e)}i(PartStream,n);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,r)=>{"use strict";const i=r(5673).EventEmitter;const n=r(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+s;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}s+=(s>=0)*this._bufpos;if(e.indexOf(r,s)!==-1){s=e.indexOf(r,s);++this.matches;if(s>0){this.emit("info",true,e,this._bufpos,s)}else{this.emit("info",true)}return this._bufpos=s+i}else{s=t-i}while(s0){this.emit("info",false,e,this._bufpos,s{"use strict";const i=r(4492).Writable;const{inherits:n}=r(7261);const s=r(2856);const a=r(415);const o=r(6780);const l=r(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};i.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}n(Busboy,i);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}i.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(o.detect.test(t[0])){return new o(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=s},415:(e,t,r)=>{"use strict";const{Readable:i}=r(4492);const{inherits:n}=r(7261);const s=r(2856);const a=r(4426);const o=r(9136);const l=r(496);const c=r(9692);const p=/^boundary$/i;const d=/^form-data$/i;const A=/^charset$/i;const u=/^filename$/i;const m=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let i;const n=this;let g;const h=t.limits;const E=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const y=t.parsedConType||[];const C=t.defCharset||"utf8";const b=t.preservePath;const I={highWaterMark:t.fileHwm};for(r=0,i=y.length;rx){n.parser.removeListener("part",onPart);n.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(k){const e=k;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(s){let c;let p;let g;let h;let y;let x;let S=0;if(s["content-type"]){g=a(s["content-type"][0]);if(g[0]){c=g[0].toLowerCase();for(r=0,i=g.length;rv){const i=v-S+e.length;if(i>0){r.push(e.slice(0,i))}r.truncated=true;r.bytesRead=v;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){n._pause=true}r.bytesRead=S};O=function(){_=undefined;r.push(null)}}else{if(D===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++D;++T;let r="";let i=false;k=t;N=function(e){if((S+=e.length)>B){const n=B-(S-e.length);r+=e.toString("binary",0,n);i=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};O=function(){k=undefined;if(r.length){r=o(r,"binary",h)}e.emit("field",p,r,false,i,y,c);--T;checkFinished()}}t._readableState.sync=false;t.on("data",N);t.on("end",O)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){O=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){i.call(this,e);this.bytesRead=0;this.truncated=false}n(FileStream,i);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,r)=>{"use strict";const i=r(9730);const n=r(9136);const s=r(9692);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const n=t.parsedConType;this.boy=e;this.fieldSizeLimit=s(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=s(r,"fieldNameSize",100);this.fieldsLimit=s(r,"fields",Infinity);let o;for(var l=0,c=n.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(i!==undefined){++this._fields;let r;const s=this._keyTrunc;if(i>a){r=this._key+=this.decoder.write(e.toString("binary",a,i))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",n(r,"binary",this.charset),"",s,false)}a=i+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(s>a){this._key+=this.decoder.write(e.toString("binary",a,s))}a=s;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,i))}this.boy.emit("field",n(this._key,"binary",this.charset),n(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=i+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(s>a){this._val+=this.decoder.write(e.toString("binary",a,s))}a=s;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",n(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",n(this._key,"binary",this.charset),n(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let i="";let n=0;let s=0;const a=e.length;for(;ns){i+=e.substring(s,n);s=n}this.buffer="";++s}}if(s{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,i){if(e){if(r.has(i)){try{return r.get(i).decode(Buffer.from(e,t))}catch(e){}}else{try{r.set(i,new TextDecoder(i));return r.get(i).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,r)=>{"use strict";const i=r(9136);const n=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let r="key";let s="";let a=false;let o=false;let l=0;let c="";for(var p=0,d=e.length;p{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{createTokenAuth:()=>c});e.exports=__toCommonJS(s);var a=/^v1\./;var o=/^ghs_/;var l=/^ghu_/;async function auth(e){const t=e.split(/\./).length===3;const r=a.test(e)||o.test(e);const i=l.test(e);const n=t?"app":r?"installation":i?"user-to-server":"oauth";return{type:"token",token:e,tokenType:n}}function withAuthorizationPrefix(e){if(e.split(/\./).length===3){return`bearer ${e}`}return`token ${e}`}async function hook(e,t,r,i){const n=t.endpoint.merge(r,i);n.headers.authorization=withAuthorizationPrefix(e);return t(n)}var c=function createTokenAuth2(e){if(!e){throw new Error("[@octokit/auth-token] No token passed to createTokenAuth")}if(typeof e!=="string"){throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string")}e=e.replace(/^(token|bearer) +/i,"");return Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})};0&&0},6762:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{Octokit:()=>E});e.exports=__toCommonJS(o);var l=r(5030);var c=r(3682);var p=r(6234);var d=r(8467);var A=r(334);var u="5.1.0";var noop=()=>{};var m=console.warn.bind(console);var g=console.error.bind(console);var h=`octokit-core.js/${u} ${(0,l.getUserAgent)()}`;var E=class{static{this.VERSION=u}static defaults(e){const t=class extends(this){constructor(...t){const r=t[0]||{};if(typeof e==="function"){super(e(r));return}super(Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null))}};return t}static{this.plugins=[]}static plugin(...e){const t=this.plugins;const r=class extends(this){static{this.plugins=t.concat(e.filter((e=>!t.includes(e))))}};return r}constructor(e={}){const t=new c.Collection;const r={baseUrl:p.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};r.headers["user-agent"]=e.userAgent?`${e.userAgent} ${h}`:h;if(e.baseUrl){r.baseUrl=e.baseUrl}if(e.previews){r.mediaType.previews=e.previews}if(e.timeZone){r.headers["time-zone"]=e.timeZone}this.request=p.request.defaults(r);this.graphql=(0,d.withCustomRequest)(this.request).defaults(r);this.log=Object.assign({debug:noop,info:noop,warn:m,error:g},e.log);this.hook=t;if(!e.authStrategy){if(!e.auth){this.auth=async()=>({type:"unauthenticated"})}else{const r=(0,A.createTokenAuth)(e.auth);t.wrap("request",r.hook);this.auth=r}}else{const{authStrategy:r,...i}=e;const n=r(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:i},e.auth));t.wrap("request",n.hook);this.auth=n}const i=this.constructor;for(let t=0;t{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{endpoint:()=>m});e.exports=__toCommonJS(o);var l=r(5030);var c="9.0.1";var p=`octokit-endpoint.js/${c} ${(0,l.getUserAgent)()}`;var d={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":p},mediaType:{format:""}};function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce(((t,r)=>{t[r.toLowerCase()]=e[r];return t}),{})}var A=r(3287);function mergeDeep(e,t){const r=Object.assign({},e);Object.keys(t).forEach((i=>{if((0,A.isPlainObject)(t[i])){if(!(i in e))Object.assign(r,{[i]:t[i]});else r[i]=mergeDeep(e[i],t[i])}else{Object.assign(r,{[i]:t[i]})}}));return r}function removeUndefinedProperties(e){for(const t in e){if(e[t]===void 0){delete e[t]}}return e}function merge(e,t,r){if(typeof t==="string"){let[e,i]=t.split(" ");r=Object.assign(i?{method:e,url:i}:{url:e},r)}else{r=Object.assign({},t)}r.headers=lowercaseKeys(r.headers);removeUndefinedProperties(r);removeUndefinedProperties(r.headers);const i=mergeDeep(e||{},r);if(r.url==="/graphql"){if(e&&e.mediaType.previews?.length){i.mediaType.previews=e.mediaType.previews.filter((e=>!i.mediaType.previews.includes(e))).concat(i.mediaType.previews)}i.mediaType.previews=(i.mediaType.previews||[]).map((e=>e.replace(/-preview/,"")))}return i}function addQueryParameters(e,t){const r=/\?/.test(e)?"&":"?";const i=Object.keys(t);if(i.length===0){return e}return e+r+i.map((e=>{if(e==="q"){return"q="+t.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(t[e])}`})).join("&")}var u=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(u);if(!t){return[]}return t.map(removeNonChars).reduce(((e,t)=>e.concat(t)),[])}function omit(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,r)=>{t[r]=e[r];return t}),{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,r){t=e==="+"||e==="#"?encodeReserved(t):encodeUnreserved(t);if(r){return encodeUnreserved(r)+"="+t}else{return t}}function isDefined(e){return e!==void 0&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,t,r,i){var n=e[r],s=[];if(isDefined(n)&&n!==""){if(typeof n==="string"||typeof n==="number"||typeof n==="boolean"){n=n.toString();if(i&&i!=="*"){n=n.substring(0,parseInt(i,10))}s.push(encodeValue(t,n,isKeyOperator(t)?r:""))}else{if(i==="*"){if(Array.isArray(n)){n.filter(isDefined).forEach((function(e){s.push(encodeValue(t,e,isKeyOperator(t)?r:""))}))}else{Object.keys(n).forEach((function(e){if(isDefined(n[e])){s.push(encodeValue(t,n[e],e))}}))}}else{const e=[];if(Array.isArray(n)){n.filter(isDefined).forEach((function(r){e.push(encodeValue(t,r))}))}else{Object.keys(n).forEach((function(r){if(isDefined(n[r])){e.push(encodeUnreserved(r));e.push(encodeValue(t,n[r].toString()))}}))}if(isKeyOperator(t)){s.push(encodeUnreserved(r)+"="+e.join(","))}else if(e.length!==0){s.push(e.join(","))}}}}else{if(t===";"){if(isDefined(n)){s.push(encodeUnreserved(r))}}else if(n===""&&(t==="&"||t==="?")){s.push(encodeUnreserved(r)+"=")}else if(n===""){s.push("")}}return s}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var r=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,i,n){if(i){let e="";const n=[];if(r.indexOf(i.charAt(0))!==-1){e=i.charAt(0);i=i.substr(1)}i.split(/,/g).forEach((function(r){var i=/([^:\*]*)(?::(\d+)|(\*))?/.exec(r);n.push(getValues(t,e,i[1],i[2]||i[3]))}));if(e&&e!=="+"){var s=",";if(e==="?"){s="&"}else if(e!=="#"){s=e}return(n.length!==0?e:"")+n.join(s)}else{return n.join(",")}}else{return encodeReserved(n)}}))}function parse(e){let t=e.method.toUpperCase();let r=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}");let i=Object.assign({},e.headers);let n;let s=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const a=extractUrlVariableNames(r);r=parseUrl(r).expand(s);if(!/^http/.test(r)){r=e.baseUrl+r}const o=Object.keys(e).filter((e=>a.includes(e))).concat("baseUrl");const l=omit(s,o);const c=/application\/octet-stream/i.test(i.accept);if(!c){if(e.mediaType.format){i.accept=i.accept.split(/,/).map((t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")}if(r.endsWith("/graphql")){if(e.mediaType.previews?.length){const t=i.accept.match(/[\w-]+(?=-preview)/g)||[];i.accept=t.concat(e.mediaType.previews).map((t=>{const r=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${t}-preview${r}`})).join(",")}}}if(["GET","HEAD"].includes(t)){r=addQueryParameters(r,l)}else{if("data"in l){n=l.data}else{if(Object.keys(l).length){n=l}}}if(!i["content-type"]&&typeof n!=="undefined"){i["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(t)&&typeof n==="undefined"){n=""}return Object.assign({method:t,url:r,headers:i},typeof n!=="undefined"?{body:n}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,r){return parse(merge(e,t,r))}function withDefaults(e,t){const r=merge(e,t);const i=endpointWithDefaults.bind(null,r);return Object.assign(i,{DEFAULTS:r,defaults:withDefaults.bind(null,r),merge:merge.bind(null,r),parse:parse})}var m=withDefaults(null,d);0&&0},8467:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{GraphqlResponseError:()=>u,graphql:()=>E,withCustomRequest:()=>withCustomRequest});e.exports=__toCommonJS(o);var l=r(6234);var c=r(5030);var p="7.0.2";var d=r(6234);var A=r(6234);function _buildMessageForResponseErrors(e){return`Request failed due to following response errors:\n`+e.errors.map((e=>` - ${e.message}`)).join("\n")}var u=class extends Error{constructor(e,t,r){super(_buildMessageForResponseErrors(r));this.request=e;this.headers=t;this.response=r;this.name="GraphqlResponseError";this.errors=r.errors;this.data=r.data;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}};var m=["method","baseUrl","url","headers","request","query","mediaType"];var g=["query","method","url"];var h=/\/api\/v3\/?$/;function graphql(e,t,r){if(r){if(typeof t==="string"&&"query"in r){return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`))}for(const e in r){if(!g.includes(e))continue;return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}}const i=typeof t==="string"?Object.assign({query:t},r):t;const n=Object.keys(i).reduce(((e,t)=>{if(m.includes(t)){e[t]=i[t];return e}if(!e.variables){e.variables={}}e.variables[t]=i[t];return e}),{});const s=i.baseUrl||e.endpoint.DEFAULTS.baseUrl;if(h.test(s)){n.url=s.replace(h,"/api/graphql")}return e(n).then((e=>{if(e.data.errors){const t={};for(const r of Object.keys(e.headers)){t[r]=e.headers[r]}throw new u(n,t,e.data)}return e.data.data}))}function withDefaults(e,t){const r=e.defaults(t);const newApi=(e,t)=>graphql(r,e,t);return Object.assign(newApi,{defaults:withDefaults.bind(null,r),endpoint:r.endpoint})}var E=withDefaults(l.request,{headers:{"user-agent":`octokit-graphql.js/${p} ${(0,c.getUserAgent)()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}0&&0},4193:e=>{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{composePaginateRest:()=>o,isPaginatingEndpoint:()=>isPaginatingEndpoint,paginateRest:()=>paginateRest,paginatingEndpoints:()=>l});e.exports=__toCommonJS(s);var a="9.0.0";function normalizePaginatedListResponse(e){if(!e.data){return{...e,data:[]}}const t="total_count"in e.data&&!("url"in e.data);if(!t)return e;const r=e.data.incomplete_results;const i=e.data.repository_selection;const n=e.data.total_count;delete e.data.incomplete_results;delete e.data.repository_selection;delete e.data.total_count;const s=Object.keys(e.data)[0];const a=e.data[s];e.data=a;if(typeof r!=="undefined"){e.data.incomplete_results=r}if(typeof i!=="undefined"){e.data.repository_selection=i}e.data.total_count=n;return e}function iterator(e,t,r){const i=typeof t==="function"?t.endpoint(r):e.request.endpoint(t,r);const n=typeof t==="function"?t:e.request;const s=i.method;const a=i.headers;let o=i.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!o)return{done:true};try{const e=await n({method:s,url:o,headers:a});const t=normalizePaginatedListResponse(e);o=((t.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:t}}catch(e){if(e.status!==409)throw e;o="";return{value:{status:200,headers:{},data:[]}}}}})}}function paginate(e,t,r,i){if(typeof r==="function"){i=r;r=void 0}return gather(e,[],iterator(e,t,r)[Symbol.asyncIterator](),i)}function gather(e,t,r,i){return r.next().then((n=>{if(n.done){return t}let s=false;function done(){s=true}t=t.concat(i?i(n.value,done):n.value.data);if(s){return t}return gather(e,t,r,i)}))}var o=Object.assign(paginate,{iterator:iterator});var l=["GET /advisories","GET /app/hook/deliveries","GET /app/installation-requests","GET /app/installations","GET /assignments/{assignment_id}/accepted_assignments","GET /classrooms","GET /classrooms/{classroom_id}/assignments","GET /enterprises/{enterprise}/dependabot/alerts","GET /enterprises/{enterprise}/secret-scanning/alerts","GET /events","GET /gists","GET /gists/public","GET /gists/starred","GET /gists/{gist_id}/comments","GET /gists/{gist_id}/commits","GET /gists/{gist_id}/forks","GET /installation/repositories","GET /issues","GET /licenses","GET /marketplace_listing/plans","GET /marketplace_listing/plans/{plan_id}/accounts","GET /marketplace_listing/stubbed/plans","GET /marketplace_listing/stubbed/plans/{plan_id}/accounts","GET /networks/{owner}/{repo}/events","GET /notifications","GET /organizations","GET /orgs/{org}/actions/cache/usage-by-repository","GET /orgs/{org}/actions/permissions/repositories","GET /orgs/{org}/actions/runners","GET /orgs/{org}/actions/secrets","GET /orgs/{org}/actions/secrets/{secret_name}/repositories","GET /orgs/{org}/actions/variables","GET /orgs/{org}/actions/variables/{name}/repositories","GET /orgs/{org}/blocks","GET /orgs/{org}/code-scanning/alerts","GET /orgs/{org}/codespaces","GET /orgs/{org}/codespaces/secrets","GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories","GET /orgs/{org}/copilot/billing/seats","GET /orgs/{org}/dependabot/alerts","GET /orgs/{org}/dependabot/secrets","GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories","GET /orgs/{org}/events","GET /orgs/{org}/failed_invitations","GET /orgs/{org}/hooks","GET /orgs/{org}/hooks/{hook_id}/deliveries","GET /orgs/{org}/installations","GET /orgs/{org}/invitations","GET /orgs/{org}/invitations/{invitation_id}/teams","GET /orgs/{org}/issues","GET /orgs/{org}/members","GET /orgs/{org}/members/{username}/codespaces","GET /orgs/{org}/migrations","GET /orgs/{org}/migrations/{migration_id}/repositories","GET /orgs/{org}/outside_collaborators","GET /orgs/{org}/packages","GET /orgs/{org}/packages/{package_type}/{package_name}/versions","GET /orgs/{org}/personal-access-token-requests","GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories","GET /orgs/{org}/personal-access-tokens","GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories","GET /orgs/{org}/projects","GET /orgs/{org}/public_members","GET /orgs/{org}/repos","GET /orgs/{org}/rulesets","GET /orgs/{org}/secret-scanning/alerts","GET /orgs/{org}/security-advisories","GET /orgs/{org}/teams","GET /orgs/{org}/teams/{team_slug}/discussions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions","GET /orgs/{org}/teams/{team_slug}/invitations","GET /orgs/{org}/teams/{team_slug}/members","GET /orgs/{org}/teams/{team_slug}/projects","GET /orgs/{org}/teams/{team_slug}/repos","GET /orgs/{org}/teams/{team_slug}/teams","GET /projects/columns/{column_id}/cards","GET /projects/{project_id}/collaborators","GET /projects/{project_id}/columns","GET /repos/{owner}/{repo}/actions/artifacts","GET /repos/{owner}/{repo}/actions/caches","GET /repos/{owner}/{repo}/actions/organization-secrets","GET /repos/{owner}/{repo}/actions/organization-variables","GET /repos/{owner}/{repo}/actions/runners","GET /repos/{owner}/{repo}/actions/runs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts","GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs","GET /repos/{owner}/{repo}/actions/secrets","GET /repos/{owner}/{repo}/actions/variables","GET /repos/{owner}/{repo}/actions/workflows","GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs","GET /repos/{owner}/{repo}/activity","GET /repos/{owner}/{repo}/assignees","GET /repos/{owner}/{repo}/branches","GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations","GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs","GET /repos/{owner}/{repo}/code-scanning/alerts","GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances","GET /repos/{owner}/{repo}/code-scanning/analyses","GET /repos/{owner}/{repo}/codespaces","GET /repos/{owner}/{repo}/codespaces/devcontainers","GET /repos/{owner}/{repo}/codespaces/secrets","GET /repos/{owner}/{repo}/collaborators","GET /repos/{owner}/{repo}/comments","GET /repos/{owner}/{repo}/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/commits","GET /repos/{owner}/{repo}/commits/{commit_sha}/comments","GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls","GET /repos/{owner}/{repo}/commits/{ref}/check-runs","GET /repos/{owner}/{repo}/commits/{ref}/check-suites","GET /repos/{owner}/{repo}/commits/{ref}/status","GET /repos/{owner}/{repo}/commits/{ref}/statuses","GET /repos/{owner}/{repo}/contributors","GET /repos/{owner}/{repo}/dependabot/alerts","GET /repos/{owner}/{repo}/dependabot/secrets","GET /repos/{owner}/{repo}/deployments","GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses","GET /repos/{owner}/{repo}/environments","GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies","GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps","GET /repos/{owner}/{repo}/events","GET /repos/{owner}/{repo}/forks","GET /repos/{owner}/{repo}/hooks","GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries","GET /repos/{owner}/{repo}/invitations","GET /repos/{owner}/{repo}/issues","GET /repos/{owner}/{repo}/issues/comments","GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/issues/events","GET /repos/{owner}/{repo}/issues/{issue_number}/comments","GET /repos/{owner}/{repo}/issues/{issue_number}/events","GET /repos/{owner}/{repo}/issues/{issue_number}/labels","GET /repos/{owner}/{repo}/issues/{issue_number}/reactions","GET /repos/{owner}/{repo}/issues/{issue_number}/timeline","GET /repos/{owner}/{repo}/keys","GET /repos/{owner}/{repo}/labels","GET /repos/{owner}/{repo}/milestones","GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels","GET /repos/{owner}/{repo}/notifications","GET /repos/{owner}/{repo}/pages/builds","GET /repos/{owner}/{repo}/projects","GET /repos/{owner}/{repo}/pulls","GET /repos/{owner}/{repo}/pulls/comments","GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/pulls/{pull_number}/comments","GET /repos/{owner}/{repo}/pulls/{pull_number}/commits","GET /repos/{owner}/{repo}/pulls/{pull_number}/files","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments","GET /repos/{owner}/{repo}/releases","GET /repos/{owner}/{repo}/releases/{release_id}/assets","GET /repos/{owner}/{repo}/releases/{release_id}/reactions","GET /repos/{owner}/{repo}/rules/branches/{branch}","GET /repos/{owner}/{repo}/rulesets","GET /repos/{owner}/{repo}/secret-scanning/alerts","GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations","GET /repos/{owner}/{repo}/security-advisories","GET /repos/{owner}/{repo}/stargazers","GET /repos/{owner}/{repo}/subscribers","GET /repos/{owner}/{repo}/tags","GET /repos/{owner}/{repo}/teams","GET /repos/{owner}/{repo}/topics","GET /repositories","GET /repositories/{repository_id}/environments/{environment_name}/secrets","GET /repositories/{repository_id}/environments/{environment_name}/variables","GET /search/code","GET /search/commits","GET /search/issues","GET /search/labels","GET /search/repositories","GET /search/topics","GET /search/users","GET /teams/{team_id}/discussions","GET /teams/{team_id}/discussions/{discussion_number}/comments","GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /teams/{team_id}/discussions/{discussion_number}/reactions","GET /teams/{team_id}/invitations","GET /teams/{team_id}/members","GET /teams/{team_id}/projects","GET /teams/{team_id}/repos","GET /teams/{team_id}/teams","GET /user/blocks","GET /user/codespaces","GET /user/codespaces/secrets","GET /user/emails","GET /user/followers","GET /user/following","GET /user/gpg_keys","GET /user/installations","GET /user/installations/{installation_id}/repositories","GET /user/issues","GET /user/keys","GET /user/marketplace_purchases","GET /user/marketplace_purchases/stubbed","GET /user/memberships/orgs","GET /user/migrations","GET /user/migrations/{migration_id}/repositories","GET /user/orgs","GET /user/packages","GET /user/packages/{package_type}/{package_name}/versions","GET /user/public_emails","GET /user/repos","GET /user/repository_invitations","GET /user/social_accounts","GET /user/ssh_signing_keys","GET /user/starred","GET /user/subscriptions","GET /user/teams","GET /users","GET /users/{username}/events","GET /users/{username}/events/orgs/{org}","GET /users/{username}/events/public","GET /users/{username}/followers","GET /users/{username}/following","GET /users/{username}/gists","GET /users/{username}/gpg_keys","GET /users/{username}/keys","GET /users/{username}/orgs","GET /users/{username}/packages","GET /users/{username}/projects","GET /users/{username}/received_events","GET /users/{username}/received_events/public","GET /users/{username}/repos","GET /users/{username}/social_accounts","GET /users/{username}/ssh_signing_keys","GET /users/{username}/starred","GET /users/{username}/subscriptions"];function isPaginatingEndpoint(e){if(typeof e==="string"){return l.includes(e)}else{return false}}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=a;0&&0},3044:e=>{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{legacyRestEndpointMethods:()=>legacyRestEndpointMethods,restEndpointMethods:()=>restEndpointMethods});e.exports=__toCommonJS(s);var a="10.4.0";var o={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repositories/{repository_id}/environments/{environment_name}/variables"],createOrUpdateEnvironmentSecret:["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVariable:["POST /orgs/{org}/actions/variables"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createRepoVariable:["POST /repos/{owner}/{repo}/actions/variables"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteEnvironmentSecret:["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],deleteEnvironmentVariable:["DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteRepoVariable:["DELETE /repos/{owner}/{repo}/actions/variables/{name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],forceCancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"],generateRunnerJitconfigForOrg:["POST /orgs/{org}/actions/runners/generate-jitconfig"],generateRunnerJitconfigForRepo:["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getCustomOidcSubClaimForRepo:["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"],getEnvironmentPublicKey:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],getEnvironmentVariable:["GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getOrgVariable:["GET /orgs/{org}/actions/variables/{name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getRepoVariable:["GET /repos/{owner}/{repo}/actions/variables/{name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listEnvironmentSecrets:["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],listEnvironmentVariables:["GET /repositories/{repository_id}/environments/{environment_name}/variables"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listOrgVariables:["GET /orgs/{org}/actions/variables"],listRepoOrganizationSecrets:["GET /repos/{owner}/{repo}/actions/organization-secrets"],listRepoOrganizationVariables:["GET /repos/{owner}/{repo}/actions/organization-variables"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoVariables:["GET /repos/{owner}/{repo}/actions/variables"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedReposForOrgVariable:["GET /orgs/{org}/actions/variables/{name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],reviewCustomGatesForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setCustomOidcSubClaimForRepo:["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedReposForOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"],updateEnvironmentVariable:["PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],updateOrgVariable:["PATCH /orgs/{org}/actions/variables/{name}"],updateRepoVariable:["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsDone:["DELETE /notifications/threads/{thread_id}"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallationRequestsForAuthenticatedApp:["GET /app/installation-requests"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getCodeqlDatabase:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getDefaultSetup:["GET /repos/{owner}/{repo}/code-scanning/default-setup"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listCodeqlDatabases:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],updateDefaultSetup:["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],checkPermissionsForDevcontainer:["GET /repos/{owner}/{repo}/codespaces/permissions_check"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getCodespacesForUserInOrg:["GET /orgs/{org}/members/{username}/codespaces"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getOrgPublicKey:["GET /orgs/{org}/codespaces/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listOrgSecrets:["GET /orgs/{org}/codespaces/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],preFlightWithRepoForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/new"],publishForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/publish"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},copilot:{addCopilotSeatsForTeams:["POST /orgs/{org}/copilot/billing/selected_teams"],addCopilotSeatsForUsers:["POST /orgs/{org}/copilot/billing/selected_users"],cancelCopilotSeatAssignmentForTeams:["DELETE /orgs/{org}/copilot/billing/selected_teams"],cancelCopilotSeatAssignmentForUsers:["DELETE /orgs/{org}/copilot/billing/selected_users"],getCopilotOrganizationDetails:["GET /orgs/{org}/copilot/billing"],getCopilotSeatDetailsForUser:["GET /orgs/{org}/members/{username}/copilot"],listCopilotSeats:["GET /orgs/{org}/copilot/billing/seats"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getAlert:["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/dependabot/alerts"],listAlertsForOrg:["GET /orgs/{org}/dependabot/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/dependabot/alerts"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],updateAlert:["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"],exportSbom:["GET /repos/{owner}/{repo}/dependency-graph/sbom"]},emojis:{get:["GET /emojis"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],checkUserCanBeAssignedToIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getAllVersions:["GET /versions"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import"}],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors",{},{deprecated:"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors"}],getImportStatus:["GET /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status"}],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files",{},{deprecated:"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files"}],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}",{},{deprecated:"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author"}],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs",{},{deprecated:"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference"}],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import"}],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],updateImport:["PATCH /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import"}]},oidc:{getOidcCustomSubTemplateForOrg:["GET /orgs/{org}/actions/oidc/customization/sub"],updateOidcCustomSubTemplateForOrg:["PUT /orgs/{org}/actions/oidc/customization/sub"]},orgs:{addSecurityManagerTeam:["PUT /orgs/{org}/security-managers/teams/{team_slug}"],assignTeamToOrgRole:["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],assignUserToOrgRole:["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"],blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createCustomOrganizationRole:["POST /orgs/{org}/organization-roles"],createInvitation:["POST /orgs/{org}/invitations"],createOrUpdateCustomProperties:["PATCH /orgs/{org}/properties/schema"],createOrUpdateCustomPropertiesValuesForRepos:["PATCH /orgs/{org}/properties/values"],createOrUpdateCustomProperty:["PUT /orgs/{org}/properties/schema/{custom_property_name}"],createWebhook:["POST /orgs/{org}/hooks"],delete:["DELETE /orgs/{org}"],deleteCustomOrganizationRole:["DELETE /orgs/{org}/organization-roles/{role_id}"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],enableOrDisableSecurityProductOnAllOrgRepos:["POST /orgs/{org}/{security_product}/{enablement}"],get:["GET /orgs/{org}"],getAllCustomProperties:["GET /orgs/{org}/properties/schema"],getCustomProperty:["GET /orgs/{org}/properties/schema/{custom_property_name}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getOrgRole:["GET /orgs/{org}/organization-roles/{role_id}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listBlockedUsers:["GET /orgs/{org}/blocks"],listCustomPropertiesValuesForRepos:["GET /orgs/{org}/properties/values"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOrgRoleTeams:["GET /orgs/{org}/organization-roles/{role_id}/teams"],listOrgRoleUsers:["GET /orgs/{org}/organization-roles/{role_id}/users"],listOrgRoles:["GET /orgs/{org}/organization-roles"],listOrganizationFineGrainedPermissions:["GET /orgs/{org}/organization-fine-grained-permissions"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPatGrantRepositories:["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"],listPatGrantRequestRepositories:["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"],listPatGrantRequests:["GET /orgs/{org}/personal-access-token-requests"],listPatGrants:["GET /orgs/{org}/personal-access-tokens"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listSecurityManagerTeams:["GET /orgs/{org}/security-managers"],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],patchCustomOrganizationRole:["PATCH /orgs/{org}/organization-roles/{role_id}"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeCustomProperty:["DELETE /orgs/{org}/properties/schema/{custom_property_name}"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],removeSecurityManagerTeam:["DELETE /orgs/{org}/security-managers/teams/{team_slug}"],reviewPatGrantRequest:["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"],reviewPatGrantRequestsInBulk:["POST /orgs/{org}/personal-access-token-requests"],revokeAllOrgRolesTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"],revokeAllOrgRolesUser:["DELETE /orgs/{org}/organization-roles/users/{username}"],revokeOrgRoleTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],revokeOrgRoleUser:["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updatePatAccess:["POST /orgs/{org}/personal-access-tokens/{pat_id}"],updatePatAccesses:["POST /orgs/{org}/personal-access-tokens"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listDockerMigrationConflictingPackagesForAuthenticatedUser:["GET /user/docker/conflicts"],listDockerMigrationConflictingPackagesForOrganization:["GET /orgs/{org}/docker/conflicts"],listDockerMigrationConflictingPackagesForUser:["GET /users/{username}/docker/conflicts"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}"],createCard:["POST /projects/columns/{column_id}/cards"],createColumn:["POST /projects/{project_id}/columns"],createForAuthenticatedUser:["POST /user/projects"],createForOrg:["POST /orgs/{org}/projects"],createForRepo:["POST /repos/{owner}/{repo}/projects"],delete:["DELETE /projects/{project_id}"],deleteCard:["DELETE /projects/columns/cards/{card_id}"],deleteColumn:["DELETE /projects/columns/{column_id}"],get:["GET /projects/{project_id}"],getCard:["GET /projects/columns/cards/{card_id}"],getColumn:["GET /projects/columns/{column_id}"],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission"],listCards:["GET /projects/columns/{column_id}/cards"],listCollaborators:["GET /projects/{project_id}/collaborators"],listColumns:["GET /projects/{project_id}/columns"],listForOrg:["GET /orgs/{org}/projects"],listForRepo:["GET /repos/{owner}/{repo}/projects"],listForUser:["GET /users/{username}/projects"],moveCard:["POST /projects/columns/cards/{card_id}/moves"],moveColumn:["POST /projects/columns/{column_id}/moves"],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}"],update:["PATCH /projects/{project_id}"],updateCard:["PATCH /projects/columns/cards/{card_id}"],updateColumn:["PATCH /projects/columns/{column_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],cancelPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"],checkAutomatedSecurityFixes:["GET /repos/{owner}/{repo}/automated-security-fixes"],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentBranchPolicy:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],createDeploymentProtectionRule:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateCustomPropertiesValues:["PATCH /repos/{owner}/{repo}/properties/values"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createOrgRuleset:["POST /orgs/{org}/rulesets"],createPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createRepoRuleset:["POST /repos/{owner}/{repo}/rulesets"],createTagProtection:["POST /repos/{owner}/{repo}/tags/protection"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteDeploymentBranchPolicy:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deleteOrgRuleset:["DELETE /orgs/{org}/rulesets/{ruleset_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteRepoRuleset:["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],deleteTagProtection:["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableDeploymentProtectionRule:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],disablePrivateVulnerabilityReporting:["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enablePrivateVulnerabilityReporting:["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllDeploymentProtectionRules:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getBranchRules:["GET /repos/{owner}/{repo}/rules/branches/{branch}"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getCustomDeploymentProtectionRule:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],getCustomPropertiesValues:["GET /repos/{owner}/{repo}/properties/values"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentBranchPolicy:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getOrgRuleSuite:["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],getOrgRuleSuites:["GET /orgs/{org}/rulesets/rule-suites"],getOrgRuleset:["GET /orgs/{org}/rulesets/{ruleset_id}"],getOrgRulesets:["GET /orgs/{org}/rulesets"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesDeployment:["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getRepoRuleSuite:["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"],getRepoRuleSuites:["GET /repos/{owner}/{repo}/rulesets/rule-suites"],getRepoRuleset:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],getRepoRulesets:["GET /repos/{owner}/{repo}/rulesets"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listActivities:["GET /repos/{owner}/{repo}/activity"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listCustomDeploymentRuleIntegrations:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentBranchPolicies:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTagProtection:["GET /repos/{owner}/{repo}/tags/protection"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateDeploymentBranchPolicy:["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updateOrgRuleset:["PUT /orgs/{org}/rulesets/{ruleset_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateRepoRuleset:["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/secret-scanning/alerts"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]},securityAdvisories:{createFork:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"],createPrivateVulnerabilityReport:["POST /repos/{owner}/{repo}/security-advisories/reports"],createRepositoryAdvisory:["POST /repos/{owner}/{repo}/security-advisories"],createRepositoryAdvisoryCveRequest:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"],getGlobalAdvisory:["GET /advisories/{ghsa_id}"],getRepositoryAdvisory:["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"],listGlobalAdvisories:["GET /advisories"],listOrgRepositoryAdvisories:["GET /orgs/{org}/security-advisories"],listRepositoryAdvisories:["GET /repos/{owner}/{repo}/security-advisories"],updateRepositoryAdvisory:["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],addSocialAccountForAuthenticatedUser:["POST /user/social_accounts"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],createSshSigningKeyForAuthenticatedUser:["POST /user/ssh_signing_keys"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],deleteSocialAccountForAuthenticatedUser:["DELETE /user/social_accounts"],deleteSshSigningKeyForAuthenticatedUser:["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],getSshSigningKeyForAuthenticatedUser:["GET /user/ssh_signing_keys/{ssh_signing_key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],listSocialAccountsForAuthenticatedUser:["GET /user/social_accounts"],listSocialAccountsForUser:["GET /users/{username}/social_accounts"],listSshSigningKeysForAuthenticatedUser:["GET /user/ssh_signing_keys"],listSshSigningKeysForUser:["GET /users/{username}/ssh_signing_keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}};var l=o;var c=new Map;for(const[e,t]of Object.entries(l)){for(const[r,i]of Object.entries(t)){const[t,n,s]=i;const[a,o]=t.split(/ /);const l=Object.assign({method:a,url:o},n);if(!c.has(e)){c.set(e,new Map)}c.get(e).set(r,{scope:e,methodName:r,endpointDefaults:l,decorations:s})}}var p={has({scope:e},t){return c.get(e).has(t)},getOwnPropertyDescriptor(e,t){return{value:this.get(e,t),configurable:true,writable:true,enumerable:true}},defineProperty(e,t,r){Object.defineProperty(e.cache,t,r);return true},deleteProperty(e,t){delete e.cache[t];return true},ownKeys({scope:e}){return[...c.get(e).keys()]},set(e,t,r){return e.cache[t]=r},get({octokit:e,scope:t,cache:r},i){if(r[i]){return r[i]}const n=c.get(t).get(i);if(!n){return void 0}const{endpointDefaults:s,decorations:a}=n;if(a){r[i]=decorate(e,t,i,s,a)}else{r[i]=e.request.defaults(s)}return r[i]}};function endpointsToMethods(e){const t={};for(const r of c.keys()){t[r]=new Proxy({octokit:e,scope:r,cache:{}},p)}return t}function decorate(e,t,r,i,n){const s=e.request.defaults(i);function withDecorations(...i){let a=s.endpoint.merge(...i);if(n.mapToData){a=Object.assign({},a,{data:a[n.mapToData],[n.mapToData]:void 0});return s(a)}if(n.renamed){const[i,s]=n.renamed;e.log.warn(`octokit.${t}.${r}() has been renamed to octokit.${i}.${s}()`)}if(n.deprecated){e.log.warn(n.deprecated)}if(n.renamedParameters){const a=s.endpoint.merge(...i);for(const[i,s]of Object.entries(n.renamedParameters)){if(i in a){e.log.warn(`"${i}" parameter is deprecated for "octokit.${t}.${r}()". Use "${s}" instead`);if(!(s in a)){a[s]=a[i]}delete a[i]}}return s(a)}return s(...i)}return Object.assign(withDecorations,s)}function restEndpointMethods(e){const t=endpointsToMethods(e);return{rest:t}}restEndpointMethods.VERSION=a;function legacyRestEndpointMethods(e){const t=endpointsToMethods(e);return{...t,rest:t}}legacyRestEndpointMethods.VERSION=a;0&&0},537:(e,t,r)=>{"use strict";var i=Object.create;var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.getPrototypeOf;var l=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of a(t))if(!l.call(e,o)&&o!==r)n(e,o,{get:()=>t[o],enumerable:!(i=s(t,o))||i.enumerable})}return e};var __toESM=(e,t,r)=>(r=e!=null?i(o(e)):{},__copyProps(t||!e||!e.__esModule?n(r,"default",{value:e,enumerable:true}):r,e));var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:true}),e);var c={};__export(c,{RequestError:()=>m});e.exports=__toCommonJS(c);var p=r(8932);var d=__toESM(r(1223));var A=(0,d.default)((e=>console.warn(e)));var u=(0,d.default)((e=>console.warn(e)));var m=class extends Error{constructor(e,t,r){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=t;let i;if("headers"in r&&typeof r.headers!=="undefined"){i=r.headers}if("response"in r){this.response=r.response;i=r.response.headers}const n=Object.assign({},r.request);if(r.request.headers.authorization){n.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}n.url=n.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=n;Object.defineProperty(this,"code",{get(){A(new p.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return t}});Object.defineProperty(this,"headers",{get(){u(new p.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));return i||{}}})}};0&&0},6234:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{request:()=>u});e.exports=__toCommonJS(o);var l=r(9440);var c=r(5030);var p="8.1.4";var d=r(3287);var A=r(537);function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){var t,r,i;const n=e.request&&e.request.log?e.request.log:console;const s=((t=e.request)==null?void 0:t.parseSuccessResponseBody)!==false;if((0,d.isPlainObject)(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let a={};let o;let l;let{fetch:c}=globalThis;if((r=e.request)==null?void 0:r.fetch){c=e.request.fetch}if(!c){throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing")}return c(e.url,{method:e.method,body:e.body,headers:e.headers,signal:(i=e.request)==null?void 0:i.signal,...e.body&&{duplex:"half"}}).then((async t=>{l=t.url;o=t.status;for(const e of t.headers){a[e[0]]=e[1]}if("deprecation"in a){const t=a.link&&a.link.match(/<([^>]+)>; rel="deprecation"/);const r=t&&t.pop();n.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${a.sunset}${r?`. See ${r}`:""}`)}if(o===204||o===205){return}if(e.method==="HEAD"){if(o<400){return}throw new A.RequestError(t.statusText,o,{response:{url:l,status:o,headers:a,data:void 0},request:e})}if(o===304){throw new A.RequestError("Not modified",o,{response:{url:l,status:o,headers:a,data:await getResponseData(t)},request:e})}if(o>=400){const r=await getResponseData(t);const i=new A.RequestError(toErrorMessage(r),o,{response:{url:l,status:o,headers:a,data:r},request:e});throw i}return s?await getResponseData(t):t.body})).then((e=>({status:o,url:l,headers:a,data:e}))).catch((t=>{if(t instanceof A.RequestError)throw t;else if(t.name==="AbortError")throw t;let r=t.message;if(t.name==="TypeError"&&"cause"in t){if(t.cause instanceof Error){r=t.cause.message}else if(typeof t.cause==="string"){r=t.cause}}throw new A.RequestError(r,500,{request:e})}))}async function getResponseData(e){const t=e.headers.get("content-type");if(/application\/json/.test(t)){return e.json()}if(!t||/^text\/|charset=utf-8$/.test(t)){return e.text()}return getBufferResponse(e)}function toErrorMessage(e){if(typeof e==="string")return e;if("message"in e){if(Array.isArray(e.errors)){return`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`}return e.message}return`Unknown error: ${JSON.stringify(e)}`}function withDefaults(e,t){const r=e.defaults(t);const newApi=function(e,t){const i=r.merge(e,t);if(!i.request||!i.request.hook){return fetchWrapper(r.parse(i))}const request2=(e,t)=>fetchWrapper(r.parse(r.merge(e,t)));Object.assign(request2,{endpoint:r,defaults:withDefaults.bind(null,r)});return i.request.hook(request2,i)};return Object.assign(newApi,{endpoint:r,defaults:withDefaults.bind(null,r)})}var u=withDefaults(l.endpoint,{headers:{"user-agent":`octokit-request.js/${p} ${(0,c.getUserAgent)()}`}});0&&0},7171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const i=r(4118);const n=r(5135);const s=r(1877);const a="context";const o=new i.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,n.registerGlobal)(a,e,s.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...i){return this._getContextManager().with(e,t,r,...i)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,n.getGlobal)(a)||o}disable(){this._getContextManager().disable();(0,n.unregisterGlobal)(a,s.DiagAPI.instance())}}t.ContextAPI=ContextAPI},1877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const i=r(7978);const n=r(9639);const s=r(8077);const a=r(5135);const o="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,a.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:s.DiagLogLevel.INFO})=>{var i,o,l;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((i=t.stack)!==null&&i!==void 0?i:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const c=(0,a.getGlobal)("diag");const p=(0,n.createLogLevelDiagLogger)((o=r.logLevel)!==null&&o!==void 0?o:s.DiagLogLevel.INFO,t);if(c&&!r.suppressOverrideMessage){const e=(l=(new Error).stack)!==null&&l!==void 0?l:"";c.warn(`Current logger will be overwritten from ${e}`);p.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,a.registerGlobal)("diag",p,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,a.unregisterGlobal)(o,e)};e.createComponentLogger=e=>new i.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},7696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const i=r(2647);const n=r(5135);const s=r(1877);const a="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,n.registerGlobal)(a,e,s.DiagAPI.instance())}getMeterProvider(){return(0,n.getGlobal)(a)||i.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,n.unregisterGlobal)(a,s.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},9909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const i=r(5135);const n=r(2368);const s=r(865);const a=r(7682);const o=r(8136);const l=r(1877);const c="propagation";const p=new n.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=o.createBaggage;this.getBaggage=a.getBaggage;this.getActiveBaggage=a.getActiveBaggage;this.setBaggage=a.setBaggage;this.deleteBaggage=a.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,i.registerGlobal)(c,e,l.DiagAPI.instance())}inject(e,t,r=s.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=s.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,i.unregisterGlobal)(c,l.DiagAPI.instance())}_getGlobalPropagator(){return(0,i.getGlobal)(c)||p}}t.PropagationAPI=PropagationAPI},1539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const i=r(5135);const n=r(2285);const s=r(9745);const a=r(3326);const o=r(1877);const l="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new n.ProxyTracerProvider;this.wrapSpanContext=s.wrapSpanContext;this.isSpanContextValid=s.isSpanContextValid;this.deleteSpan=a.deleteSpan;this.getSpan=a.getSpan;this.getActiveSpan=a.getActiveSpan;this.getSpanContext=a.getSpanContext;this.setSpan=a.setSpan;this.setSpanContext=a.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,i.registerGlobal)(l,this._proxyTracerProvider,o.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,i.getGlobal)(l)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,i.unregisterGlobal)(l,o.DiagAPI.instance());this._proxyTracerProvider=new n.ProxyTracerProvider}}t.TraceAPI=TraceAPI},7682:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const i=r(7171);const n=r(8242);const s=(0,n.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(s)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(i.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(s,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(s)}t.deleteBaggage=deleteBaggage},4811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},3542:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},8136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const i=r(1877);const n=r(4811);const s=r(3542);const a=i.DiagAPI.instance();function createBaggage(e={}){return new n.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){a.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:s.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},7393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const i=r(7171);t.context=i.ContextAPI.getInstance()},4118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const i=r(8242);class NoopContextManager{active(){return i.ROOT_CONTEXT}with(e,t,r,...i){return t.call(r,...i)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},8242:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const i=new BaseContext(t._currentContext);i._currentContext.set(e,r);return i};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},9721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const i=r(1877);t.diag=i.DiagAPI.instance()},7978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const i=r(5135);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const n=(0,i.getGlobal)("diag");if(!n){return}r.unshift(t);return n[e](...r)}},3041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const i=r(8077);function createLogLevelDiagLogger(e,t){if(ei.DiagLogLevel.ALL){e=i.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,i){const n=t[r];if(typeof n==="function"&&e>=i){return n.bind(t)}return function(){}}return{error:_filterFunc("error",i.DiagLogLevel.ERROR),warn:_filterFunc("warn",i.DiagLogLevel.WARN),info:_filterFunc("info",i.DiagLogLevel.INFO),debug:_filterFunc("debug",i.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",i.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},8077:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},5163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.trace=t.propagation=t.metrics=t.diag=t.context=t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=t.isValidSpanId=t.isValidTraceId=t.isSpanContextValid=t.createTraceState=t.TraceFlags=t.SpanStatusCode=t.SpanKind=t.SamplingDecision=t.ProxyTracerProvider=t.ProxyTracer=t.defaultTextMapSetter=t.defaultTextMapGetter=t.ValueType=t.createNoopMeter=t.DiagLogLevel=t.DiagConsoleLogger=t.ROOT_CONTEXT=t.createContextKey=t.baggageEntryMetadataFromString=void 0;var i=r(8136);Object.defineProperty(t,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return i.baggageEntryMetadataFromString}});var n=r(8242);Object.defineProperty(t,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(t,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var s=r(3041);Object.defineProperty(t,"DiagConsoleLogger",{enumerable:true,get:function(){return s.DiagConsoleLogger}});var a=r(8077);Object.defineProperty(t,"DiagLogLevel",{enumerable:true,get:function(){return a.DiagLogLevel}});var o=r(4837);Object.defineProperty(t,"createNoopMeter",{enumerable:true,get:function(){return o.createNoopMeter}});var l=r(9999);Object.defineProperty(t,"ValueType",{enumerable:true,get:function(){return l.ValueType}});var c=r(865);Object.defineProperty(t,"defaultTextMapGetter",{enumerable:true,get:function(){return c.defaultTextMapGetter}});Object.defineProperty(t,"defaultTextMapSetter",{enumerable:true,get:function(){return c.defaultTextMapSetter}});var p=r(3503);Object.defineProperty(t,"ProxyTracer",{enumerable:true,get:function(){return p.ProxyTracer}});var d=r(2285);Object.defineProperty(t,"ProxyTracerProvider",{enumerable:true,get:function(){return d.ProxyTracerProvider}});var A=r(3209);Object.defineProperty(t,"SamplingDecision",{enumerable:true,get:function(){return A.SamplingDecision}});var u=r(1424);Object.defineProperty(t,"SpanKind",{enumerable:true,get:function(){return u.SpanKind}});var m=r(8845);Object.defineProperty(t,"SpanStatusCode",{enumerable:true,get:function(){return m.SpanStatusCode}});var g=r(6905);Object.defineProperty(t,"TraceFlags",{enumerable:true,get:function(){return g.TraceFlags}});var h=r(2615);Object.defineProperty(t,"createTraceState",{enumerable:true,get:function(){return h.createTraceState}});var E=r(9745);Object.defineProperty(t,"isSpanContextValid",{enumerable:true,get:function(){return E.isSpanContextValid}});Object.defineProperty(t,"isValidTraceId",{enumerable:true,get:function(){return E.isValidTraceId}});Object.defineProperty(t,"isValidSpanId",{enumerable:true,get:function(){return E.isValidSpanId}});var y=r(1760);Object.defineProperty(t,"INVALID_SPANID",{enumerable:true,get:function(){return y.INVALID_SPANID}});Object.defineProperty(t,"INVALID_TRACEID",{enumerable:true,get:function(){return y.INVALID_TRACEID}});Object.defineProperty(t,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return y.INVALID_SPAN_CONTEXT}});const C=r(7393);Object.defineProperty(t,"context",{enumerable:true,get:function(){return C.context}});const b=r(9721);Object.defineProperty(t,"diag",{enumerable:true,get:function(){return b.diag}});const I=r(2601);Object.defineProperty(t,"metrics",{enumerable:true,get:function(){return I.metrics}});const B=r(7591);Object.defineProperty(t,"propagation",{enumerable:true,get:function(){return B.propagation}});const v=r(8989);Object.defineProperty(t,"trace",{enumerable:true,get:function(){return v.trace}});t["default"]={context:C.context,diag:b.diag,metrics:I.metrics,propagation:B.propagation,trace:v.trace}},5135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const i=r(9957);const n=r(8996);const s=r(1522);const a=n.VERSION.split(".")[0];const o=Symbol.for(`opentelemetry.js.api.${a}`);const l=i._globalThis;function registerGlobal(e,t,r,i=false){var s;const a=l[o]=(s=l[o])!==null&&s!==void 0?s:{version:n.VERSION};if(!i&&a[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(a.version!==n.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${n.VERSION}`);r.error(t.stack||t.message);return false}a[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${n.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const i=(t=l[o])===null||t===void 0?void 0:t.version;if(!i||!(0,s.isCompatible)(i)){return}return(r=l[o])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${n.VERSION}.`);const r=l[o];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},1522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const i=r(8996);const n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const i=e.match(n);if(!i){return()=>false}const s={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(s.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const i=e.match(n);if(!i){return _reject(e)}const a={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(a.prerelease!=null){return _reject(e)}if(s.major!==a.major){return _reject(e)}if(s.major===0){if(s.minor===a.minor&&s.patch<=a.patch){return _accept(e)}return _reject(e)}if(s.minor<=a.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(i.VERSION)},2601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const i=r(7696);t.metrics=i.MetricsAPI.getInstance()},9999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},4837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},2647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const i=r(4837);class NoopMeterProvider{getMeter(e,t,r){return i.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},9957:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});n(r(7200),t)},9406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},7200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});n(r(9406),t)},7591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const i=r(9909);t.propagation=i.PropagationAPI.getInstance()},2368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},8989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const i=r(1539);t.trace=i.TraceAPI.getInstance()},1462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const i=r(1760);class NonRecordingSpan{constructor(e=i.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},7606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const i=r(7171);const n=r(3326);const s=r(1462);const a=r(9745);const o=i.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=o.active()){const i=Boolean(t===null||t===void 0?void 0:t.root);if(i){return new s.NonRecordingSpan}const l=r&&(0,n.getSpanContext)(r);if(isSpanContext(l)&&(0,a.isSpanContextValid)(l)){return new s.NonRecordingSpan(l)}else{return new s.NonRecordingSpan}}startActiveSpan(e,t,r,i){let s;let a;let l;if(arguments.length<2){return}else if(arguments.length===2){l=t}else if(arguments.length===3){s=t;l=r}else{s=t;a=r;l=i}const c=a!==null&&a!==void 0?a:o.active();const p=this.startSpan(e,s,c);const d=(0,n.setSpan)(c,p);return o.with(d,l,undefined,p)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},3259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const i=r(7606);class NoopTracerProvider{getTracer(e,t,r){return new i.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},3503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const i=r(7606);const n=new i.NoopTracer;class ProxyTracer{constructor(e,t,r,i){this._provider=e;this.name=t;this.version=r;this.options=i}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,i){const n=this._getTracer();return Reflect.apply(n.startActiveSpan,n,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return n}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},2285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const i=r(3503);const n=r(3259);const s=new n.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var n;return(n=this.getDelegateTracer(e,t,r))!==null&&n!==void 0?n:new i.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:s}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},3209:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},3326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const i=r(8242);const n=r(1462);const s=r(7171);const a=(0,i.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(a)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(s.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(a,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(a)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new n.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},2110:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const i=r(4864);const n=32;const s=512;const a=",";const o="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+o+this.get(t));return e}),[]).join(a)}_parse(e){if(e.length>s)return;this._internalState=e.split(a).reverse().reduce(((e,t)=>{const r=t.trim();const n=r.indexOf(o);if(n!==-1){const s=r.slice(0,n);const a=r.slice(n+1,t.length);if((0,i.validateKey)(s)&&(0,i.validateValue)(a)){e.set(s,a)}else{}}return e}),new Map);if(this._internalState.size>n){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,n))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},4864:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const i=`[a-z]${r}{0,255}`;const n=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const s=new RegExp(`^(?:${i}|${n})$`);const a=/^[ -~]{0,255}[!-~]$/;const o=/,|=/;function validateKey(e){return s.test(e)}t.validateKey=validateKey;function validateValue(e){return a.test(e)&&!o.test(e)}t.validateValue=validateValue},2615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const i=r(2110);function createTraceState(e){return new i.TraceStateImpl(e)}t.createTraceState=createTraceState},1760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const i=r(6905);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:i.TraceFlags.NONE}},1424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},9745:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const i=r(1760);const n=r(1462);const s=/^([0-9a-f]{32})$/i;const a=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return s.test(e)&&e!==i.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return a.test(e)&&e!==i.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new n.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},8845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},6905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},8996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.4.1"},4812:(e,t,r)=>{e.exports={parallel:r(8210),serial:r(445),serialOrdered:r(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,r)=>{var i=r(5295);e.exports=async;function async(e){var t=false;i((function(){t=true}));return function async_callback(r,n){if(t){e(r,n)}else{i((function nextTick_callback(){e(r,n)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,r)=>{var i=r(2794),n=r(1700);e.exports=iterate;function iterate(e,t,r,i){var s=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[s]=runJob(t,s,e[s],(function(e,t){if(!(s in r.jobs)){return}delete r.jobs[s];if(e){n(r)}else{r.results[s]=t}i(e,r.results)}))}function runJob(e,t,r,n){var s;if(e.length==2){s=e(r,i(n))}else{s=e(r,t,i(n))}return s}},2474:e=>{e.exports=state;function state(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){i.keyedList.sort(r?t:function(r,i){return t(e[r],e[i])})}return i}},7942:(e,t,r)=>{var i=r(1700),n=r(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;i(this);n(e)(null,this.results)}},8210:(e,t,r)=>{var i=r(9023),n=r(2474),s=r(7942);e.exports=parallel;function parallel(e,t,r){var a=n(e);while(a.index<(a["keyedList"]||e).length){i(e,t,a,(function(e,t){if(e){r(e,t);return}if(Object.keys(a.jobs).length===0){r(null,a.results);return}}));a.index++}return s.bind(a,r)}},445:(e,t,r)=>{var i=r(3578);e.exports=serial;function serial(e,t,r){return i(e,t,null,r)}},3578:(e,t,r)=>{var i=r(9023),n=r(2474),s=r(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,r,a){var o=n(e,r);i(e,t,o,(function iteratorHandler(r,n){if(r){a(r,n);return}o.index++;if(o.index<(o["keyedList"]||e).length){i(e,t,o,iteratorHandler);return}a(null,o.results)}));return s.bind(o,a)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},9417:e=>{"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,s,a,o;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var p=l;if(l>=0&&c>0){if(e===t){return[l,c]}i=[];s=r.length;while(p>=0&&!o){if(p==l){i.push(p);l=r.indexOf(e,p+1)}else if(i.length==1){o=[i.pop(),c]}else{n=i.pop();if(n=0?l:c}if(i.length){o=[s,a]}}return o}},3682:(e,t,r)=>{var i=r(4670);var n=r(5549);var s=r(6819);var a=Function.bind;var o=a.bind(a);function bindApi(e,t,r){var i=o(s,null).apply(null,r?[t,r]:[t]);e.api={remove:i};e.remove=i;["before","error","after","wrap"].forEach((function(i){var s=r?[t,i,r]:[t,i];e[i]=e.api[i]=o(n,null).apply(null,s)}))}function HookSingular(){var e="h";var t={registry:{}};var r=i.bind(null,t,e);bindApi(r,t,e);return r}function HookCollection(){var e={registry:{}};var t=i.bind(null,e);bindApi(t,e);return t}var l=false;function Hook(){if(!l){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');l=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},5549:e=>{e.exports=addHook;function addHook(e,t,r,i){var n=i;if(!e.registry[r]){e.registry[r]=[]}if(t==="before"){i=function(e,t){return Promise.resolve().then(n.bind(null,t)).then(e.bind(null,t))}}if(t==="after"){i=function(e,t){var r;return Promise.resolve().then(e.bind(null,t)).then((function(e){r=e;return n(r,t)})).then((function(){return r}))}}if(t==="error"){i=function(e,t){return Promise.resolve().then(e.bind(null,t)).catch((function(e){return n(e,t)}))}}e.registry[r].push({hook:i,orig:n})}},4670:e=>{e.exports=register;function register(e,t,r,i){if(typeof r!=="function"){throw new Error("method for before hook must be a function")}if(!i){i={}}if(Array.isArray(t)){return t.reverse().reduce((function(t,r){return register.bind(null,e,r,t,i)}),r)()}return Promise.resolve().then((function(){if(!e.registry[t]){return r(i)}return e.registry[t].reduce((function(e,t){return t.hook.bind(null,e,i)}),r)()}))}},6819:e=>{e.exports=removeHook;function removeHook(e,t,r){if(!e.registry[t]){return}var i=e.registry[t].map((function(e){return e.orig})).indexOf(r);if(i===-1){return}e.registry[t].splice(i,1)}},3717:(e,t,r)=>{var i=r(6891);var n=r(9417);e.exports=expandTop;var s="\0SLASH"+Math.random()+"\0";var a="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var l="\0COMMA"+Math.random()+"\0";var c="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(s).split("\\{").join(a).split("\\}").join(o).split("\\,").join(l).split("\\.").join(c)}function unescapeBraces(e){return e.split(s).join("\\").split(a).join("{").split(o).join("}").split(l).join(",").split(c).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var s=r.body;var a=r.post;var o=i.split(",");o[o.length-1]+="{"+s+"}";var l=parseCommaParts(a);if(a.length){o[o.length-1]+=l.shift();o.push.apply(o,l)}t.push.apply(t,o);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var s=n("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body);var l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body);var c=a||l;var p=s.body.indexOf(",")>=0;if(!c&&!p){if(s.post.match(/,.*\}/)){e=s.pre+"{"+s.body+o+s.post;return expand(e)}return[e]}var d;if(c){d=s.body.split(/\.\./)}else{d=parseCommaParts(s.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){var A=s.post.length?expand(s.post,false):[""];return A.map((function(e){return s.pre+d[0]+e}))}}}var u=s.pre;var A=s.post.length?expand(s.post,false):[""];var m;if(c){var g=numeric(d[0]);var h=numeric(d[1]);var E=Math.max(d[0].length,d[1].length);var y=d.length==3?Math.abs(numeric(d[2])):1;var C=lte;var b=h0){var w=new Array(Q+1).join("0");if(B<0)v="-"+w+v.slice(1);else v=w+v}}}m.push(v)}}else{m=i(d,(function(e){return expand(e,false)}))}for(var x=0;x{var i=r(3837);var n=r(2781).Stream;var s=r(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}i.inherits(CombinedStream,n);CombinedStream.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof s)){var r=s.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){n.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};CombinedStream.prototype.end=function(){this._reset();this.emit("end")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},6891:e=>{e.exports=function(e,r){var i=[];for(var n=0;n{var i=r(2781).Stream;var n=r(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}n.inherits(DelayedStream,i);DelayedStream.create=function(e,t){var r=new this;t=t||{};for(var i in t){r[i]=t[i]}r.source=e;var n=e.emit;e.emit=function(){r._handleEmit(arguments);return n.apply(e,arguments)};e.on("error",(function(){}));if(r.pauseStream){e.pause()}return r};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=i.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},8932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class Deprecation extends Error{constructor(e){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="Deprecation"}}t.Deprecation=Deprecation},3287:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true}); +require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=s(r(1017));const c=s(r(1518));const p=s(r(8245));const d=r(3434);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,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield c.getCompressionMethod();let A="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});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}A=l.join(yield c.createTempDirectory(),c.getCacheFileName(a));o.debug(`Archive Path: ${A}`);yield p.downloadCache(t.archiveLocation,A,i);if(o.isDebug()){yield(0,d.listTar)(A,a)}const r=c.getArchiveFileSizeInBytes(A);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(A,a);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(A)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,A,u,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=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 y=l.join(E,c.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,h,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const l=10*1024*1024*1024;const C=c.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>l&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){g=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((u=(A=b===null||b===void 0?void 0:b.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} 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=b===null||b===void 0?void 0:b.error)===null||m===void 0?void 0:m.message}`)}o.debug(`Saving Cache (ID: ${g})`);yield p.saveCache(g,y,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(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return g}))}t.saveCache=saveCache},8245:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(5526);const p=s(r(6113));const d=s(r(7147));const A=r(7310);const u=s(r(1518));const m=r(5500);const g=r(6215);const h=r(3981);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 l.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 p.createHash("sha256").update(i.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();const n=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${n}`;const l=yield(0,h.retryTypedResponse)("getCacheEntry",(()=>a(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(s))}))));if(l.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],i,n)}return null}if(!(0,h.isSuccessStatusCode)(l.statusCode)){throw new Error(`Cache service responded with ${l.statusCode}`)}const c=l.result;const p=c===null||c===void 0?void 0:c.archiveLocation;if(!p){throw new Error("Cache not found.")}o.setSecret(p);o.debug(`Cache Result:`);o.debug(JSON.stringify(c));return c}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,r){return a(this,void 0,void 0,(function*(){const i=`caches?key=${encodeURIComponent(e)}`;const n=yield(0,h.retryTypedResponse)("listCache",(()=>a(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(i))}))));if(n.statusCode===200){const t=n.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 a(this,void 0,void 0,(function*(){const i=new A.URL(e);const n=(0,g.getDownloadOptions)(r);if(i.hostname.endsWith(".blob.core.windows.net")){if(n.useAzureSdk){yield(0,m.downloadCacheStorageSDK)(e,t,n)}else if(n.concurrentBlobDownloads){yield(0,m.downloadCacheHttpClientConcurrent)(e,t,n)}else{yield(0,m.downloadCacheHttpClient)(e,t)}}else{yield(0,m.downloadCacheHttpClient)(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();const n=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const s={key:e,version:n,cacheSize:r===null||r===void 0?void 0:r.cacheSize};const o=yield(0,h.retryTypedResponse)("reserveCache",(()=>a(this,void 0,void 0,(function*(){return i.postJson(getCacheApiUrl("caches"),s)}))));return o}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,i,n){return a(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${n-i+1} bytes at offset ${i} with content range: ${getContentRange(i,n)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(i,n)};const l=yield(0,h.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${n})`,(()=>a(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),s)}))));if(!(0,h.isSuccessStatusCode)(l.message.statusCode)){throw new Error(`Cache service responded with ${l.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=u.getArchiveFileSizeInBytes(r);const s=getCacheApiUrl(`caches/${t.toString()}`);const l=d.openSync(r,"r");const c=(0,g.getUploadOptions)(i);const p=u.assertDefined("uploadConcurrency",c.uploadConcurrency);const A=u.assertDefined("uploadChunkSize",c.uploadChunkSize);const m=[...new Array(p).keys()];o.debug("Awaiting all uploads");let h=0;try{yield Promise.all(m.map((()=>a(this,void 0,void 0,(function*(){while(hd.createReadStream(r,{fd:l,start:i,end:a,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,a)}})))))}finally{d.closeSync(l)}return}))}function commitCache(e,t,r){return a(this,void 0,void 0,(function*(){const i={size:r};return yield(0,h.retryTypedResponse)("commitCache",(()=>a(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),i)}))))}))}function saveCache(e,t,r){return a(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,r);o.debug("Commiting cache");const n=u.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const s=yield commitCache(i,e,n);if(!(0,h.isSuccessStatusCode)(s.statusCode)){throw new Error(`Cache service responded with ${s.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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,n){r=e[t](r),settle(i,n,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 l=s(r(2186));const c=s(r(1514));const p=s(r(8090));const d=s(r(7436));const A=s(r(7147));const u=s(r(1017));const m=s(r(5911));const g=s(r(3837));const h=r(4138);const E=r(8840);function createTempDirectory(){return a(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 d.mkdirP(r);return r}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return A.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,r,i,n;var s;return a(this,void 0,void 0,(function*(){const a=[];const c=(s=process.env["GITHUB_WORKSPACE"])!==null&&s!==void 0?s:process.cwd();const d=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var A=true,m=o(d.globGenerator()),g;g=yield m.next(),t=g.done,!t;A=true){n=g.value;A=false;const e=n;const t=u.relative(c,e).replace(new RegExp(`\\${u.sep}`,"g"),"/");l.debug(`Matched: ${t}`);if(t===""){a.push(".")}else{a.push(`${t}`)}}}catch(e){r={error:e}}finally{try{if(!A&&!t&&(i=m.return))yield i.call(m)}finally{if(r)throw r.error}}return a}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return a(this,void 0,void 0,(function*(){return g.promisify(A.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e,t=[]){return a(this,void 0,void 0,(function*(){let r="";t.push("--version");l.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){l.debug(e.message)}r=r.trim();l.debug(r);return r}))}function getCompressionMethod(){return a(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]);const t=m.clean(e);l.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 a(this,void 0,void 0,(function*(){if(A.existsSync(E.GnuTarPathOnWindows)){return E.GnuTarPathOnWindows}const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")?d.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},8840:(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 n;(function(e){e["GNU"]="gnu";e["BSD"]="bsd"})(n||(t.ArchiveToolType=n={}));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"},5500:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(4100);const p=s(r(4300));const d=s(r(7147));const A=s(r(2781));const u=s(r(3837));const m=s(r(1518));const g=r(8840);const h=r(3981);const E=r(2557);function pipeResponseToStream(e,t){return a(this,void 0,void 0,(function*(){const r=u.promisify(A.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 a(this,void 0,void 0,(function*(){const r=d.createWriteStream(t);const i=new l.HttpClient("actions/cache");const n=yield(0,h.retryHttpClientResponse)("downloadCache",(()=>a(this,void 0,void 0,(function*(){return i.get(e)}))));n.message.socket.setTimeout(g.SocketTimeout,(()=>{n.message.destroy();o.debug(`Aborting download, socket timed out after ${g.SocketTimeout} ms`)}));yield pipeResponseToStream(n,r);const s=n.message.headers["content-length"];if(s){const e=parseInt(s);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 a(this,void 0,void 0,(function*(){const n=yield d.promises.open(t,"w");const s=new l.HttpClient("actions/cache",undefined,{socketTimeout:r.timeoutInMs,keepAlive:true});try{const t=yield(0,h.retryHttpClientResponse)("downloadCacheMetadata",(()=>a(this,void 0,void 0,(function*(){return yield s.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 l=parseInt(o);if(Number.isNaN(l)){throw new Error(`Could not interpret Content-Length: ${l}`)}const c=[];const p=4*1024*1024;for(let t=0;ta(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(s,e,t,r)}))})}c.reverse();let d=0;let A=0;const u=new DownloadProgress(l);u.startDisplayTimer();const m=u.onProgress();const g=[];let E;const waitAndWrite=()=>a(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(g));yield n.write(e.buffer,0,e.count,e.offset);d--;delete g[e.offset];A+=e.count;m({loadedBytes:A})}));while(E=c.pop()){g[E.offset]=E.promiseGetter();d++;if(d>=((i=r.downloadConcurrency)!==null&&i!==void 0?i:10)){yield waitAndWrite()}}while(d>0){yield waitAndWrite()}}finally{s.dispose();yield n.close()}}))}t.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=5;let s=0;while(true){try{const n=3e4;const s=yield promiseWithTimeout(n,downloadSegment(e,t,r,i));if(typeof s==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return s}catch(e){if(s>=n){throw e}s++}}}))}function downloadSegment(e,t,r,i){return a(this,void 0,void 0,(function*(){const n=yield(0,h.retryHttpClientResponse)("downloadCachePart",(()=>a(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+i-1}`})}))));if(!n.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:r,count:i,buffer:yield n.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var i;return a(this,void 0,void 0,(function*(){const n=new c.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}});const s=yield n.getProperties();const a=(i=s.contentLength)!==null&&i!==void 0?i:-1;if(a<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(134217728,p.constants.MAX_LENGTH);const i=new DownloadProgress(a);const s=d.openSync(t,"w");try{i.startDisplayTimer();const t=new E.AbortController;const o=t.signal;while(!i.isDone()){const l=i.segmentOffset+i.segmentSize;const c=Math.min(e,a-l);i.nextSegment(c);const p=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,n.downloadToBuffer(l,c,{abortSignal:o,concurrency:r.downloadConcurrency,onProgress:i.onProgress()}));if(p==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(p)){d.writeFileSync(s,p)}}}finally{i.stopDisplayTimer();d.closeSync(s)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>a(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}))}))},3981:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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=s(r(2186));const l=r(6255);const c=r(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[l.HttpCodes.BadGateway,l.HttpCodes.ServiceUnavailable,l.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return a(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,i=c.DefaultRetryAttempts,n=c.DefaultRetryDelay,s=undefined){return a(this,void 0,void 0,(function*(){let a="";let l=1;while(l<=i){let c=undefined;let p=undefined;let d=false;try{c=yield t()}catch(e){if(s){c=s(e)}d=true;a=e.message}if(c){p=r(c);if(!isServerErrorStatusCode(p)){return c}}if(p){d=isRetryableStatusCode(p);a=`Cache service responded with ${p}`}o.debug(`${e} - Attempt ${l} of ${i} failed with error: ${a}`);if(!d){o.debug(`${e} - Error is not retryable`);break}yield sleep(n);l++}throw Error(`${e} failed: ${a}`)}))}t.retry=retry;function retryTypedResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return a(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,i,(e=>{if(e instanceof l.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 a(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,i)}))}t.retryHttpClientResponse=retryHttpClientResponse},3434:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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(1514);const l=s(r(7436));const c=r(7147);const p=s(r(1017));const d=s(r(1518));const A=r(8840);const u=process.platform==="win32";function getTarPath(){return a(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield d.getGnuTarPathOnWindows();const t=A.SystemTarPathOnWindows;if(e){return{path:e,type:A.ArchiveToolType.GNU}}else if((0,c.existsSync)(t)){return{path:t,type:A.ArchiveToolType.BSD}}break}case"darwin":{const e=yield l.which("gtar",false);if(e){return{path:e,type:A.ArchiveToolType.GNU}}else{return{path:yield l.which("tar",true),type:A.ArchiveToolType.BSD}}}default:break}return{path:yield l.which("tar",true),type:A.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,i=""){return a(this,void 0,void 0,(function*(){const n=[`"${e.path}"`];const s=d.getCacheFileName(t);const a="cache.tar";const o=getWorkingDirectory();const l=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(r){case"create":n.push("--posix","-cf",l?a:s.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",l?a:s.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",A.ManifestFilename);break;case"extract":n.push("-xf",l?a:i.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"));break;case"list":n.push("-tf",l?a:i.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P");break}if(e.type===A.ArchiveToolType.GNU){switch(process.platform){case"win32":n.push("--force-local");break;case"darwin":n.push("--delay-directory-restore");break}}return n}))}function getCommands(e,t,r=""){return a(this,void 0,void 0,(function*(){let i;const n=yield getTarPath();const s=yield getTarArgs(n,e,t,r);const a=t!=="create"?yield getDecompressionProgram(n,e,r):yield getCompressionProgram(n,e);const o=n.type===A.ArchiveToolType.BSD&&e!==A.CompressionMethod.Gzip&&u;if(o&&t!=="create"){i=[[...a].join(" "),[...s].join(" ")]}else{i=[[...s].join(" "),[...a].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 a(this,void 0,void 0,(function*(){const i=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(t){case A.CompressionMethod.Zstd:return i?["zstd -d --long=30 --force -o",A.TarFilename,r.replace(new RegExp(`\\${p.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d --long=30"':"unzstd --long=30"];case A.CompressionMethod.ZstdWithoutLong:return i?["zstd -d --force -o",A.TarFilename,r.replace(new RegExp(`\\${p.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return a(this,void 0,void 0,(function*(){const r=d.getCacheFileName(t);const i=e.type===A.ArchiveToolType.BSD&&t!==A.CompressionMethod.Gzip&&u;switch(t){case A.CompressionMethod.Zstd:return i?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${p.sep}`,"g"),"/"),A.TarFilename]:["--use-compress-program",u?'"zstd -T0 --long=30"':"zstdmt --long=30"];case A.CompressionMethod.ZstdWithoutLong:return i?["zstd -T0 --force -o",r.replace(new RegExp(`\\${p.sep}`,"g"),"/"),A.TarFilename]:["--use-compress-program",u?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return a(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 a(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}t.listTar=listTar;function extractTar(e,t){return a(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield l.mkdirP(r);const i=yield getCommands(t,"extract",e);yield execCommands(i)}))}t.extractTar=extractTar;function createTar(e,t,r){return a(this,void 0,void 0,(function*(){(0,c.writeFileSync)(p.join(e,A.ManifestFilename),t.join("\n"));const i=yield getCommands(r,"create");yield execCommands(i,e)}))}t.createTar=createTar},6215:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getDownloadOptions=t.getUploadOptions=void 0;const a=s(r(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}a.debug(`Upload concurrency: ${t.uploadConcurrency}`);a.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}a.debug(`Use Azure SDK: ${t.useAzureSdk}`);a.debug(`Download concurrency: ${t.downloadConcurrency}`);a.debug(`Request timeout (ms): ${t.timeoutInMs}`);a.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);a.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);a.debug(`Lookup only: ${t.lookupOnly}`);return t}t.getDownloadOptions=getDownloadOptions},4138:(e,t,r)=>{var i=r(1610);var n=r(8373);var s=n;s.v1=i;s.v4=n;e.exports=s},5694:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var i=r||0;var n=t;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}e.exports=bytesToUuid},4069:(e,t,r)=>{var i=r(6113);e.exports=function nodeRNG(){return i.randomBytes(16)}},1610:(e,t,r)=>{var i=r(4069);var n=r(5694);var s;var a;var o=0;var l=0;function v1(e,t,r){var c=t&&r||0;var p=t||[];e=e||{};var d=e.node||s;var A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){var u=i();if(d==null){d=s=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]}if(A==null){A=a=(u[6]<<8|u[7])&16383}}var m=e.msecs!==undefined?e.msecs:(new Date).getTime();var g=e.nsecs!==undefined?e.nsecs:l+1;var h=m-o+(g-l)/1e4;if(h<0&&e.clockseq===undefined){A=A+1&16383}if((h<0||m>o)&&e.nsecs===undefined){g=0}if(g>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=m;l=g;a=A;m+=122192928e5;var E=((m&268435455)*1e4+g)%4294967296;p[c++]=E>>>24&255;p[c++]=E>>>16&255;p[c++]=E>>>8&255;p[c++]=E&255;var y=m/4294967296*1e4&268435455;p[c++]=y>>>8&255;p[c++]=y&255;p[c++]=y>>>24&15|16;p[c++]=y>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(var C=0;C<6;++C){p[c+C]=d[C]}return t?t:n(p)}e.exports=v1},8373:(e,t,r)=>{var i=r(4069);var n=r(5694);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var a=e.random||(e.rng||i)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(t){for(var o=0;o<16;++o){t[s+o]=a[o]}}return t||n(a)}e.exports=v4},7351:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const a=s(r(2037));const o=r(5278);function issueCommand(e,t,r){const i=new Command(e,t,r);process.stdout.write(i.toString()+a.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const i=this.properties[r];if(i){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(i)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const o=r(7351);const l=r(717);const c=r(5278);const p=s(r(2037));const d=s(r(1017));const A=r(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=c.toCommandValue(t);process.env[e]=r;const i=process.env["GITHUB_ENV"]||"";if(i){return l.issueFileCommand("ENV",l.prepareKeyValueMessage(e,t))}o.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueFileCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(i.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return l.issueFileCommand("OUTPUT",l.prepareKeyValueMessage(e,t))}process.stdout.write(p.EOL);o.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){o.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){o.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){o.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+p.EOL)}t.info=info;function startGroup(e){o.issue("group",e)}t.startGroup=startGroup;function endGroup(){o.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return a(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return l.issueFileCommand("STATE",l.prepareKeyValueMessage(e,t))}o.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return a(this,void 0,void 0,(function*(){return yield A.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var m=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return m.summary}});var g=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var h=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return h.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return h.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return h.toPlatformPath}})},717:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const a=s(r(7147));const o=s(r(2037));const l=r(8974);const c=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}a.appendFileSync(r,`${c.toCommandValue(t)}${o.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${l.v4()}`;const i=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(i.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${o.EOL}${i}${o.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(6255);const s=r(5526);const a=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return i(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const i=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}a.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);a.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const a=s(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,a.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=r(2037);const s=r(7147);const{access:a,appendFile:o,writeFile:l}=s.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield a(e,s.constants.R_OK|s.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const i=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const i=t?l:o;yield i(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:i,rowspan:n}=e;const s=t?"th":"td";const a=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(s,r,a)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:i,height:n}=r||{};const s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const a=this.wrap("img",null,Object.assign({src:e,alt:t},s));return this.addRaw(a).addEOL()}addHeading(e,t){const r=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},8974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var i=_interopRequireDefault(r(1595));var n=_interopRequireDefault(r(6993));var s=_interopRequireDefault(r(1472));var a=_interopRequireDefault(r(6217));var o=_interopRequireDefault(r(2381));var l=_interopRequireDefault(r(427));var c=_interopRequireDefault(r(2609));var p=_interopRequireDefault(r(1458));var d=_interopRequireDefault(r(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},6385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},9784:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let s=n.length;function rng(){if(s>n.length-16){i.default.randomFillSync(n);s=0}return n.slice(s,s+=16)}},8844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var s=stringify;t["default"]=s},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(9784));var n=_interopRequireDefault(r(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let s;let a;let o=0;let l=0;function v1(e,t,r){let c=t&&r||0;const p=t||new Array(16);e=e||{};let d=e.node||s;let A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){const t=e.random||(e.rng||i.default)();if(d==null){d=s=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(A==null){A=a=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:l+1;const g=u-o+(m-l)/1e4;if(g<0&&e.clockseq===undefined){A=A+1&16383}if((g<0||u>o)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=u;l=m;a=A;u+=122192928e5;const h=((u&268435455)*1e4+m)%4294967296;p[c++]=h>>>24&255;p[c++]=h>>>16&255;p[c++]=h>>>8&255;p[c++]=h&255;const E=u/4294967296*1e4&268435455;p[c++]=E>>>8&255;p[c++]=E&255;p[c++]=E>>>24&15|16;p[c++]=E>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(let e=0;e<6;++e){p[c+e]=d[e]}return t||(0,n.default)(p)}var c=v1;t["default"]=c},6993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(5920));var n=_interopRequireDefault(r(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v3",48,n.default);var a=s;t["default"]=a},5920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(r(1458));var n=_interopRequireDefault(r(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(9784));var n=_interopRequireDefault(r(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const s=e.random||(e.rng||i.default)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=s[e]}return t}return(0,n.default)(s)}var s=v4;t["default"]=s},6217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(5920));var n=_interopRequireDefault(r(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v5",80,n.default);var a=s;t["default"]=a},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const o=r(1576);const l=s(r(8159));function exec(e,t,r){return a(this,void 0,void 0,(function*(){const i=l.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const s=new l.ToolRunner(n,t,r);return s.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var i,n;return a(this,void 0,void 0,(function*(){let s="";let a="";const l=new o.StringDecoder("utf8");const c=new o.StringDecoder("utf8");const p=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stdout;const d=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{a+=c.write(e);if(d){d(e)}};const stdOutListener=e=>{s+=l.write(e);if(p){p(e)}};const A=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:A}));s+=l.end();a+=c.end();return{exitCode:u,stdout:s,stderr:a}}))}t.getExecOutput=getExecOutput},8159:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const o=s(r(2037));const l=s(r(2361));const c=s(r(2081));const p=s(r(1017));const d=s(r(7436));const A=s(r(1962));const u=r(9512);const m=process.platform==="win32";class ToolRunner extends l.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(m){if(this._isCmdFile()){n+=r;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${r}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(r);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=r;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,r){try{let i=t+e.toString();let n=i.indexOf(o.EOL);while(n>-1){const e=i.substring(0,n);r(e);i=i.substring(n+o.EOL.length);n=i.indexOf(o.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(m){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(m){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const i of e){if(t.some((e=>e===i))){r=true;break}}if(!r){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(r&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return a(this,void 0,void 0,(function*(){if(!A.isRooted(this.toolPath)&&(this.toolPath.includes("/")||m&&this.toolPath.includes("\\"))){this.toolPath=p.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>a(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+o.EOL)}const i=new ExecState(r,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield A.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const s=c.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));let a="";if(s.stdout){s.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let l="";if(s.stderr){s.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}l=this._processLineBuffer(e,l,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}s.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));s.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));s.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((r,i)=>{if(a.length>0){this.emit("stdline",a)}if(l.length>0){this.emit("errline",l)}s.removeAllListeners();if(r){t(r)}else{e(i)}}));if(this.options.input){if(!s.stdin){throw new Error("child process missing stdin")}s.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let s=0;s0){t.push(n);n=""}continue}append(a)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends l.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},4087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Context=void 0;const i=r(7147);const n=r(2037);class Context{constructor(){var e,t,r;this.payload={};if(process.env.GITHUB_EVENT_PATH){if((0,i.existsSync)(process.env.GITHUB_EVENT_PATH)){this.payload=JSON.parse((0,i.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}))}else{const e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${n.EOL}`)}}this.eventName=process.env.GITHUB_EVENT_NAME;this.sha=process.env.GITHUB_SHA;this.ref=process.env.GITHUB_REF;this.workflow=process.env.GITHUB_WORKFLOW;this.action=process.env.GITHUB_ACTION;this.actor=process.env.GITHUB_ACTOR;this.job=process.env.GITHUB_JOB;this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10);this.runId=parseInt(process.env.GITHUB_RUN_ID,10);this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:`https://api.github.com`;this.serverUrl=(t=process.env.GITHUB_SERVER_URL)!==null&&t!==void 0?t:`https://github.com`;this.graphqlUrl=(r=process.env.GITHUB_GRAPHQL_URL)!==null&&r!==void 0?r:`https://api.github.com/graphql`}get issue(){const e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){const[e,t]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:t}}if(this.payload.repository){return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name}}throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}}t.Context=Context},5438:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokit=t.context=void 0;const a=s(r(4087));const o=r(3030);t.context=new a.Context;function getOctokit(e,t,...r){const i=o.GitHub.plugin(...r);return new i((0,o.getOctokitOptions)(e,t))}t.getOctokit=getOctokit},7914:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getApiBaseUrl=t.getProxyFetch=t.getProxyAgentDispatcher=t.getProxyAgent=t.getAuthString=void 0;const o=s(r(6255));const l=r(1773);function getAuthString(e,t){if(!e&&!t.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&t.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof t.auth==="string"?t.auth:`token ${e}`}t.getAuthString=getAuthString;function getProxyAgent(e){const t=new o.HttpClient;return t.getAgent(e)}t.getProxyAgent=getProxyAgent;function getProxyAgentDispatcher(e){const t=new o.HttpClient;return t.getAgentDispatcher(e)}t.getProxyAgentDispatcher=getProxyAgentDispatcher;function getProxyFetch(e){const t=getProxyAgentDispatcher(e);const proxyFetch=(e,r)=>a(this,void 0,void 0,(function*(){return(0,l.fetch)(e,Object.assign(Object.assign({},r),{dispatcher:t}))}));return proxyFetch}t.getProxyFetch=getProxyFetch;function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}t.getApiBaseUrl=getApiBaseUrl},3030:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokitOptions=t.GitHub=t.defaults=t.context=void 0;const a=s(r(4087));const o=s(r(7914));const l=r(6762);const c=r(3044);const p=r(4193);t.context=new a.Context;const d=o.getApiBaseUrl();t.defaults={baseUrl:d,request:{agent:o.getProxyAgent(d),fetch:o.getProxyFetch(d)}};t.GitHub=l.Octokit.plugin(c.restEndpointMethods,p.paginateRest).defaults(t.defaults);function getOctokitOptions(e,t){const r=Object.assign({},t||{});const i=o.getAuthString(e,r);if(i){r.auth=i}return r}t.getOctokitOptions=getOctokitOptions},8090:function(e,t,r){"use strict";var i=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=r(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const a=s(r(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;a.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;a.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;a.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?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,n){r=e[t](r),settle(i,n,r.done,r.value)}))}}function settle(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}};var l=this&&this.__await||function(e){return this instanceof l?(this.v=e,this):new l(e)};var c=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,s=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(r,i){s.push([e,t,r,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(s[0][3],e)}}function step(e){e.value instanceof l?Promise.resolve(e.value.v).then(fulfill,reject):settle(s[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),s.shift(),s.length)resume(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const p=s(r(2186));const d=s(r(7147));const A=s(r(1026));const u=s(r(1017));const m=s(r(9005));const g=r(1063);const h=r(4536);const E=r(9117);const y=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=A.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return a(this,void 0,void 0,(function*(){const r=[];try{for(var i=o(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;r.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return r}))}globGenerator(){return c(this,arguments,(function*globGenerator_1(){const e=A.getOptions(this.options);const t=[];for(const r of this.patterns){t.push(r);if(e.implicitDescendants&&(r.trailingSeparator||r.segments[r.segments.length-1]!=="**")){t.push(new h.Pattern(r.negate,true,r.segments.concat("**")))}}const r=[];for(const e of m.getSearchPaths(t)){p.debug(`Search path '${e}'`);try{yield l(d.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}r.unshift(new E.SearchState(e,1))}const i=[];while(r.length){const n=r.pop();const s=m.match(t,n.path);const a=!!s||m.partialMatch(t,n.path);if(!s&&!a){continue}const o=yield l(DefaultGlobber.stat(n,e,i));if(!o){continue}if(o.isDirectory()){if(s&g.MatchKind.Directory){yield yield l(n.path)}else if(!a){continue}const e=n.level+1;const t=(yield l(d.promises.readdir(n.path))).map((t=>new E.SearchState(u.join(n.path,t),e)));r.push(...t.reverse())}else if(s&g.MatchKind.File){yield yield l(n.path)}}}))}static create(e,t){return a(this,void 0,void 0,(function*(){const r=new DefaultGlobber(t);if(y){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{r.patterns.push(new h.Pattern(e))}}r.searchPaths.push(...m.getSearchPaths(r.patterns));return r}))}static stat(e,t,r){return a(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield d.promises.stat(e.path)}catch(r){if(r.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){p.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw r}}else{i=yield d.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield d.promises.realpath(e.path);while(r.length>=e.level){r.pop()}if(r.some((e=>e===t))){p.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}r.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var r;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(r=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const o=s(r(1017));const l=a(r(9491));const c=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(c&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=o.dirname(e);if(c&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){l.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);l.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(c){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();l.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();l.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}l.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||c&&e.endsWith("\\")){}else{e+=o.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){l.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(c){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){l.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(c){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(c){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(o.sep)){return e}if(e===o.sep){return e}if(c&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const o=s(r(1017));const l=s(r(1849));const c=a(r(9491));const p=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){c.default(e,`Parameter 'itemPath' must not be empty`);e=l.safeTrimTrailingSeparator(e);if(!l.hasRoot(e)){this.segments=e.split(o.sep)}else{let t=e;let r=l.dirname(t);while(r!==t){const e=o.basename(t);this.segments.unshift(e);t=r;r=l.dirname(t)}this.segments.unshift(t)}}else{c.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const r of e){const e=l?r.searchPath.toUpperCase():r.searchPath;t[e]="candidate"}const r=[];for(const i of e){const e=l?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let s=e;let o=a.dirname(s);while(o!==s){if(t[o]){n=true;break}s=o;o=a.dirname(s)}if(!n){r.push(i.searchPath);t[e]="included"}}return r}t.getSearchPaths=getSearchPaths;function match(e,t){let r=o.MatchKind.None;for(const i of e){if(i.negate){r&=~i.match(t)}else{r|=i.match(t)}}return r}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const o=s(r(2037));const l=s(r(1017));const c=s(r(1849));const p=a(r(9491));const d=r(3973);const A=r(1063);const u=r(6836);const m=process.platform==="win32";class Pattern{constructor(e,t=false,r,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{r=r||[];p.default(r.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(r[0]);p.default(t&&c.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(r).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=c.normalizeSeparators(n).endsWith(l.sep);n=c.safeTrimTrailingSeparator(n);let s=false;const a=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!s&&!(s=e==="")));this.searchPath=new u.Path(a).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(a[0]),m?"i":"");this.isImplicitPattern=t;const o={dot:true,nobrace:true,nocase:m,nocomment:true,noext:true,nonegate:true};n=m?n.replace(/\\/g,"/"):n;this.minimatch=new d.Minimatch(n,o)}match(e){if(this.segments[this.segments.length-1]==="**"){e=c.normalizeSeparators(e);if(!e.endsWith(l.sep)&&this.isImplicitPattern===false){e=`${e}${l.sep}`}}else{e=c.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?A.MatchKind.Directory:A.MatchKind.All}return A.MatchKind.None}partialMatch(e){e=c.safeTrimTrailingSeparator(e);if(c.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(m?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(m?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){p.default(e,"pattern cannot be empty");const r=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));p.default(r.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);p.default(!c.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=c.normalizeSeparators(e);if(e==="."||e.startsWith(`.${l.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${l.sep}`)){t=t||o.homedir();p.default(t,"Unable to determine HOME directory");p.default(c.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(m&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=c.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(m&&(e==="\\"||e.match(/^\\[^\\]/))){let t=c.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=c.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return c.normalizeSeparators(e)}static getLiteral(e){let t="";for(let r=0;r=0){if(i.length>1){return""}if(i){t+=i;r=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var r=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const o=s(r(3685));const l=s(r(5687));const c=s(r(9835));const p=s(r(4294));const d=r(1773);var A;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(A||(t.HttpCodes=A={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u||(t.Headers=u={}));var m;(function(e){e["ApplicationJson"]="application/json"})(m||(t.MediaTypes=m={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const g=[A.MovedPermanently,A.ResourceMoved,A.SeeOther,A.TemporaryRedirect,A.PermanentRedirect];const h=[A.BadGateway,A.ServiceUnavailable,A.GatewayTimeout];const E=["OPTIONS","GET","DELETE","HEAD"];const y=10;const C=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return a(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return a(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return a(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return a(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,i){return a(this,void 0,void 0,(function*(){return this.request(e,t,r,i)}))}getJson(e,t={}){return a(this,void 0,void 0,(function*(){t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,m.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.post(e,i,r);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.put(e,i,r);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,m.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,m.ApplicationJson);const n=yield this.patch(e,i,r);return this._processResponse(n,this.requestOptions)}))}request(e,t,r,i){return a(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let s=this._prepareRequest(e,n,i);const a=this._allowRetries&&E.includes(e)?this._maxRetries+1:1;let o=0;let l;do{l=yield this.requestRaw(s,r);if(l&&l.message&&l.message.statusCode===A.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(l)){e=t;break}}if(e){return e.handleAuthentication(this,s,r)}else{return l}}let t=this._maxRedirects;while(l.message.statusCode&&g.includes(l.message.statusCode)&&this._allowRedirects&&t>0){const a=l.message.headers["location"];if(!a){break}const o=new URL(a);if(n.protocol==="https:"&&n.protocol!==o.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();if(o.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}s=this._prepareRequest(e,o,i);l=yield this.requestRaw(s,r);t--}if(!l.message.statusCode||!h.includes(l.message.statusCode)){return l}o+=1;if(o{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;r(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let s;n.on("socket",(e=>{s=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(s){s.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=c.getProxyUrl(t);const i=r&&r.hostname;if(!i){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?l:o;const s=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):s;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const i=r&&r.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let s=100;if(this.requestOptions){s=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let i;const a=r.protocol==="https:";if(n){i=a?p.httpsOverHttps:p.httpsOverHttp}else{i=a?p.httpOverHttps:p.httpOverHttp}t=i(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=n?new l.Agent(e):new o.Agent(e);this._agent=t}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const i=e.protocol==="https:";r=new d.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=r;if(i&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return a(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=C*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return a(this,void 0,void 0,(function*(){return new Promise(((r,i)=>a(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const s={statusCode:n,result:null,headers:{}};if(n===A.NotFound){r(s)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let a;let o;try{o=yield e.readBody();if(o&&o.length>0){if(t&&t.deserializeDates){a=JSON.parse(o,dateTimeDeserializer)}else{a=JSON.parse(o)}s.result=a}s.headers=e.message.headers}catch(e){}if(n>299){let e;if(a&&a.message){e=a.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=s.result;i(t)}else{r(s)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new URL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new URL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let i;if(e.port){i=Number(e.port)}else if(e.protocol==="http:"){i=80}else if(e.protocol==="https:"){i=443}const n=[e.hostname.toUpperCase()];if(typeof i==="number"){n.push(`${n[0]}:${i}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||n.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},1962:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const l=s(r(7147));const c=s(r(1017));o=l.promises,t.chmod=o.chmod,t.copyFile=o.copyFile,t.lstat=o.lstat,t.mkdir=o.mkdir,t.open=o.open,t.readdir=o.readdir,t.readlink=o.readlink,t.rename=o.rename,t.rm=o.rm,t.rmdir=o.rmdir,t.stat=o.stat,t.symlink=o.symlink,t.unlink=o.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=l.constants.O_RDONLY;function exists(e){return a(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return a(this,void 0,void 0,(function*(){const i=r?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return a(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=c.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const s of r){e=n+s;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const r=c.dirname(e);const i=c.basename(e).toUpperCase();for(const n of yield t.readdir(r)){if(i===n.toUpperCase()){e=c.join(r,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const o=r(9491);const l=s(r(1017));const c=s(r(1962));function cp(e,t,r={}){return a(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:s}=readCopyOptions(r);const a=(yield c.exists(t))?yield c.stat(t):null;if(a&&a.isFile()&&!i){return}const o=a&&a.isDirectory()&&s?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,o,0,i)}}else{if(l.relative(e,o)===""){throw new Error(`'${o}' and '${e}' are the same file`)}yield copyFile(e,o,i)}}))}t.cp=cp;function mv(e,t,r={}){return a(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return a(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield c.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return a(this,void 0,void 0,(function*(){o.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const r=yield c.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const i=[];for(const n of r){const r=yield c.tryGetExecutablePath(l.join(n,e),t);if(r){i.push(r)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:i}}function cpDirRecursive(e,t,r,i){return a(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield c.readdir(e);for(const s of n){const n=`${e}/${s}`;const a=`${t}/${s}`;const o=yield c.lstat(n);if(o.isDirectory()){yield cpDirRecursive(n,a,r,i)}else{yield copyFile(n,a,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,r){return a(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const r=yield c.readlink(e);yield c.symlink(r,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||r){yield c.copyFile(e,t)}}))}},2473:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const o=s(r(5911));const l=r(2186);const c=r(2037);const p=r(2081);const d=r(7147);function _findMatch(t,r,i,n){return a(this,void 0,void 0,(function*(){const s=c.platform();let a;let p;let d;for(const a of i){const i=a.version;l.debug(`check ${i} satisfies ${t}`);if(o.satisfies(i,t)&&(!r||a.stable===r)){d=a.files.find((t=>{l.debug(`${t.arch}===${n} && ${t.platform}===${s}`);let r=t.arch===n&&t.platform===s;if(r&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){r=true}else{r=o.satisfies(i,t.platform_version)}}return r}));if(d){l.debug(`matched ${a.version}`);p=a;break}}}if(p&&d){a=Object.assign({},p);a.files=[d]}return a}))}t._findMatch=_findMatch;function _getOsVersion(){const t=c.platform();let r="";if(t==="darwin"){r=p.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let r="";if(d.existsSync(e)){r=d.readFileSync(e).toString()}else if(d.existsSync(t)){r=d.readFileSync(t).toString()}return r}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const o=s(r(2186));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return a(this,void 0,void 0,(function*(){let r=1;while(rsetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=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,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const l=s(r(2186));const c=s(r(7436));const p=s(r(7147));const d=s(r(2473));const A=s(r(2037));const u=s(r(1017));const m=s(r(6255));const g=s(r(5911));const h=s(r(2781));const E=s(r(3837));const y=r(9491);const C=o(r(7468));const b=r(1514);const I=r(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const B=process.platform==="win32";const v=process.platform==="darwin";const Q="actions/tool-cache";function downloadTool(e,t,r,i){return a(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),C.default());yield c.mkdirP(u.dirname(t));l.debug(`Downloading ${e}`);l.debug(`Destination ${t}`);const n=3;const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const p=new I.RetryHelper(n,s,o);return yield p.execute((()=>a(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",r,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r,i){return a(this,void 0,void 0,(function*(){if(p.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new m.HttpClient(Q,[],{allowRetries:false});if(r){l.debug("set auth");if(i===undefined){i={}}i.authorization=r}const s=yield n.get(e,i);if(s.message.statusCode!==200){const t=new HTTPError(s.message.statusCode);l.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`);throw t}const a=E.promisify(h.pipeline);const o=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>s.message));const d=o();let A=false;try{yield a(d,p.createWriteStream(t));l.debug("download complete");A=true;return t}finally{if(!A){l.debug("download failed");try{yield c.rmRF(t)}catch(e){l.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,r){return a(this,void 0,void 0,(function*(){y.ok(B,"extract7z() not supported on current OS");y.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(r){try{const t=l.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const n={silent:true};yield b.exec(`"${r}"`,i,n)}finally{process.chdir(i)}}else{const r=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const a=`& '${r}' -Source '${n}' -Target '${s}'`;const o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",a];const l={silent:true};try{const e=yield c.which("powershell",true);yield b.exec(`"${e}"`,o,l)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);l.debug("Checking tar --version");let i="";yield b.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});l.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let s;if(r instanceof Array){s=r}else{s=[r]}if(l.isDebug()&&!r.includes("v")){s.push("-v")}let a=t;let o=e;if(B&&n){s.push("--force-local");a=t.replace(/\\/g,"/");o=e.replace(/\\/g,"/")}if(n){s.push("--warning=no-unknown-keyword");s.push("--overwrite")}s.push("-C",a,"-f",o);yield b.exec(`tar`,s);return t}))}t.extractTar=extractTar;function extractXar(e,t,r=[]){return a(this,void 0,void 0,(function*(){y.ok(v,"extractXar() not supported on current OS");y.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(r instanceof Array){i=r}else{i=[r]}i.push("-x","-C",t,"-f",e);if(l.isDebug()){i.push("-v")}const n=yield c.which("xar",true);yield b.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(B){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return a(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield c.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];l.debug(`Using pwsh at path: ${n}`);yield b.exec(`"${n}"`,t)}else{const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield c.which("powershell",true);l.debug(`Using powershell at path: ${n}`);yield b.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return a(this,void 0,void 0,(function*(){const r=yield c.which("unzip",true);const i=[e];if(!l.isDebug()){i.unshift("-q")}i.unshift("-o");yield b.exec(`"${r}"`,i,{cwd:t})}))}function cacheDir(e,t,r,i){return a(this,void 0,void 0,(function*(){r=g.clean(r)||r;i=i||A.arch();l.debug(`Caching tool ${t} ${r} ${i}`);l.debug(`source dir: ${e}`);if(!p.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of p.readdirSync(e)){const r=u.join(e,t);yield c.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,n){return a(this,void 0,void 0,(function*(){i=g.clean(i)||i;n=n||A.arch();l.debug(`Caching tool ${r} ${i} ${n}`);l.debug(`source file: ${e}`);if(!p.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const s=yield _createToolPath(r,i,n);const a=u.join(s,t);l.debug(`destination file ${a}`);yield c.cp(e,a);_completeToolPath(r,i,n);return s}))}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||A.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,r);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=g.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,r);l.debug(`checking cache: ${n}`);if(p.existsSync(n)&&p.existsSync(`${n}.complete`)){l.debug(`Found tool in cache ${e} ${t} ${r}`);i=n}else{l.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const r=[];t=t||A.arch();const i=u.join(_getCacheDirectory(),e);if(p.existsSync(i)){const e=p.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(p.existsSync(e)&&p.existsSync(`${e}.complete`)){r.push(n)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return a(this,void 0,void 0,(function*(){let n=[];const s=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const a=new m.HttpClient("tool-cache");const o={};if(r){l.debug("set auth");o.authorization=r}const c=yield a.getJson(s,o);if(!c.result){return n}let p="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){p=e.url;break}}o["accept"]="application/vnd.github.VERSION.raw";let d=yield(yield a.get(p,o)).readBody();if(d){d=d.replace(/^\uFEFF/,"");try{n=JSON.parse(d)}catch(e){l.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=A.arch()){return a(this,void 0,void 0,(function*(){const n=yield d._findMatch(e,t,r,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return a(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),C.default())}yield c.mkdirP(e);return e}))}function _createToolPath(e,t,r){return a(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,g.clean(t)||t,r||"");l.debug(`destination ${i}`);const n=`${i}.complete`;yield c.rmRF(i);yield c.rmRF(n);yield c.mkdirP(i);return i}))}function _completeToolPath(e,t,r){const i=u.join(_getCacheDirectory(),e,g.clean(t)||t,r||"");const n=`${i}.complete`;p.writeFileSync(n,"");l.debug("finished caching tool")}function isExplicitVersion(e){const t=g.clean(e)||"";l.debug(`isExplicit: ${t}`);const r=g.valid(t)!=null;l.debug(`explicit? ${r}`);return r}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let r="";l.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(g.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const s=g.satisfies(n,t);if(s){r=n;break}}if(r){l.debug(`matched: ${r}`)}else{l.debug("match not found")}return r}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";y.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";y.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},7701:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var i=r||0;var n=t;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}e.exports=bytesToUuid},9886:(e,t,r)=>{var i=r(6113);e.exports=function nodeRNG(){return i.randomBytes(16)}},7468:(e,t,r)=>{var i=r(9886);var n=r(7701);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var a=e.random||(e.rng||i)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(t){for(var o=0;o<16;++o){t[s+o]=a[o]}}return t||n(a)}e.exports=v4},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;r.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=r.get(this);i.push(t)}removeEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=r.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=r.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const r=setTimeout(abortSignal,e,t);if(typeof r.unref==="function"){r.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const r of t){if(!objectHasProperty(e,r)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(3415);var n=r(3837);var s=r(4351);var a=r(6189);var o=r(1333);var l=r(3233);var c=r(9645);var p=r(2037);var d=r(3685);var A=r(5687);var u=r(2557);var m=r(4294);var g=r(2781);var h=r(6279);var E=r(467);var y=r(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var C=_interopNamespace(a);var b=_interopNamespace(p);var I=_interopNamespace(d);var B=_interopNamespace(A);var v=_interopNamespace(m);var Q=_interopDefaultLegacy(h);var w=_interopDefaultLegacy(E);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let r=0;r{r=r.then(e)}));return r}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,r,i){if(!Array.isArray(e)){e=[e]}if(!r||!i){return{[t]:e}}const n={[t]:e};n[S]={[r]:i};return n}function applyMixins(e,t){const r=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{r.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,r){return!e||!t?e:e.split(t).join(r||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,r){const failValidation=(e,i)=>{throw new Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const r=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:s,InclusiveMinimum:a,MaxItems:o,MaxLength:l,MinItems:c,MinLength:p,MultipleOf:d,Pattern:A,UniqueItems:u}=e.constraints;if(i!=undefined&&r>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&r<=n){failValidation("ExclusiveMinimum",n)}if(s!=undefined&&r>s){failValidation("InclusiveMaximum",s)}if(a!=undefined&&ro){failValidation("MaxItems",o)}if(l!=undefined&&m.length>l){failValidation("MaxLength",l)}if(c!=undefined&&m.lengthr.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};let l={};const c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Sequence$/i)!==null){l=[]}if(e.isConstant){t=e.defaultValue}const{required:p,nullable:d}=e;if(p&&d&&t===undefined){throw new Error(`${r} cannot be undefined.`)}if(p&&!d&&t==undefined){throw new Error(`${r} cannot be null or undefined.`)}if(!p&&d===false&&t===null){throw new Error(`${r} cannot be null.`)}if(t==undefined){l=t}else{if(c.match(/^any$/i)!==null){l=t}else if(c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){l=serializeBasicTypes(c,r,t)}else if(c.match(/^Enum$/i)!==null){const i=e;l=serializeEnumType(r,i.type.allowedValues,t)}else if(c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){l=serializeDateTypes(c,t,r)}else if(c.match(/^ByteArray$/i)!==null){l=serializeByteArrayType(r,t)}else if(c.match(/^Base64Url$/i)!==null){l=serializeBase64UrlType(r,t)}else if(c.match(/^Sequence$/i)!==null){l=serializeSequenceType(this,e,t,r,Boolean(this.isXML),o)}else if(c.match(/^Dictionary$/i)!==null){l=serializeDictionaryType(this,e,t,r,Boolean(this.isXML),o)}else if(c.match(/^Composite$/i)!==null){l=serializeCompositeType(this,e,t,r,Boolean(this.isXML),o)}}return l}deserialize(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let l;const c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Composite$/i)!==null){l=deserializeCompositeType(this,e,t,r,o)}else{if(this.isXML){const e=o.xmlCharKey;const r=t;if(r[S]!=undefined&&r[e]!=undefined){t=r[e]}}if(c.match(/^Number$/i)!==null){l=parseFloat(t);if(isNaN(l)){l=t}}else if(c.match(/^Boolean$/i)!==null){if(t==="true"){l=true}else if(t==="false"){l=false}else{l=t}}else if(c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){l=t}else if(c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){l=new Date(t)}else if(c.match(/^UnixTime$/i)!==null){l=unixTimeToDate(t)}else if(c.match(/^ByteArray$/i)!==null){l=decodeString(t)}else if(c.match(/^Base64Url$/i)!==null){l=base64UrlToByteArray(t)}else if(c.match(/^Sequence$/i)!==null){l=deserializeSequenceType(this,e,t,r,o)}else if(c.match(/^Dictionary$/i)!==null){l=deserializeDictionaryType(this,e,t,r,o)}}if(e.isConstant){l=e.defaultValue}return l}}function trimEnd(e,t){let r=e.length;while(r-1>=0&&e[r-1]===t){--r}return e.substr(0,r)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let r="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){r+=e.substr(0,e.length-1)+"."}else{r+=e;t.push(r);r=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,r){if(r!==null&&r!==undefined){if(e.match(/^Number$/i)!==null){if(typeof r!=="number"){throw new Error(`${t} with value ${r} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof r.valueOf()!=="string"){throw new Error(`${t} with value "${r}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()==="string"&&isValidUuid(r))){throw new Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof r!=="boolean"){throw new Error(`${t} with value ${r} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof r;if(e!=="string"&&e!=="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob==="function"||typeof Blob==="object")&&r instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return r}function serializeEnumType(e,t,r){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===r.toLowerCase()}return e===r}));if(!i){throw new Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return r}function serializeByteArrayType(e,t){let r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}r=encodeByteArray(t)}return r}function serializeBase64UrlType(e,t){let r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}r=bufferToBase64Url(t)||""}return r}function serializeDateTypes(e,t,r){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,r,i,n,s){if(!Array.isArray(r)){throw new Error(`${i} must be of type Array.`)}const a=t.type.element;if(!a||typeof a!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const o=[];for(let t=0;te!==n));if(o){a[n]=e.serialize(l,r[n],i+'["'+n+'"]',s)}}}return a}return r}function getXmlObjectValue(e,t,r,i){if(!r||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const s={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[S]){return t}else{const e=Object.assign({},t);e[S]=s;return e}}const a={};a[i.xmlCharKey]=t;a[S]=s;return a}function isSpecialXmlProperty(e,t){return[S,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,r,i,n){var s,a;const o=(s=n.xmlCharKey)!==null&&s!==void 0?s:N;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,r,"serializedName")}const l=resolveModelProperties(e,t,i);let c={};const p=[];for(const s of Object.keys(l)){const d=l[s];const A=splitSerializeName(l[s].serializedName);p.push(A[0]);const{serializedName:u,xmlName:m,xmlElementName:g}=d;let h=i;if(u!==""&&u!==undefined){h=i+"."+u}const E=d.headerCollectionPrefix;if(E){const t={};for(const i of Object.keys(r)){if(i.startsWith(E)){t[i.substring(E.length)]=e.deserialize(d.type.value,r[i],h,n)}p.push(i)}c[s]=t}else if(e.isXML){if(d.xmlIsAttribute&&r[S]){c[s]=e.deserialize(d,r[S][m],h,n)}else if(d.xmlIsMsText){if(r[o]!==undefined){c[s]=r[o]}else if(typeof r==="string"){c[s]=r}}else{const t=g||m||u;if(d.xmlIsWrapped){const t=r[m];const i=(a=t===null||t===void 0?void 0:t[g])!==null&&a!==void 0?a:[];c[s]=e.deserialize(d,i,h,n);p.push(m)}else{const i=r[t];c[s]=e.deserialize(d,i,h,n);p.push(t)}}}else{let i;let a=r;for(const e of A){if(!a)break;a=a[e]}i=a;const o=t.type.polymorphicDiscriminator;if(o&&s===o.clientName&&i==undefined){i=t.serializedName}let p;if(Array.isArray(r[s])&&l[s].serializedName===""){i=r[s];const t=e.deserialize(d,i,h,n);for(const[e,r]of Object.entries(c)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=r}}c=t}else if(i!==undefined||d.defaultValue!==undefined){p=e.deserialize(d,i,h,n);c[s]=p}}}const d=t.type.additionalProperties;if(d){const isAdditionalProperty=e=>{for(const t in l){const r=splitSerializeName(l[t].serializedName);if(r[0]===e){return false}}return true};for(const t in r){if(isAdditionalProperty(t)){c[t]=e.deserialize(d,r[t],i+'["'+t+'"]',n)}}}else if(r){for(const e of Object.keys(r)){if(c[e]===undefined&&!p.includes(e)&&!isSpecialXmlProperty(e,n)){c[e]=r[e]}}}return c}function deserializeDictionaryType(e,t,r,i,n){const s=t.type.value;if(!s||typeof s!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(r){const t={};for(const a of Object.keys(r)){t[a]=e.deserialize(s,r[a],i,n)}return t}return r}function deserializeSequenceType(e,t,r,i,n){const s=t.type.element;if(!s||typeof s!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(r){if(!Array.isArray(r)){r=[r]}const t=[];for(let a=0;a0}keys(){return Object.keys(this._rawQuery)}set(e,t){const r=t;if(e){if(r!==undefined&&r!==null){const t=Array.isArray(r)?r:r.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const r=this._rawQuery[t];if(Array.isArray(r)){const i=[];for(const e of r){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${r}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let r="ParameterName";let i="";let n="";for(let s=0;sisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,r){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:r&&r.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const s=isUrlHttps(e);const a=isUrlHttps(t.host);const o={isHttps:s,agent:createTunnel(s,a,n)};return o}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,r){if(e&&t){return v.httpsOverHttps(r)}else if(e&&!t){return v.httpsOverHttp(r)}else if(!e&&t){return v.httpOverHttps(r)}else{return v.httpOverHttp(r)}}function isValidPort(e){return 0<=e&&e<=65535}const _="REDACTED";const k=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const O=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?k.concat(e):k;t=Array.isArray(t)?O.concat(t):O;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,r)=>{if(r instanceof Error){return Object.assign(Object.assign({},r),{name:r.name,message:r.message})}if(e==="_headersMap"){return this.sanitizeHeaders(r)}else if(e==="url"){return this.sanitizeUrl(r)}else if(e==="query"){return this.sanitizeQuery(r)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(r)||isObject(r)){if(t.has(r)){return"[Circular]"}t.add(r)}return r}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,r){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=r(e,n)}else{i[n]=_}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const r=t.getQuery();if(!r){return e}const i=URLQuery.parse(r);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,_)}}t.setQuery(i.toString());return t.toString()}}const P=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,r,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=r;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[P](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const M=l.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,r){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});r(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((r=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();r()}));e.once("end",r);e.once("error",r)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,r)=>{t.set(r,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={}}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const r=new u.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new u.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){r.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{r.abort()}),e.timeout)}if(e.formData){const t=e.formData;const r=new Q["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){r.append(e,t.value,t.options)}else{r.append(e,t)}};for(const e of Object.keys(t)){const r=t[e];if(Array.isArray(r)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{M.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const r=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:s,password:a}=e.proxySettings;const o=`${i}:${n}:${s}:${a}`;const l=(t=this.proxyAgentMap.get(o))!==null&&t!==void 0?t:{};let c=getCachedAgent(r,l);if(c){return c}const p=createProxyAgent(e.url,e.proxySettings,e.headers);c=p.agent;if(p.isHttps){l.httpsAgent=p.agent}else{l.httpAgent=p.agent}this.proxyAgentMap.set(o,l);return c}else if(e.keepAlive){let t=getCachedAgent(r,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(r){t=this.keepAliveAgents.httpsAgent=new B.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new I.Agent(i)}return t}else{return r?B.globalAgent:I.globalAgent}}async fetch(e,t){return w["default"](e,t)}async prepareRequest(e){const t={};t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:r}=e,i=s.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(r){n.tracingContext=r.tracingContext;n.spanOptions=r===null||r===void 0?void 0:r.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:S,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const q=Object.assign({},U);q.explicitArray=false;q.renderOpts={pretty:false};function stringifyXML(e,t={}){var r;q.rootName=t.rootName;q.charkey=(r=t.xmlCharKey)!==null&&r!==void 0?r:N;const i=new C.Builder(q);return i.buildObject(e)}function parseXML(e,t={}){var r;H.explicitRoot=!!t.includeRoot;H.charkey=(r=t.xmlCharKey)!==null&&r!==void 0?r:N;const i=new C.Parser(H);return new Promise(((t,r)=>{if(!e){r(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){r(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(r,i)=>new DeserializationPolicy(r,i,e,t)}}const G=["application/json","text/json"];const V=["application/xml","application/atom+xml"];const j={expectedContentTypes:{json:G,xml:V}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,r,i={}){var n;super(e,t);this.jsonContentTypes=r&&r.json||G;this.xmlContentTypes=r&&r.xml||V;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:N}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const r=e.request;const i=r.operationSpec;if(i){const n=r.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let r;if(t===undefined){r=true}else if(typeof t==="boolean"){r=t}else{r=t(e)}return r}function deserializeResponseBody(e,t,r,i={}){var n,s,a;const o={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(s=i.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(a=i.xmlCharKey)!==null&&a!==void 0?a:N};return parse(e,t,r,o).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:s,shouldReturnResponse:a}=handleErrorResponse(e,t,n);if(s){throw s}else if(a){return e}if(n){if(n.bodyMapper){let r=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===T.Sequence){r=typeof r==="object"?r[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,r,"operationRes.parsedBody",i)}catch(t){const r=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw r}}else if(t.httpMethod==="HEAD"){e.parsedBody=r.status>=200&&r.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,r){var i;const n=200<=e.status&&e.status<300;const s=isOperationSpecEmpty(t)?n:!!r;if(s){if(r){if(!r.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const a=r!==null&&r!==void 0?r:t.responses.default;const o=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const l=o?`Unexpected status code: ${e.status}`:e.bodyAsText;const c=new RestError(l,undefined,e.status,e.request,e);if(!a){throw c}const p=a.bodyMapper;const d=a.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let i;if(p){let e=r;if(t.isXML&&p.type.name===T.Sequence){e=typeof r==="object"?r[p.xmlElementName]:[]}i=t.serializer.deserialize(p,e,"error.response.parsedBody")}const n=r.error||i||r;c.code=n.code;if(n.message){c.message=n.message}if(p){c.response.parsedBody=i}}if(e.headers&&d){c.response.parsedHeaders=t.serializer.deserialize(d,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){c.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:c,shouldReturnResponse:false}}function parse(e,t,r,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${r.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,r.status,r.request,r);return Promise.reject(n)};const s=((n=r.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(r.status))||r.request.streamResponseBody;if(!s&&r.bodyAsText){const n=r.bodyAsText;const s=r.headers.get("Content-Type")||"";const a=!s?[]:s.split(";").map((e=>e.toLowerCase()));if(a.length===0||a.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{r.parsedBody=JSON.parse(n);e(r)})).catch(errorHandler)}else if(a.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{r.parsedBody=e;return r})).catch(errorHandler)}}return Promise.resolve(r)}const z={enable:true};function keepAlivePolicy(e){return{create:(t,r)=>new KeepAlivePolicy(t,r,e||z)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.keepAliveOptions=r}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const Y=["GET","HEAD"];const J={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,r)=>new RedirectPolicy(t,r,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,r=20){super(e,t);this.maxRetries=r}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,r){const{request:i,status:n}=t;const s=t.headers.get("location");if(s&&(n===300||n===301&&Y.includes(i.method)||n===302&&Y.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||rhandleRedirect(e,t,r+1)))}return Promise.resolve(t)}const W=3;const X=1e3*30;const $=1e3*90;const K=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,r,i,n){if(!t(i,n)){return false}return r.retryCountnew ExponentialRetryPolicy(i,n,e,t,r)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const Z={maxRetries:W,retryDelayInMs:X,maxRetryDelayInMs:$};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,r,i,n){super(e,t);this.retryCount=isNumber(r)?r:W;this.retryInterval=isNumber(i)?i:X;this.maxRetryInterval=isNumber(n)?n:$}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,r,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(r===null||r===void 0?void 0:r.headers.get(x.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const s=t.abortSignal&&t.abortSignal.aborted;if(!s&&shouldRetry(e.retryCount,shouldPolicyRetry,i,r)){M.info(`Retrying request in ${i.retryInterval}`);try{await o.delay(i.retryInterval);const r=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,r,i)}catch(n){return retry$1(e,t,r,i,n)}}else if(s||n||!r){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,r&&r.status,r&&r.request,r);throw e}else{return r}}function logPolicy(e={}){return{create:(t,r)=>new LogPolicy(t,r,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:r=M.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=r;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let r;if(typeof e==="string"){r=e}else if(Array.isArray(e)){r=e.join(".")}else{r=t.serializedName}return r}function getStreamResponseStatusCodes(e){const t=new Set;for(const r in e.responses){const i=e.responses[r];if(i.bodyMapper&&i.bodyMapper.type.name===T.Stream){t.add(Number(r))}}return t}function getDefaultUserAgentKey(){return x.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${b.arch()}-${b.type()}-${b.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:x.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",r="/"){return e.map((e=>{const t=e.value?`${r}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ee=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const r=getUserAgentString(e.concat(t));return r}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const r=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,r)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,r,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=r;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const te={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,r){async function tryGetAccessToken(){if(Date.now()e.getToken(t,r);i=beginRefresh(tryGetAccessToken,s.retryIntervalInMs,(o=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&o!==void 0?o:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(a.mustRefresh)return refresh(e);if(a.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const r=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await r({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(x.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,r)=>new GenerateClientRequestIdPolicy(t,r,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this._requestIdHeaderName=r}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let re;function getCachedDefaultHttpClient(){if(!re){re=new NodeFetchHttpClient}return re}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const ie=[];let ne=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(x.HTTPS_PROXY);const t=getEnvironmentValue(x.ALL_PROXY);const r=getEnvironmentValue(x.HTTP_PROXY);return e||t||r}function isBypassed(e,t,r){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(r===null||r===void 0?void 0:r.has(i)){return r.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}r===null||r===void 0?void 0:r.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(x.NO_PROXY);ne=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:r,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const s=n.getScheme()?n.getScheme()+"://":"";return{host:s+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:r}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!ne){ie.push(...loadNoProxy())}return{create:(r,i)=>new ProxyPolicy(r,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const r=e.indexOf("://");const i=r!==-1?r+3:0;const n=e.substring(i,t);const s=n.indexOf(":");const a=s!==-1;const o=a?n.substring(0,s):n;const l=a?n.substring(s+1):undefined;const c=e.substring(0,i)+e.substring(t+1);return{username:o,password:l,urlWithoutAuth:c}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,r,i){super(e,t);this.proxySettings=r;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:ie,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,r)=>new RPRegistrationPolicy(t,r,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,r=30){super(e,t);this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,r){if(r.status===409){const i=checkRPNotRegisteredError(r.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return r}))}}return Promise.resolve(r)}function getRequestEssentials(e,t=false){const r=e.clone();if(t){r.url=e.url}r.headers.set("x-ms-client-request-id",generateUuid());r.headers.set("Content-Type","application/json; charset=utf-8");return r}function checkRPNotRegisteredError(e){let t,r;if(e){try{r=JSON.parse(e)}catch(e){}if(r&&r.error&&r.error.message&&r.error.code&&r.error.code==="MissingSubscriptionRegistration"){const e=r.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const r=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(r&&r[0]){t=r[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,r,i){const n=`${t}providers/${r}/register?api-version=2016-02-01`;const s=`${t}providers/${r}?api-version=2016-02-01`;const a=getRequestEssentials(i);a.method="POST";a.url=n;const o=await e._nextPolicy.sendRequest(a);if(o.status!==200){throw new Error(`Autoregistration of ${r} failed. Please try registering manually.`)}return getRegistrationStatus(e,s,i)}async function getRegistrationStatus(e,t,r){const i=getRequestEssentials(r);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const s=n.parsedBody;if(n.parsedBody&&s.registrationState&&s.registrationState==="Registered"){return true}else{await o.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,r)}}function signingPolicy(e){return{create:(t,r)=>new SigningPolicy(t,r,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,r,i){return{create:(n,s)=>new SystemErrorRetryPolicy(n,s,e,t,r,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,r,i,n,s){super(e,t);this.retryCount=isNumber(r)?r:W;this.retryInterval=isNumber(i)?i:X;this.minRetryInterval=isNumber(n)?n:K;this.maxRetryInterval=isNumber(s)?s:$}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,r,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,r,i)){try{await o.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,r,i,n)}}else{if(i){return Promise.reject(n.error)}return r}}const ae=3;const oe=x.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const le="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,r){super(e,t);this.numberOfRetries=0;this._handleResponse=r||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==oe.TooManyRequests&&t.status!==oe.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var r;const i=t.headers.get(x.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await o.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:le});if((r=e.abortSignal)===null||r===void 0?void 0:r.aborted){throw new u.AbortError(le)}if(this.numberOfRetries{let r=undefined;const i=this;const n=t;return{create(t,s){const a=getCredentialScopes(n,i.baseUri);if(!a){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(r===undefined||r===null){r=bearerTokenAuthenticationPolicy(e,a)}return r.create(t,s)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){M.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}M.info("ServiceClient: using default request policies");r=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(r);if(e){r=e}}}this._requestPolicyFactories=r}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let r=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){r=this._requestPolicyFactories[e].create(r,this._requestPolicyOptions)}}return r.sendRequest(t)}async sendOperationRequest(e,r,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const s=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const a=new WebResource;let o;try{const i=r.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}a.method=r.httpMethod;a.operationSpec=r;const n=URLBuilder.parse(i);if(r.path){n.appendPath(r.path)}if(r.urlParameters&&r.urlParameters.length>0){for(const t of r.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,r.serializer);i=r.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),s);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(r.queryParameters&&r.queryParameters.length>0){for(const i of r.queryParameters){let a=getOperationArgumentValueFromParameter(this,e,i,r.serializer);if(a!==undefined&&a!==null){a=r.serializer.serialize(i.mapper,a,getPathStringFromParameter(i),s);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(a.length===0){continue}else{for(const e in a){const t=a[e];a[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){a=a.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(a)){for(const e in a){if(a[e]!==undefined&&a[e]!==null){a[e]=encodeURIComponent(a[e])}}}else{a=encodeURIComponent(a)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){a=a.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),a)}}}a.url=n.toString();const l=r.contentType||this.requestContentType;if(l&&r.requestBody){a.headers.set("Content-Type",l)}if(r.headerParameters){for(const t of r.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,r.serializer);if(i!==undefined&&i!==null){i=r.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),s);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){a.headers.set(e+t,i[t])}}else{a.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const c=e.options;if(c){if(c.customHeaders){for(const e in c.customHeaders){a.headers.set(e,c.customHeaders[e])}}if(c.abortSignal){a.abortSignal=c.abortSignal}if(c.timeout){a.timeout=c.timeout}if(c.onUploadProgress){a.onUploadProgress=c.onUploadProgress}if(c.onDownloadProgress){a.onDownloadProgress=c.onDownloadProgress}if(c.spanOptions){a.spanOptions=c.spanOptions}if(c.tracingContext){a.tracingContext=c.tracingContext}if(c.shouldDeserialize!==undefined&&c.shouldDeserialize!==null){a.shouldDeserialize=c.shouldDeserialize}}a.withCredentials=this._withCredentials;serializeRequestBody(this,a,e,r);if(a.streamResponseStatusCodes===undefined){a.streamResponseStatusCodes=getStreamResponseStatusCodes(r)}let p;let d;try{p=await this.sendRequest(a)}catch(e){d=e}if(d){if(d.response){d.details=flattenResponse(d.response,r.responses[d.statusCode]||r.responses["default"])}o=Promise.reject(d)}else{o=Promise.resolve(flattenResponse(p,r.responses[p.status]))}}catch(e){o=Promise.reject(e)}const l=i;if(l){o.then((e=>l(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>l(e)))}return o}}function serializeRequestBody(e,t,r,i){var n,s,a,o,l,c;const p=(s=(n=r.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&s!==void 0?s:{};const d={rootName:(a=p.rootName)!==null&&a!==void 0?a:"",includeRoot:(o=p.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(l=p.xmlCharKey)!==null&&l!==void 0?l:N};const A=p.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,r,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:s,xmlName:a,xmlElementName:o,serializedName:l,xmlNamespace:p,xmlNamespacePrefix:u}=n;const m=n.type.name;try{if(t.body!==undefined&&t.body!==null||s){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,d);const r=m===T.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(p,e,m,t.body,d);if(m===T.Sequence){t.body=stringifyXML(prepareXMLRootList(i,o||a||l,e,p),{rootName:a||l,xmlCharKey:A})}else if(!r){t.body=stringifyXML(i,{rootName:a||l,xmlCharKey:A})}}else if(m===T.String&&(((c=i.contentType)===null||c===void 0?void 0:c.match("text/plain"))||i.mediaType==="text")){return}else if(!r){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(l,undefined," ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const s=getOperationArgumentValueFromParameter(e,r,n,i.serializer);if(s!==undefined&&s!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,s,getPathStringFromParameter(n),d)}}}}function getXmlValueWithNamespace(e,t,r,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){const r={};r[n.xmlCharKey]=i;r[S]={[t]:e};return r}return i}function getValueOrFunctionResult(e,t){let r;if(typeof e==="string"){r=e}else{r=t();if(typeof e==="function"){r=e(r)}}return r}function createDefaultRequestPolicyFactories(e,t){const r=[];if(t.generateClientRequestIdHeader){r.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){r.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ee);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){r.push(userAgentPolicy({key:i,value:n}))}r.push(redirectPolicy());r.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){r.push(exponentialRetryPolicy());r.push(systemErrorRetryPolicy());r.push(throttlingRetryPolicy())}r.push(deserializationPolicy(t.deserializationContentTypes));if(o.isNode){r.push(proxyPolicy(t.proxySettings))}r.push(logPolicy({logger:M.info}));return r}function createPipelineFromOptions(e,t){const r=[];if(e.sendStreamingJson){r.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const r=getDefaultUserAgentValue();if(t.indexOf(r)===-1){t.push(r)}i=t.join(" ")}const n=Object.assign(Object.assign({},z),e.keepAliveOptions);const s=Object.assign(Object.assign({},Z),e.retryOptions);const a=Object.assign(Object.assign({},J),e.redirectOptions);if(o.isNode){r.push(proxyPolicy(e.proxyOptions))}const l=Object.assign(Object.assign({},j),e.deserializationOptions);const c=Object.assign({},e.loggingOptions);r.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(l.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(s.maxRetries,s.retryDelayInMs,s.maxRetryDelayInMs));if(a.handleRedirects){r.push(redirectPolicy(a.maxRetries))}if(t){r.push(t)}r.push(logPolicy(c));if(o.isNode&&e.decompressResponse===false){r.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:r}}function getOperationArgumentValueFromParameter(e,t,r,i){return getOperationArgumentValueFromParameterPath(e,t,r.parameterPath,r.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,r,i,n){var s;let a;if(typeof r==="string"){r=[r]}const o=(s=t.options)===null||s===void 0?void 0:s.serializerOptions;if(Array.isArray(r)){if(r.length>0){if(i.isConstant){a=i.defaultValue}else{let n=getPropertyFromParameterPath(t,r);if(!n.propertyFound){n=getPropertyFromParameterPath(e,r)}let s=false;if(!n.propertyFound){s=i.required||r[0]==="options"&&r.length===2}a=s?i.defaultValue:n.propertyValue}const s=getPathStringFromParameterPath(r,i);n.serialize(i,a,s,o)}}else{if(i.required){a={}}for(const s in r){const l=i.type.modelProperties[s];const c=r[s];const p=getOperationArgumentValueFromParameterPath(e,t,c,l,n);const d=getPathStringFromParameterPath(c,l);n.serialize(l,p,d,o);if(p!==undefined&&p!==null){if(!a){a={}}a[s]=p}}}return a}function getPropertyFromParameterPath(e,t){const r={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},r),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const s=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||s){const t=[...e.parsedBody||[]];for(const r of Object.keys(n)){if(n[r].serializedName){t[r]=e.parsedBody[r]}}if(r){for(const e of Object.keys(r)){t[e]=r[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},r),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},r),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},r),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){return e.credentialScopes}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return y.createSpanFunction(e)}const pe=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=pe){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,r=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=r;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const de=x.HeaderConstants;const Ae="Basic";class BasicAuthenticationCredentials{constructor(e,t,r=Ae){this.authorizationScheme=Ae;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=r}signRequest(e){const t=`${this.userName}:${this.password}`;const r=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(de.AUTHORIZATION,r);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return o.delay}});Object.defineProperty(t,"isNode",{enumerable:true,get:function(){return o.isNode}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return c.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=x;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=T;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=S;t.XML_CHARKEY=N;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,r)=>{var i=r(5443);var n=r(3837);var s=r(1017);var a=r(3685);var o=r(5687);var l=r(7310).parse;var c=r(7147);var p=r(2781).Stream;var d=r(3583);var A=r(4812);var u=r(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var s=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var a=this._multiPartHeader(e,t,r);var o=this._multiPartFooter();s(a);s(t);s(o);this._trackLength(a,t,r)};FormData.prototype._trackLength=function(e,t,r){var i=0;if(r.knownLength!=null){i+=+r.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof p)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{c.stat(e.path,(function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(r){e.pause();t(null,+r.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var i=this._getContentDisposition(t,r);var n=this._getContentType(t,r);var s="";var a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof r.header=="object"){u(a,r.header)}var o;for(var l in a){if(!a.hasOwnProperty(l))continue;o=a[l];if(o==null){continue}if(!Array.isArray(o)){o=[o]}if(o.length){s+=l+": "+o.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+s+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var r,i;if(typeof t.filepath==="string"){r=s.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=s.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=s.basename(e.client._httpMessage.path||"")}if(r){i='filename="'+r+'"'}return i};FormData.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=d.lookup(e.name)}if(!r&&e.path){r=d.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=d.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=FormData.DEFAULT_CONTENT_TYPE}return r};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,i=this._streams.length;r{e.exports=function(e,t){Object.keys(t).forEach((function(r){e[r]=e[r]||t[r]}));return e}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var i=_interopRequireDefault(r(4757));var n=_interopRequireDefault(r(9982));var s=_interopRequireDefault(r(5393));var a=_interopRequireDefault(r(8788));var o=_interopRequireDefault(r(657));var l=_interopRequireDefault(r(7909));var c=_interopRequireDefault(r(4418));var p=_interopRequireDefault(r(4794));var d=_interopRequireDefault(r(7079));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},657:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},7079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},690:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},979:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let s=n.length;function rng(){if(s>n.length-16){i.default.randomFillSync(n);s=0}return n.slice(s,s+=16)}},6631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},4794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var s=stringify;t["default"]=s},4757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(979));var n=_interopRequireDefault(r(4794));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let s;let a;let o=0;let l=0;function v1(e,t,r){let c=t&&r||0;const p=t||new Array(16);e=e||{};let d=e.node||s;let A=e.clockseq!==undefined?e.clockseq:a;if(d==null||A==null){const t=e.random||(e.rng||i.default)();if(d==null){d=s=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(A==null){A=a=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:l+1;const g=u-o+(m-l)/1e4;if(g<0&&e.clockseq===undefined){A=A+1&16383}if((g<0||u>o)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=u;l=m;a=A;u+=122192928e5;const h=((u&268435455)*1e4+m)%4294967296;p[c++]=h>>>24&255;p[c++]=h>>>16&255;p[c++]=h>>>8&255;p[c++]=h&255;const E=u/4294967296*1e4&268435455;p[c++]=E>>>8&255;p[c++]=E&255;p[c++]=E>>>24&15|16;p[c++]=E>>>16&255;p[c++]=A>>>8|128;p[c++]=A&255;for(let e=0;e<6;++e){p[c+e]=d[e]}return t||(0,n.default)(p)}var c=v1;t["default"]=c},9982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4085));var n=_interopRequireDefault(r(4153));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v3",48,n.default);var a=s;t["default"]=a},4085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(r(4794));var n=_interopRequireDefault(r(7079));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(979));var n=_interopRequireDefault(r(4794));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const s=e.random||(e.rng||i.default)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=s[e]}return t}return(0,n.default)(s)}var s=v4;t["default"]=s},8788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4085));var n=_interopRequireDefault(r(6631));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const s=(0,i.default)("v5",80,n.default);var a=s;t["default"]=a},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(690));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},7909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(r(4418));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},7094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(3233);var n=r(2557);var s=r(1333);const a=i.createClientLogger("core-lro");const o=2e3;const l=["succeeded","canceled","failed"];function deserializeState(e){try{return JSON.parse(e).state}catch(t){throw new Error(`Unable to deserialize input state: ${e}`)}}function setStateError(e){const{state:t,stateProxy:r,isOperationError:i}=e;return e=>{if(i(e)){r.setError(t,e);r.setFailed(t)}throw e}}function appendReadableErrorMessage(e,t){let r=e;if(r.slice(-1)!=="."){r=r+"."}return r+" "+t}function simplifyError(e){let t=e.message;let r=e.code;let i=e;while(i.innererror){i=i.innererror;r=i.code;t=appendReadableErrorMessage(t,i.message)}return{code:r,message:t}}function processOperationStatus(e){const{state:t,stateProxy:r,status:i,isDone:n,processResult:s,getError:o,response:l,setErrorAsResult:c}=e;switch(i){case"succeeded":{r.setSucceeded(t);break}case"failed":{const e=o===null||o===void 0?void 0:o(l);let i="";if(e){const{code:t,message:r}=simplifyError(e);i=`. ${t}. ${r}`}const n=`The long-running operation has failed${i}`;r.setError(t,new Error(n));r.setFailed(t);a.warning(n);break}case"canceled":{r.setCanceled(t);break}}if((n===null||n===void 0?void 0:n(l,t))||n===undefined&&["succeeded","canceled"].concat(c?[]:["failed"]).includes(i)){r.setResult(t,buildResult({response:l,state:t,processResult:s}))}}function buildResult(e){const{processResult:t,response:r,state:i}=e;return t?t(r,i):r}async function initOperation(e){const{init:t,stateProxy:r,processResult:i,getOperationStatus:n,withOperationLocation:s,setErrorAsResult:o}=e;const{operationLocation:l,resourceLocation:c,metadata:p,response:d}=await t();if(l)s===null||s===void 0?void 0:s(l,false);const A={metadata:p,operationLocation:l,resourceLocation:c};a.verbose(`LRO: Operation description:`,A);const u=r.initState(A);const m=n({response:d,state:u,operationLocation:l});processOperationStatus({state:u,status:m,stateProxy:r,response:d,setErrorAsResult:o,processResult:i});return u}async function pollOperationHelper(e){const{poll:t,state:r,stateProxy:i,operationLocation:n,getOperationStatus:s,getResourceLocation:o,isOperationError:c,options:p}=e;const d=await t(n,p).catch(setStateError({state:r,stateProxy:i,isOperationError:c}));const A=s(d,r);a.verbose(`LRO: Status:\n\tPolling from: ${r.config.operationLocation}\n\tOperation status: ${A}\n\tPolling status: ${l.includes(A)?"Stopped":"Running"}`);if(A==="succeeded"){const e=o(d,r);if(e!==undefined){return{response:await t(e).catch(setStateError({state:r,stateProxy:i,isOperationError:c})),status:A}}}return{response:d,status:A}}async function pollOperation(e){const{poll:t,state:r,stateProxy:i,options:n,getOperationStatus:s,getResourceLocation:a,getOperationLocation:o,isOperationError:c,withOperationLocation:p,getPollingInterval:d,processResult:A,getError:u,updateState:m,setDelay:g,isDone:h,setErrorAsResult:E}=e;const{operationLocation:y}=r.config;if(y!==undefined){const{response:e,status:C}=await pollOperationHelper({poll:t,getOperationStatus:s,state:r,stateProxy:i,operationLocation:y,getResourceLocation:a,isOperationError:c,options:n});processOperationStatus({status:C,response:e,state:r,stateProxy:i,isDone:h,processResult:A,getError:u,setErrorAsResult:E});if(!l.includes(C)){const t=d===null||d===void 0?void 0:d(e);if(t)g(t);const i=o===null||o===void 0?void 0:o(e,r);if(i!==undefined){const e=y!==i;r.config.operationLocation=i;p===null||p===void 0?void 0:p(i,e)}else p===null||p===void 0?void 0:p(y,false)}m===null||m===void 0?void 0:m(r,e)}}function getOperationLocationPollingUrl(e){const{azureAsyncOperation:t,operationLocation:r}=e;return r!==null&&r!==void 0?r:t}function getLocationHeader(e){return e.headers["location"]}function getOperationLocationHeader(e){return e.headers["operation-location"]}function getAzureAsyncOperationHeader(e){return e.headers["azure-asyncoperation"]}function findResourceLocation(e){const{location:t,requestMethod:r,requestPath:i,resourceLocationConfig:n}=e;switch(r){case"PUT":{return i}case"DELETE":{return undefined}default:{switch(n){case"azure-async-operation":{return undefined}case"original-uri":{return i}case"location":default:{return t}}}}}function inferLroMode(e){const{rawResponse:t,requestMethod:r,requestPath:i,resourceLocationConfig:n}=e;const s=getOperationLocationHeader(t);const a=getAzureAsyncOperationHeader(t);const o=getOperationLocationPollingUrl({operationLocation:s,azureAsyncOperation:a});const l=getLocationHeader(t);const c=r===null||r===void 0?void 0:r.toLocaleUpperCase();if(o!==undefined){return{mode:"OperationLocation",operationLocation:o,resourceLocation:findResourceLocation({requestMethod:c,location:l,requestPath:i,resourceLocationConfig:n})}}else if(l!==undefined){return{mode:"ResourceLocation",operationLocation:l}}else if(c==="PUT"&&i){return{mode:"Body",operationLocation:i}}else{return undefined}}function transformStatus(e){const{status:t,statusCode:r}=e;if(typeof t!=="string"&&t!==undefined){throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${t}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`)}switch(t===null||t===void 0?void 0:t.toLocaleLowerCase()){case undefined:return toOperationStatus(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:{a.verbose(`LRO: unrecognized operation status: ${t}`);return t}}}function getStatus(e){var t;const{status:r}=(t=e.body)!==null&&t!==void 0?t:{};return transformStatus({status:r,statusCode:e.statusCode})}function getProvisioningState(e){var t,r;const{properties:i,provisioningState:n}=(t=e.body)!==null&&t!==void 0?t:{};const s=(r=i===null||i===void 0?void 0:i.provisioningState)!==null&&r!==void 0?r:n;return transformStatus({status:s,statusCode:e.statusCode})}function toOperationStatus(e){if(e===202){return"running"}else if(e<300){return"succeeded"}else{return"failed"}}function parseRetryAfter({rawResponse:e}){const t=e.headers["retry-after"];if(t!==undefined){const e=parseInt(t);return isNaN(e)?calculatePollingIntervalFromDate(new Date(t)):e*1e3}return undefined}function getErrorFromResponse(e){const t=e.flatResponse.error;if(!t){a.warning(`The long-running operation failed but there is no error property in the response's body`);return}if(!t.code||!t.message){a.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);return}return t}function calculatePollingIntervalFromDate(e){const t=Math.floor((new Date).getTime());const r=e.getTime();if(t{const e=await n.sendInitialRequest();const t=inferLroMode({rawResponse:e.rawResponse,requestPath:n.requestPath,requestMethod:n.requestMethod,resourceLocationConfig:r});return Object.assign({response:e,operationLocation:t===null||t===void 0?void 0:t.operationLocation,resourceLocation:t===null||t===void 0?void 0:t.resourceLocation},(t===null||t===void 0?void 0:t.mode)?{metadata:{mode:t.mode}}:{})},stateProxy:t,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e,getOperationStatus:getStatusFromInitialResponse,setErrorAsResult:s})}function getOperationLocation({rawResponse:e},t){var r;const i=(r=t.config.metadata)===null||r===void 0?void 0:r["mode"];switch(i){case"OperationLocation":{return getOperationLocationPollingUrl({operationLocation:getOperationLocationHeader(e),azureAsyncOperation:getAzureAsyncOperationHeader(e)})}case"ResourceLocation":{return getLocationHeader(e)}case"Body":default:{return undefined}}}function getOperationStatus({rawResponse:e},t){var r;const i=(r=t.config.metadata)===null||r===void 0?void 0:r["mode"];switch(i){case"OperationLocation":{return getStatus(e)}case"ResourceLocation":{return toOperationStatus(e.statusCode)}case"Body":{return getProvisioningState(e)}default:throw new Error(`Internal error: Unexpected operation mode: ${i}`)}}function getResourceLocation({flatResponse:e},t){if(typeof e==="object"){const r=e.resourceLocation;if(r!==undefined){t.config.resourceLocation=r}}return t.config.resourceLocation}function isOperationError(e){return e.name==="RestError"}async function pollHttpOperation(e){const{lro:t,stateProxy:r,options:i,processResult:n,updateState:s,setDelay:a,state:o,setErrorAsResult:l}=e;return pollOperation({state:o,stateProxy:r,setDelay:a,processResult:n?({flatResponse:e},t)=>n(e,t):({flatResponse:e})=>e,getError:getErrorFromResponse,updateState:s,getPollingInterval:parseRetryAfter,getOperationLocation:getOperationLocation,getOperationStatus:getOperationStatus,isOperationError:isOperationError,getResourceLocation:getResourceLocation,options:i,poll:async(e,r)=>t.sendPollRequest(e,r),setErrorAsResult:l})}const createStateProxy$1=()=>({initState:e=>({status:"running",config:e}),setCanceled:e=>e.status="canceled",setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.status="running",setSucceeded:e=>e.status="succeeded",setFailed:e=>e.status="failed",getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>e.status==="canceled",isFailed:e=>e.status==="failed",isRunning:e=>e.status==="running",isSucceeded:e=>e.status==="succeeded"});function buildCreatePoller(e){const{getOperationLocation:t,getStatusFromInitialResponse:r,getStatusFromPollResponse:i,isOperationError:a,getResourceLocation:l,getPollingInterval:c,getError:p,resolveOnUnsuccessful:d}=e;return async({init:e,poll:A},u)=>{const{processResult:m,updateState:g,withOperationLocation:h,intervalInMs:E=o,restoreFrom:y}=u||{};const C=createStateProxy$1();const b=h?(()=>{let e=false;return(t,r)=>{if(r)h(t);else if(!e)h(t);e=true}})():undefined;const I=y?deserializeState(y):await initOperation({init:e,stateProxy:C,processResult:m,getOperationStatus:r,withOperationLocation:b,setErrorAsResult:!d});let B;const v=new n.AbortController;const Q=new Map;const handleProgressEvents=async()=>Q.forEach((e=>e(I)));const w="Operation was canceled";let x=E;const S={getOperationState:()=>I,getResult:()=>I.result,isDone:()=>["succeeded","failed","canceled"].includes(I.status),isStopped:()=>B===undefined,stopPolling:()=>{v.abort()},toString:()=>JSON.stringify({state:I}),onProgress:e=>{const t=Symbol();Q.set(t,e);return()=>Q.delete(t)},pollUntilDone:e=>B!==null&&B!==void 0?B:B=(async()=>{const{abortSignal:t}=e||{};const{signal:r}=t?new n.AbortController([t,v.signal]):v;if(!S.isDone()){await S.poll({abortSignal:r});while(!S.isDone()){await s.delay(x,{abortSignal:r});await S.poll({abortSignal:r})}}if(d){return S.getResult()}else{switch(I.status){case"succeeded":return S.getResult();case"canceled":throw new Error(w);case"failed":throw I.error;case"notStarted":case"running":throw new Error(`Polling completed without succeeding or failing`)}}})().finally((()=>{B=undefined})),async poll(e){if(d){if(S.isDone())return}else{switch(I.status){case"succeeded":return;case"canceled":throw new Error(w);case"failed":throw I.error}}await pollOperation({poll:A,state:I,stateProxy:C,getOperationLocation:t,isOperationError:a,withOperationLocation:b,getPollingInterval:c,getOperationStatus:i,getResourceLocation:l,processResult:m,getError:p,updateState:g,options:e,setDelay:e=>{x=e},setErrorAsResult:!d});await handleProgressEvents();if(!d){switch(I.status){case"canceled":throw new Error(w);case"failed":throw I.error}}}};return S}}async function createHttpPoller(e,t){const{resourceLocationConfig:r,intervalInMs:i,processResult:n,restoreFrom:s,updateState:a,withOperationLocation:o,resolveOnUnsuccessful:l=false}=t||{};return buildCreatePoller({getStatusFromInitialResponse:getStatusFromInitialResponse,getStatusFromPollResponse:getOperationStatus,isOperationError:isOperationError,getOperationLocation:getOperationLocation,getResourceLocation:getResourceLocation,getPollingInterval:parseRetryAfter,getError:getErrorFromResponse,resolveOnUnsuccessful:l})({init:async()=>{const t=await e.sendInitialRequest();const i=inferLroMode({rawResponse:t.rawResponse,requestPath:e.requestPath,requestMethod:e.requestMethod,resourceLocationConfig:r});return Object.assign({response:t,operationLocation:i===null||i===void 0?void 0:i.operationLocation,resourceLocation:i===null||i===void 0?void 0:i.resourceLocation},(i===null||i===void 0?void 0:i.mode)?{metadata:{mode:i.mode}}:{})},poll:e.sendPollRequest},{intervalInMs:i,withOperationLocation:o,restoreFrom:s,updateState:a,processResult:n?({flatResponse:e},t)=>n(e,t):({flatResponse:e})=>e})}const createStateProxy=()=>({initState:e=>({config:e,isStarted:true}),setCanceled:e=>e.isCancelled=true,setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.isStarted=true,setSucceeded:e=>e.isCompleted=true,setFailed:()=>{},getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>!!e.isCancelled,isFailed:e=>!!e.error,isRunning:e=>!!e.isStarted,isSucceeded:e=>Boolean(e.isCompleted&&!e.isCancelled&&!e.error)});class GenericPollOperation{constructor(e,t,r,i,n,s,a){this.state=e;this.lro=t;this.setErrorAsResult=r;this.lroResourceLocationConfig=i;this.processResult=n;this.updateState=s;this.isDone=a}setPollerConfig(e){this.pollerConfig=e}async update(e){var t;const r=createStateProxy();if(!this.state.isStarted){this.state=Object.assign(Object.assign({},this.state),await initHttpOperation({lro:this.lro,stateProxy:r,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult}))}const i=this.updateState;const n=this.isDone;if(!this.state.isCompleted&&this.state.error===undefined){await pollHttpOperation({lro:this.lro,state:this.state,stateProxy:r,processResult:this.processResult,updateState:i?(e,{rawResponse:t})=>i(e,t):undefined,isDone:n?({flatResponse:e},t)=>n(e,t):undefined,options:e,setDelay:e=>{this.pollerConfig.intervalInMs=e},setErrorAsResult:this.setErrorAsResult})}(t=e===null||e===void 0?void 0:e.fireProgress)===null||t===void 0?void 0:t.call(e,this.state);return this}async cancel(){a.error("`cancelOperation` is deprecated because it wasn't implemented");return this}toString(){return JSON.stringify({state:this.state})}}class PollerStoppedError extends Error{constructor(e){super(e);this.name="PollerStoppedError";Object.setPrototypeOf(this,PollerStoppedError.prototype)}}class PollerCancelledError extends Error{constructor(e){super(e);this.name="PollerCancelledError";Object.setPrototypeOf(this,PollerCancelledError.prototype)}}class Poller{constructor(e){this.resolveOnUnsuccessful=false;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise(((e,t)=>{this.resolve=e;this.reject=t}));this.promise.catch((()=>{}))}async startPolling(e={}){if(this.stopped){this.stopped=false}while(!this.isStopped()&&!this.isDone()){await this.poll(e);await this.delay()}}async pollOnce(e={}){if(!this.isDone()){this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})}this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks){t(e)}}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const clearPollOncePromise=()=>{this.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error){this.stopped=true;if(!this.resolveOnUnsuccessful){this.reject(this.operation.state.error);throw this.operation.state.error}}if(this.operation.state.isCancelled){this.stopped=true;if(!this.resolveOnUnsuccessful){const e=new PollerCancelledError("Operation was canceled");this.reject(e);throw e}}if(this.isDone()&&this.resolve){this.resolve(this.getResult())}}async pollUntilDone(e={}){if(this.stopped){this.startPolling(e).catch(this.reject)}this.processUpdatedState();return this.promise}onProgress(e){this.pollProgressCallbacks.push(e);return()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new PollerStoppedError("This poller is already stopped"))}}}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){const e=this.operation.state;return e.result}toString(){return this.operation.toString()}}class LroEngine extends Poller{constructor(e,t){const{intervalInMs:r=o,resumeFrom:i,resolveOnUnsuccessful:n=false,isDone:s,lroResourceLocationConfig:a,processResult:l,updateState:c}=t||{};const p=i?deserializeState(i):{};const d=new GenericPollOperation(p,e,!n,a,l,c,s);super(d);this.resolveOnUnsuccessful=n;this.config={intervalInMs:r};d.setPollerConfig(this.config)}delay(){return new Promise((e=>setTimeout((()=>e()),this.config.intervalInMs)))}}t.LroEngine=LroEngine;t.Poller=Poller;t.PollerCancelledError=PollerCancelledError;t.PollerStoppedError=PollerStoppedError;t.createHttpPoller=createHttpPoller},4559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(4351);function getPagedAsyncIterator(e){var t;const r=getItemAsyncIterator(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:(t=e===null||e===void 0?void 0:e.byPage)!==null&&t!==void 0?t:t=>{const{continuationToken:r,maxPageSize:i}=t!==null&&t!==void 0?t:{};return getPageAsyncIterator(e,{pageLink:r,maxPageSize:i})}}}function getItemAsyncIterator(e){return i.__asyncGenerator(this,arguments,(function*getItemAsyncIterator_1(){var t,r,n,s;const a=getPageAsyncIterator(e);const o=yield i.__await(a.next());if(!Array.isArray(o.value)){const{toElements:n}=e;if(n){yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(n(o.value))));try{for(var l=i.__asyncValues(a),c;c=yield i.__await(l.next()),!c.done;){const e=c.value;yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(n(e))))}}catch(e){t={error:e}}finally{try{if(c&&!c.done&&(r=l.return))yield i.__await(r.call(l))}finally{if(t)throw t.error}}}else{yield yield i.__await(o.value);yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(a)))}}else{yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(o.value)));try{for(var p=i.__asyncValues(a),d;d=yield i.__await(p.next()),!d.done;){const e=d.value;yield i.__await(yield*i.__asyncDelegator(i.__asyncValues(e)))}}catch(e){n={error:e}}finally{try{if(d&&!d.done&&(s=p.return))yield i.__await(s.call(p))}finally{if(n)throw n.error}}}}))}function getPageAsyncIterator(e,t={}){return i.__asyncGenerator(this,arguments,(function*getPageAsyncIterator_1(){const{pageLink:r,maxPageSize:n}=t;let s=yield i.__await(e.getPage(r!==null&&r!==void 0?r:e.firstPageLink,n));if(!s){return yield i.__await(void 0)}yield yield i.__await(s.page);while(s.nextPageLink){s=yield i.__await(e.getPage(s.nextPageLink,n));if(!s){return yield i.__await(void 0)}yield yield i.__await(s.page)}}))}t.getPagedAsyncIterator=getPagedAsyncIterator},4175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(5163);(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(t.SpanKind||(t.SpanKind={}));function getSpan(e){return i.trace.getSpan(e)}function setSpan(e,t){return i.trace.setSpan(e,t)}function setSpanContext(e,t){return i.trace.setSpanContext(e,t)}function getSpanContext(e){return i.trace.getSpanContext(e)}function isSpanContextValid(e){return i.trace.isSpanContextValid(e)}function getTracer(e,t){return i.trace.getTracer(e||"azure/core-tracing",t)}const n=i.context;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(t.SpanStatusCode||(t.SpanStatusCode={}));function isTracingDisabled(){var e;if(typeof process==="undefined"){return false}const t=(e=process.env.AZURE_TRACING_DISABLED)===null||e===void 0?void 0:e.toLowerCase();if(t==="false"||t==="0"){return false}return Boolean(t)}function createSpanFunction(e){return function(r,s){const a=getTracer();const o=(s===null||s===void 0?void 0:s.tracingOptions)||{};const l=Object.assign({kind:t.SpanKind.INTERNAL},o.spanOptions);const c=e.packagePrefix?`${e.packagePrefix}.${r}`:r;let p;if(isTracingDisabled()){p=i.trace.wrapSpanContext(i.INVALID_SPAN_CONTEXT)}else{p=a.startSpan(c,l,o.tracingContext)}if(e.namespace){p.setAttribute("az.namespace",e.namespace)}let d=o.spanOptions||{};if(p.isRecording()&&e.namespace){d=Object.assign(Object.assign({},o.spanOptions),{attributes:Object.assign(Object.assign({},l.attributes),{"az.namespace":e.namespace})})}const A=Object.assign(Object.assign({},o),{spanOptions:d,tracingContext:setSpan(o.tracingContext||n.active(),p)});const u=Object.assign(Object.assign({},s),{tracingOptions:A});return{span:p,updatedOptions:u}}}const s="00";function extractSpanContextFromTraceParentHeader(e){const t=e.split("-");if(t.length!==4){return}const[r,i,n,a]=t;if(r!==s){return}const o=parseInt(a,16);const l={spanId:n,traceId:i,traceFlags:o};return l}function getTraceParentHeader(e){const t=[];if(!e.traceId){t.push("traceId")}if(!e.spanId){t.push("spanId")}if(t.length){return}const r=e.traceFlags||0;const i=r.toString(16);const n=i.length===1?`0${i}`:i;return`${s}-${e.traceId}-${e.spanId}-${n}`}t.context=n;t.createSpanFunction=createSpanFunction;t.extractSpanContextFromTraceParentHeader=extractSpanContextFromTraceParentHeader;t.getSpan=getSpan;t.getSpanContext=getSpanContext;t.getTraceParentHeader=getTraceParentHeader;t.getTracer=getTracer;t.isSpanContextValid=isSpanContextValid;t.setSpan=setSpan;t.setSpanContext=setSpanContext},1333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2557);var n=r(6113);var s;const a=typeof process!=="undefined"&&Boolean(process.version)&&Boolean((s=process.versions)===null||s===void 0?void 0:s.node);function createAbortablePromise(e,t){const{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=t!==null&&t!==void 0?t:{};return new Promise(((t,a)=>{function rejectOnAbort(){a(new i.AbortError(s!==null&&s!==void 0?s:"The operation was aborted."))}function removeListeners(){n===null||n===void 0?void 0:n.removeEventListener("abort",onAbort)}function onAbort(){r===null||r===void 0?void 0:r();removeListeners();rejectOnAbort()}if(n===null||n===void 0?void 0:n.aborted){return rejectOnAbort()}try{e((e=>{removeListeners();t(e)}),(e=>{removeListeners();a(e)}))}catch(e){a(e)}n===null||n===void 0?void 0:n.addEventListener("abort",onAbort)}))}const o="The delay was aborted.";function delay(e,t){let r;const{abortSignal:i,abortErrorMsg:n}=t!==null&&t!==void 0?t:{};return createAbortablePromise((t=>{r=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:n!==null&&n!==void 0?n:o})}function getRandomIntegerInclusive(e,t){e=Math.ceil(e);t=Math.floor(t);const r=Math.floor(Math.random()*(t-e+1));return r+e}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function isError(e){if(isObject(e)){const t=typeof e.name==="string";const r=typeof e.message==="string";return t&&r}return false}function getErrorMessage(e){if(isError(e)){return e.message}else{let t;try{if(typeof e==="object"&&e){t=JSON.stringify(e)}else{t=String(e)}}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}async function computeSha256Hmac(e,t,r){const i=Buffer.from(e,"base64");return n.createHmac("sha256",i).update(t).digest(r)}async function computeSha256Hash(e,t){return n.createHash("sha256").update(e).digest(t)}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const r of t){if(!objectHasProperty(e,r)){return false}}return true}function objectHasProperty(e,t){return isDefined(e)&&typeof e==="object"&&t in e}function generateUUID(){let e="";for(let t=0;t<32;t++){const r=Math.floor(Math.random()*16);if(t===12){e+="4"}else if(t===16){e+=r&3|8}else{e+=r.toString(16)}if(t===7||t===11||t===15||t===19){e+="-"}}return e}var l;let c=typeof((l=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||l===void 0?void 0:l.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):n.randomUUID;if(!c){c=generateUUID}function randomUUID(){return c()}t.computeSha256Hash=computeSha256Hash;t.computeSha256Hmac=computeSha256Hmac;t.createAbortablePromise=createAbortablePromise;t.delay=delay;t.getErrorMessage=getErrorMessage;t.getRandomIntegerInclusive=getRandomIntegerInclusive;t.isDefined=isDefined;t.isError=isError;t.isNode=a;t.isObject=isObject;t.isObjectWithProperties=isObjectWithProperties;t.objectHasProperty=objectHasProperty;t.randomUUID=randomUUID},3233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2037);var n=r(3837);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=_interopDefaultLegacy(n);function log(e,...t){process.stderr.write(`${s["default"].format(e,...t)}${i.EOL}`)}const a=typeof process!=="undefined"&&process.env&&process.env.DEBUG||undefined;let o;let l=[];let c=[];const p=[];if(a){enable(a)}const d=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log});function enable(e){o=e;l=[];c=[];const t=/\*/g;const r=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of r){if(e.startsWith("-")){c.push(new RegExp(`^${e.substr(1)}$`))}else{l.push(new RegExp(`^${e}$`))}}for(const e of p){e.enabled=enabled(e.namespace)}}function enabled(e){if(e.endsWith("*")){return true}for(const t of c){if(t.test(e)){return false}}for(const t of l){if(t.test(e)){return true}}return false}function disable(){const e=o||"";enable("");return e}function createDebugger(e){const t=Object.assign(debug,{enabled:enabled(e),destroy:destroy,log:d.log,namespace:e,extend:extend});function debug(...r){if(!t.enabled){return}if(r.length>0){r[0]=`${e} ${r[0]}`}t.log(...r)}p.push(t);return t}function destroy(){const e=p.indexOf(this);if(e>=0){p.splice(e,1);return true}return false}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);t.log=this.log;return t}var A=d;const u=new Set;const m=typeof process!=="undefined"&&process.env&&process.env.AZURE_LOG_LEVEL||undefined;let g;const h=A("azure");h.log=(...e)=>{A.log(...e)};const E=["verbose","info","warning","error"];if(m){if(isAzureLogLevel(m)){setLogLevel(m)}else{console.error(`AZURE_LOG_LEVEL set to unknown log level '${m}'; logging is not enabled. Acceptable values: ${E.join(", ")}.`)}}function setLogLevel(e){if(e&&!isAzureLogLevel(e)){throw new Error(`Unknown log level '${e}'. Acceptable values: ${E.join(",")}`)}g=e;const t=[];for(const e of u){if(shouldEnable(e)){t.push(e.namespace)}}A.enable(t.join(","))}function getLogLevel(){return g}const y={verbose:400,info:300,warning:200,error:100};function createClientLogger(e){const t=h.extend(e);patchLogMethod(h,t);return{error:createLogger(t,"error"),warning:createLogger(t,"warning"),info:createLogger(t,"info"),verbose:createLogger(t,"verbose")}}function patchLogMethod(e,t){t.log=(...t)=>{e.log(...t)}}function createLogger(e,t){const r=Object.assign(e.extend(t),{level:t});patchLogMethod(e,r);if(shouldEnable(r)){const e=A.disable();A.enable(e+","+r.namespace)}u.add(r);return r}function shouldEnable(e){return Boolean(g&&y[e.level]<=y[g])}function isAzureLogLevel(e){return E.includes(e)}t.AzureLogger=h;t.createClientLogger=createClientLogger;t.getLogLevel=getLogLevel;t.setLogLevel=setLogLevel},4100:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(4607);var n=r(4351);var s=r(4175);var a=r(3233);var o=r(2557);var l=r(2037);var c=r(6113);var p=r(2781);r(4559);var d=r(7094);var A=r(2361);var u=r(7147);var m=r(3837);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var g=_interopNamespace(i);var h=_interopNamespace(l);var E=_interopNamespace(u);var y=_interopNamespace(m);const C={serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:true,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite"}}}}};const b={serializedName:"Logging",type:{name:"Composite",className:"Logging",modelProperties:{version:{serializedName:"Version",required:true,xmlName:"Version",type:{name:"String"}},deleteProperty:{serializedName:"Delete",required:true,xmlName:"Delete",type:{name:"Boolean"}},read:{serializedName:"Read",required:true,xmlName:"Read",type:{name:"Boolean"}},write:{serializedName:"Write",required:true,xmlName:"Write",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}};const I={serializedName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy",modelProperties:{enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},days:{constraints:{InclusiveMinimum:1},serializedName:"Days",xmlName:"Days",type:{name:"Number"}}}}};const B={serializedName:"Metrics",type:{name:"Composite",className:"Metrics",modelProperties:{version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},includeAPIs:{serializedName:"IncludeAPIs",xmlName:"IncludeAPIs",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}};const v={serializedName:"CorsRule",type:{name:"Composite",className:"CorsRule",modelProperties:{allowedOrigins:{serializedName:"AllowedOrigins",required:true,xmlName:"AllowedOrigins",type:{name:"String"}},allowedMethods:{serializedName:"AllowedMethods",required:true,xmlName:"AllowedMethods",type:{name:"String"}},allowedHeaders:{serializedName:"AllowedHeaders",required:true,xmlName:"AllowedHeaders",type:{name:"String"}},exposedHeaders:{serializedName:"ExposedHeaders",required:true,xmlName:"ExposedHeaders",type:{name:"String"}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:"MaxAgeInSeconds",required:true,xmlName:"MaxAgeInSeconds",type:{name:"Number"}}}}};const Q={serializedName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite",modelProperties:{enabled:{serializedName:"Enabled",required:true,xmlName:"Enabled",type:{name:"Boolean"}},indexDocument:{serializedName:"IndexDocument",xmlName:"IndexDocument",type:{name:"String"}},errorDocument404Path:{serializedName:"ErrorDocument404Path",xmlName:"ErrorDocument404Path",type:{name:"String"}},defaultIndexDocumentPath:{serializedName:"DefaultIndexDocumentPath",xmlName:"DefaultIndexDocumentPath",type:{name:"String"}}}}};const w={serializedName:"StorageError",type:{name:"Composite",className:"StorageError",modelProperties:{message:{serializedName:"Message",xmlName:"Message",type:{name:"String"}},code:{serializedName:"Code",xmlName:"Code",type:{name:"String"}}}}};const x={serializedName:"BlobServiceStatistics",xmlName:"StorageServiceStats",type:{name:"Composite",className:"BlobServiceStatistics",modelProperties:{geoReplication:{serializedName:"GeoReplication",xmlName:"GeoReplication",type:{name:"Composite",className:"GeoReplication"}}}}};const S={serializedName:"GeoReplication",type:{name:"Composite",className:"GeoReplication",modelProperties:{status:{serializedName:"Status",required:true,xmlName:"Status",type:{name:"Enum",allowedValues:["live","bootstrap","unavailable"]}},lastSyncOn:{serializedName:"LastSyncTime",required:true,xmlName:"LastSyncTime",type:{name:"DateTimeRfc1123"}}}}};const N={serializedName:"ListContainersSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListContainersSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},containerItems:{serializedName:"ContainerItems",required:true,xmlName:"Containers",xmlIsWrapped:true,xmlElementName:"Container",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContainerItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const R={serializedName:"ContainerItem",xmlName:"Container",type:{name:"Composite",className:"ContainerItem",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},deleted:{serializedName:"Deleted",xmlName:"Deleted",type:{name:"Boolean"}},version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"ContainerProperties"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}};const D={serializedName:"ContainerProperties",type:{name:"Composite",className:"ContainerProperties",modelProperties:{lastModified:{serializedName:"Last-Modified",required:true,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:true,xmlName:"Etag",type:{name:"String"}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},publicAccess:{serializedName:"PublicAccess",xmlName:"PublicAccess",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"HasImmutabilityPolicy",xmlName:"HasImmutabilityPolicy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"HasLegalHold",xmlName:"HasLegalHold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"DefaultEncryptionScope",xmlName:"DefaultEncryptionScope",type:{name:"String"}},preventEncryptionScopeOverride:{serializedName:"DenyEncryptionScopeOverride",xmlName:"DenyEncryptionScopeOverride",type:{name:"Boolean"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},isImmutableStorageWithVersioningEnabled:{serializedName:"ImmutableStorageWithVersioningEnabled",xmlName:"ImmutableStorageWithVersioningEnabled",type:{name:"Boolean"}}}}};const T={serializedName:"KeyInfo",type:{name:"Composite",className:"KeyInfo",modelProperties:{startsOn:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",required:true,xmlName:"Expiry",type:{name:"String"}}}}};const _={serializedName:"UserDelegationKey",type:{name:"Composite",className:"UserDelegationKey",modelProperties:{signedObjectId:{serializedName:"SignedOid",required:true,xmlName:"SignedOid",type:{name:"String"}},signedTenantId:{serializedName:"SignedTid",required:true,xmlName:"SignedTid",type:{name:"String"}},signedStartsOn:{serializedName:"SignedStart",required:true,xmlName:"SignedStart",type:{name:"String"}},signedExpiresOn:{serializedName:"SignedExpiry",required:true,xmlName:"SignedExpiry",type:{name:"String"}},signedService:{serializedName:"SignedService",required:true,xmlName:"SignedService",type:{name:"String"}},signedVersion:{serializedName:"SignedVersion",required:true,xmlName:"SignedVersion",type:{name:"String"}},value:{serializedName:"Value",required:true,xmlName:"Value",type:{name:"String"}}}}};const k={serializedName:"FilterBlobSegment",xmlName:"EnumerationResults",type:{name:"Composite",className:"FilterBlobSegment",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},where:{serializedName:"Where",required:true,xmlName:"Where",type:{name:"String"}},blobs:{serializedName:"Blobs",required:true,xmlName:"Blobs",xmlIsWrapped:true,xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"FilterBlobItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const O={serializedName:"FilterBlobItem",xmlName:"Blob",type:{name:"Composite",className:"FilterBlobItem",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",type:{name:"String"}},tags:{serializedName:"Tags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}}}}};const P={serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags",modelProperties:{blobTagSet:{serializedName:"BlobTagSet",required:true,xmlName:"TagSet",xmlIsWrapped:true,xmlElementName:"Tag",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobTag"}}}}}}};const L={serializedName:"BlobTag",xmlName:"Tag",type:{name:"Composite",className:"BlobTag",modelProperties:{key:{serializedName:"Key",required:true,xmlName:"Key",type:{name:"String"}},value:{serializedName:"Value",required:true,xmlName:"Value",type:{name:"String"}}}}};const M={serializedName:"SignedIdentifier",xmlName:"SignedIdentifier",type:{name:"Composite",className:"SignedIdentifier",modelProperties:{id:{serializedName:"Id",required:true,xmlName:"Id",type:{name:"String"}},accessPolicy:{serializedName:"AccessPolicy",xmlName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy"}}}}};const U={serializedName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy",modelProperties:{startsOn:{serializedName:"Start",xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",xmlName:"Expiry",type:{name:"String"}},permissions:{serializedName:"Permission",xmlName:"Permission",type:{name:"String"}}}}};const H={serializedName:"ListBlobsFlatSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsFlatSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const q={serializedName:"BlobFlatListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment",modelProperties:{blobItems:{serializedName:"BlobItems",required:true,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}};const G={serializedName:"BlobItemInternal",xmlName:"Blob",type:{name:"Composite",className:"BlobItemInternal",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}},deleted:{serializedName:"Deleted",required:true,xmlName:"Deleted",type:{name:"Boolean"}},snapshot:{serializedName:"Snapshot",required:true,xmlName:"Snapshot",type:{name:"String"}},versionId:{serializedName:"VersionId",xmlName:"VersionId",type:{name:"String"}},isCurrentVersion:{serializedName:"IsCurrentVersion",xmlName:"IsCurrentVersion",type:{name:"Boolean"}},properties:{serializedName:"Properties",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal"}},metadata:{serializedName:"Metadata",xmlName:"Metadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},blobTags:{serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}},objectReplicationMetadata:{serializedName:"ObjectReplicationMetadata",xmlName:"OrMetadata",type:{name:"Dictionary",value:{type:{name:"String"}}}},hasVersionsOnly:{serializedName:"HasVersionsOnly",xmlName:"HasVersionsOnly",type:{name:"Boolean"}}}}};const V={serializedName:"BlobName",type:{name:"Composite",className:"BlobName",modelProperties:{encoded:{serializedName:"Encoded",xmlName:"Encoded",xmlIsAttribute:true,type:{name:"Boolean"}},content:{serializedName:"content",xmlName:"content",xmlIsMsText:true,type:{name:"String"}}}}};const j={serializedName:"BlobPropertiesInternal",xmlName:"Properties",type:{name:"Composite",className:"BlobPropertiesInternal",modelProperties:{createdOn:{serializedName:"Creation-Time",xmlName:"Creation-Time",type:{name:"DateTimeRfc1123"}},lastModified:{serializedName:"Last-Modified",required:true,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:true,xmlName:"Etag",type:{name:"String"}},contentLength:{serializedName:"Content-Length",xmlName:"Content-Length",type:{name:"Number"}},contentType:{serializedName:"Content-Type",xmlName:"Content-Type",type:{name:"String"}},contentEncoding:{serializedName:"Content-Encoding",xmlName:"Content-Encoding",type:{name:"String"}},contentLanguage:{serializedName:"Content-Language",xmlName:"Content-Language",type:{name:"String"}},contentMD5:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}},contentDisposition:{serializedName:"Content-Disposition",xmlName:"Content-Disposition",type:{name:"String"}},cacheControl:{serializedName:"Cache-Control",xmlName:"Cache-Control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"BlobType",xmlName:"BlobType",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},leaseStatus:{serializedName:"LeaseStatus",xmlName:"LeaseStatus",type:{name:"Enum",allowedValues:["locked","unlocked"]}},leaseState:{serializedName:"LeaseState",xmlName:"LeaseState",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseDuration:{serializedName:"LeaseDuration",xmlName:"LeaseDuration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},copyId:{serializedName:"CopyId",xmlName:"CopyId",type:{name:"String"}},copyStatus:{serializedName:"CopyStatus",xmlName:"CopyStatus",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},copySource:{serializedName:"CopySource",xmlName:"CopySource",type:{name:"String"}},copyProgress:{serializedName:"CopyProgress",xmlName:"CopyProgress",type:{name:"String"}},copyCompletedOn:{serializedName:"CopyCompletionTime",xmlName:"CopyCompletionTime",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"CopyStatusDescription",xmlName:"CopyStatusDescription",type:{name:"String"}},serverEncrypted:{serializedName:"ServerEncrypted",xmlName:"ServerEncrypted",type:{name:"Boolean"}},incrementalCopy:{serializedName:"IncrementalCopy",xmlName:"IncrementalCopy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"DestinationSnapshot",xmlName:"DestinationSnapshot",type:{name:"String"}},deletedOn:{serializedName:"DeletedTime",xmlName:"DeletedTime",type:{name:"DateTimeRfc1123"}},remainingRetentionDays:{serializedName:"RemainingRetentionDays",xmlName:"RemainingRetentionDays",type:{name:"Number"}},accessTier:{serializedName:"AccessTier",xmlName:"AccessTier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}},accessTierInferred:{serializedName:"AccessTierInferred",xmlName:"AccessTierInferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"ArchiveStatus",xmlName:"ArchiveStatus",type:{name:"Enum",allowedValues:["rehydrate-pending-to-hot","rehydrate-pending-to-cool"]}},customerProvidedKeySha256:{serializedName:"CustomerProvidedKeySha256",xmlName:"CustomerProvidedKeySha256",type:{name:"String"}},encryptionScope:{serializedName:"EncryptionScope",xmlName:"EncryptionScope",type:{name:"String"}},accessTierChangedOn:{serializedName:"AccessTierChangeTime",xmlName:"AccessTierChangeTime",type:{name:"DateTimeRfc1123"}},tagCount:{serializedName:"TagCount",xmlName:"TagCount",type:{name:"Number"}},expiresOn:{serializedName:"Expiry-Time",xmlName:"Expiry-Time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"Sealed",xmlName:"Sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"RehydratePriority",xmlName:"RehydratePriority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessedOn:{serializedName:"LastAccessTime",xmlName:"LastAccessTime",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"ImmutabilityPolicyUntilDate",xmlName:"ImmutabilityPolicyUntilDate",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"ImmutabilityPolicyMode",xmlName:"ImmutabilityPolicyMode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"LegalHold",xmlName:"LegalHold",type:{name:"Boolean"}}}}};const z={serializedName:"ListBlobsHierarchySegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsHierarchySegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:true,xmlName:"ServiceEndpoint",xmlIsAttribute:true,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:true,xmlName:"ContainerName",xmlIsAttribute:true,type:{name:"String"}},prefix:{serializedName:"Prefix",xmlName:"Prefix",type:{name:"String"}},marker:{serializedName:"Marker",xmlName:"Marker",type:{name:"String"}},maxPageSize:{serializedName:"MaxResults",xmlName:"MaxResults",type:{name:"Number"}},delimiter:{serializedName:"Delimiter",xmlName:"Delimiter",type:{name:"String"}},segment:{serializedName:"Segment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment"}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const Y={serializedName:"BlobHierarchyListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobHierarchyListSegment",modelProperties:{blobPrefixes:{serializedName:"BlobPrefixes",xmlName:"BlobPrefixes",xmlElementName:"BlobPrefix",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobPrefix"}}}},blobItems:{serializedName:"BlobItems",required:true,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}};const J={serializedName:"BlobPrefix",type:{name:"Composite",className:"BlobPrefix",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}}}}};const W={serializedName:"BlockLookupList",xmlName:"BlockList",type:{name:"Composite",className:"BlockLookupList",modelProperties:{committed:{serializedName:"Committed",xmlName:"Committed",xmlElementName:"Committed",type:{name:"Sequence",element:{type:{name:"String"}}}},uncommitted:{serializedName:"Uncommitted",xmlName:"Uncommitted",xmlElementName:"Uncommitted",type:{name:"Sequence",element:{type:{name:"String"}}}},latest:{serializedName:"Latest",xmlName:"Latest",xmlElementName:"Latest",type:{name:"Sequence",element:{type:{name:"String"}}}}}}};const X={serializedName:"BlockList",type:{name:"Composite",className:"BlockList",modelProperties:{committedBlocks:{serializedName:"CommittedBlocks",xmlName:"CommittedBlocks",xmlIsWrapped:true,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}},uncommittedBlocks:{serializedName:"UncommittedBlocks",xmlName:"UncommittedBlocks",xmlIsWrapped:true,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}};const $={serializedName:"Block",type:{name:"Composite",className:"Block",modelProperties:{name:{serializedName:"Name",required:true,xmlName:"Name",type:{name:"String"}},size:{serializedName:"Size",required:true,xmlName:"Size",type:{name:"Number"}}}}};const K={serializedName:"PageList",type:{name:"Composite",className:"PageList",modelProperties:{pageRange:{serializedName:"PageRange",xmlName:"PageRange",xmlElementName:"PageRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"PageRange"}}}},clearRange:{serializedName:"ClearRange",xmlName:"ClearRange",xmlElementName:"ClearRange",type:{name:"Sequence",element:{type:{name:"Composite",className:"ClearRange"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}};const Z={serializedName:"PageRange",xmlName:"PageRange",type:{name:"Composite",className:"PageRange",modelProperties:{start:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:true,xmlName:"End",type:{name:"Number"}}}}};const ee={serializedName:"ClearRange",xmlName:"ClearRange",type:{name:"Composite",className:"ClearRange",modelProperties:{start:{serializedName:"Start",required:true,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:true,xmlName:"End",type:{name:"Number"}}}}};const te={serializedName:"QueryRequest",xmlName:"QueryRequest",type:{name:"Composite",className:"QueryRequest",modelProperties:{queryType:{serializedName:"QueryType",required:true,xmlName:"QueryType",type:{name:"String"}},expression:{serializedName:"Expression",required:true,xmlName:"Expression",type:{name:"String"}},inputSerialization:{serializedName:"InputSerialization",xmlName:"InputSerialization",type:{name:"Composite",className:"QuerySerialization"}},outputSerialization:{serializedName:"OutputSerialization",xmlName:"OutputSerialization",type:{name:"Composite",className:"QuerySerialization"}}}}};const re={serializedName:"QuerySerialization",type:{name:"Composite",className:"QuerySerialization",modelProperties:{format:{serializedName:"Format",xmlName:"Format",type:{name:"Composite",className:"QueryFormat"}}}}};const ie={serializedName:"QueryFormat",type:{name:"Composite",className:"QueryFormat",modelProperties:{type:{serializedName:"Type",required:true,xmlName:"Type",type:{name:"Enum",allowedValues:["delimited","json","arrow","parquet"]}},delimitedTextConfiguration:{serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration"}},jsonTextConfiguration:{serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration"}},arrowConfiguration:{serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration"}},parquetTextConfiguration:{serializedName:"ParquetTextConfiguration",xmlName:"ParquetTextConfiguration",type:{name:"any"}}}}};const ne={serializedName:"DelimitedTextConfiguration",xmlName:"DelimitedTextConfiguration",type:{name:"Composite",className:"DelimitedTextConfiguration",modelProperties:{columnSeparator:{serializedName:"ColumnSeparator",xmlName:"ColumnSeparator",type:{name:"String"}},fieldQuote:{serializedName:"FieldQuote",xmlName:"FieldQuote",type:{name:"String"}},recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}},escapeChar:{serializedName:"EscapeChar",xmlName:"EscapeChar",type:{name:"String"}},headersPresent:{serializedName:"HeadersPresent",xmlName:"HasHeaders",type:{name:"Boolean"}}}}};const se={serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration",modelProperties:{recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}}}}};const ae={serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration",modelProperties:{schema:{serializedName:"Schema",required:true,xmlName:"Schema",xmlIsWrapped:true,xmlElementName:"Field",type:{name:"Sequence",element:{type:{name:"Composite",className:"ArrowField"}}}}}}};const oe={serializedName:"ArrowField",xmlName:"Field",type:{name:"Composite",className:"ArrowField",modelProperties:{type:{serializedName:"Type",required:true,xmlName:"Type",type:{name:"String"}},name:{serializedName:"Name",xmlName:"Name",type:{name:"String"}},precision:{serializedName:"Precision",xmlName:"Precision",type:{name:"Number"}},scale:{serializedName:"Scale",xmlName:"Scale",type:{name:"Number"}}}}};const le={serializedName:"Service_setPropertiesHeaders",type:{name:"Composite",className:"ServiceSetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ce={serializedName:"Service_setPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceSetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pe={serializedName:"Service_getPropertiesHeaders",type:{name:"Composite",className:"ServiceGetPropertiesHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const de={serializedName:"Service_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ae={serializedName:"Service_getStatisticsHeaders",type:{name:"Composite",className:"ServiceGetStatisticsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ue={serializedName:"Service_getStatisticsExceptionHeaders",type:{name:"Composite",className:"ServiceGetStatisticsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const me={serializedName:"Service_listContainersSegmentHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ge={serializedName:"Service_listContainersSegmentExceptionHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const he={serializedName:"Service_getUserDelegationKeyHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const fe={serializedName:"Service_getUserDelegationKeyExceptionHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ee={serializedName:"Service_getAccountInfoHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ye={serializedName:"Service_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ce={serializedName:"Service_submitBatchHeaders",type:{name:"Composite",className:"ServiceSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const be={serializedName:"Service_submitBatchExceptionHeaders",type:{name:"Composite",className:"ServiceSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ie={serializedName:"Service_filterBlobsHeaders",type:{name:"Composite",className:"ServiceFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Be={serializedName:"Service_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ServiceFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ve={serializedName:"Container_createHeaders",type:{name:"Composite",className:"ContainerCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qe={serializedName:"Container_createExceptionHeaders",type:{name:"Composite",className:"ContainerCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const we={serializedName:"Container_getPropertiesHeaders",type:{name:"Composite",className:"ContainerGetPropertiesHeaders",modelProperties:{metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},hasImmutabilityPolicy:{serializedName:"x-ms-has-immutability-policy",xmlName:"x-ms-has-immutability-policy",type:{name:"Boolean"}},hasLegalHold:{serializedName:"x-ms-has-legal-hold",xmlName:"x-ms-has-legal-hold",type:{name:"Boolean"}},defaultEncryptionScope:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}},denyEncryptionScopeOverride:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}},isImmutableStorageWithVersioningEnabled:{serializedName:"x-ms-immutable-storage-with-versioning-enabled",xmlName:"x-ms-immutable-storage-with-versioning-enabled",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xe={serializedName:"Container_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ContainerGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Se={serializedName:"Container_deleteHeaders",type:{name:"Composite",className:"ContainerDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ne={serializedName:"Container_deleteExceptionHeaders",type:{name:"Composite",className:"ContainerDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Re={serializedName:"Container_setMetadataHeaders",type:{name:"Composite",className:"ContainerSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const De={serializedName:"Container_setMetadataExceptionHeaders",type:{name:"Composite",className:"ContainerSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Te={serializedName:"Container_getAccessPolicyHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyHeaders",modelProperties:{blobPublicAccess:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _e={serializedName:"Container_getAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ke={serializedName:"Container_setAccessPolicyHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Oe={serializedName:"Container_setAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Pe={serializedName:"Container_restoreHeaders",type:{name:"Composite",className:"ContainerRestoreHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Le={serializedName:"Container_restoreExceptionHeaders",type:{name:"Composite",className:"ContainerRestoreExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Me={serializedName:"Container_renameHeaders",type:{name:"Composite",className:"ContainerRenameHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Fe={serializedName:"Container_renameExceptionHeaders",type:{name:"Composite",className:"ContainerRenameExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ue={serializedName:"Container_submitBatchHeaders",type:{name:"Composite",className:"ContainerSubmitBatchHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}}}}};const He={serializedName:"Container_submitBatchExceptionHeaders",type:{name:"Composite",className:"ContainerSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const qe={serializedName:"Container_filterBlobsHeaders",type:{name:"Composite",className:"ContainerFilterBlobsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ge={serializedName:"Container_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ContainerFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ve={serializedName:"Container_acquireLeaseHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const je={serializedName:"Container_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ze={serializedName:"Container_releaseLeaseHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ye={serializedName:"Container_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Je={serializedName:"Container_renewLeaseHeaders",type:{name:"Composite",className:"ContainerRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const We={serializedName:"Container_renewLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Xe={serializedName:"Container_breakLeaseHeaders",type:{name:"Composite",className:"ContainerBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const $e={serializedName:"Container_breakLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ke={serializedName:"Container_changeLeaseHeaders",type:{name:"Composite",className:"ContainerChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Ze={serializedName:"Container_changeLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const et={serializedName:"Container_listBlobFlatSegmentHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const tt={serializedName:"Container_listBlobFlatSegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const rt={serializedName:"Container_listBlobHierarchySegmentHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentHeaders",modelProperties:{contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const it={serializedName:"Container_listBlobHierarchySegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const nt={serializedName:"Container_getAccountInfoHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}};const st={serializedName:"Container_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ot={serializedName:"Blob_downloadHeaders",type:{name:"Composite",className:"BlobDownloadHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}};const ct={serializedName:"Blob_downloadExceptionHeaders",type:{name:"Composite",className:"BlobDownloadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pt={serializedName:"Blob_getPropertiesHeaders",type:{name:"Composite",className:"BlobGetPropertiesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},createdOn:{serializedName:"x-ms-creation-time",xmlName:"x-ms-creation-time",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-or-"},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletedOn:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},isIncrementalCopy:{serializedName:"x-ms-incremental-copy",xmlName:"x-ms-incremental-copy",type:{name:"Boolean"}},destinationSnapshot:{serializedName:"x-ms-copy-destination-snapshot",xmlName:"x-ms-copy-destination-snapshot",type:{name:"String"}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},accessTier:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"String"}},accessTierInferred:{serializedName:"x-ms-access-tier-inferred",xmlName:"x-ms-access-tier-inferred",type:{name:"Boolean"}},archiveStatus:{serializedName:"x-ms-archive-status",xmlName:"x-ms-archive-status",type:{name:"String"}},accessTierChangedOn:{serializedName:"x-ms-access-tier-change-time",xmlName:"x-ms-access-tier-change-time",type:{name:"DateTimeRfc1123"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},isCurrentVersion:{serializedName:"x-ms-is-current-version",xmlName:"x-ms-is-current-version",type:{name:"Boolean"}},tagCount:{serializedName:"x-ms-tag-count",xmlName:"x-ms-tag-count",type:{name:"Number"}},expiresOn:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}},rehydratePriority:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}},lastAccessed:{serializedName:"x-ms-last-access-time",xmlName:"x-ms-last-access-time",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiresOn:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const dt={serializedName:"Blob_getPropertiesExceptionHeaders",type:{name:"Composite",className:"BlobGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const At={serializedName:"Blob_deleteHeaders",type:{name:"Composite",className:"BlobDeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ut={serializedName:"Blob_deleteExceptionHeaders",type:{name:"Composite",className:"BlobDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const mt={serializedName:"Blob_undeleteHeaders",type:{name:"Composite",className:"BlobUndeleteHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ht={serializedName:"Blob_undeleteExceptionHeaders",type:{name:"Composite",className:"BlobUndeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ft={serializedName:"Blob_setExpiryHeaders",type:{name:"Composite",className:"BlobSetExpiryHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Et={serializedName:"Blob_setExpiryExceptionHeaders",type:{name:"Composite",className:"BlobSetExpiryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const yt={serializedName:"Blob_setHttpHeadersHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ct={serializedName:"Blob_setHttpHeadersExceptionHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const bt={serializedName:"Blob_setImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyExpiry:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}},immutabilityPolicyMode:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}}}};const It={serializedName:"Blob_setImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Bt={serializedName:"Blob_deleteImmutabilityPolicyHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const vt={serializedName:"Blob_deleteImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qt={serializedName:"Blob_setLegalHoldHeaders",type:{name:"Composite",className:"BlobSetLegalHoldHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},legalHold:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}}};const wt={serializedName:"Blob_setLegalHoldExceptionHeaders",type:{name:"Composite",className:"BlobSetLegalHoldExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xt={serializedName:"Blob_setMetadataHeaders",type:{name:"Composite",className:"BlobSetMetadataHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const St={serializedName:"Blob_setMetadataExceptionHeaders",type:{name:"Composite",className:"BlobSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Nt={serializedName:"Blob_acquireLeaseHeaders",type:{name:"Composite",className:"BlobAcquireLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Rt={serializedName:"Blob_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"BlobAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Dt={serializedName:"Blob_releaseLeaseHeaders",type:{name:"Composite",className:"BlobReleaseLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Tt={serializedName:"Blob_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"BlobReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _t={serializedName:"Blob_renewLeaseHeaders",type:{name:"Composite",className:"BlobRenewLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const kt={serializedName:"Blob_renewLeaseExceptionHeaders",type:{name:"Composite",className:"BlobRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ot={serializedName:"Blob_changeLeaseHeaders",type:{name:"Composite",className:"BlobChangeLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},leaseId:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Pt={serializedName:"Blob_changeLeaseExceptionHeaders",type:{name:"Composite",className:"BlobChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Lt={serializedName:"Blob_breakLeaseHeaders",type:{name:"Composite",className:"BlobBreakLeaseHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},leaseTime:{serializedName:"x-ms-lease-time",xmlName:"x-ms-lease-time",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}}}}};const Mt={serializedName:"Blob_breakLeaseExceptionHeaders",type:{name:"Composite",className:"BlobBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ft={serializedName:"Blob_createSnapshotHeaders",type:{name:"Composite",className:"BlobCreateSnapshotHeaders",modelProperties:{snapshot:{serializedName:"x-ms-snapshot",xmlName:"x-ms-snapshot",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ut={serializedName:"Blob_createSnapshotExceptionHeaders",type:{name:"Composite",className:"BlobCreateSnapshotExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ht={serializedName:"Blob_startCopyFromURLHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const qt={serializedName:"Blob_startCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Gt={serializedName:"Blob_copyFromURLHeaders",type:{name:"Composite",className:"BlobCopyFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{defaultValue:"success",isConstant:true,serializedName:"x-ms-copy-status",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Vt={serializedName:"Blob_copyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const jt={serializedName:"Blob_abortCopyFromURLHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const zt={serializedName:"Blob_abortCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Yt={serializedName:"Blob_setTierHeaders",type:{name:"Composite",className:"BlobSetTierHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Jt={serializedName:"Blob_setTierExceptionHeaders",type:{name:"Composite",className:"BlobSetTierExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Wt={serializedName:"Blob_getAccountInfoHeaders",type:{name:"Composite",className:"BlobGetAccountInfoHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},skuName:{serializedName:"x-ms-sku-name",xmlName:"x-ms-sku-name",type:{name:"Enum",allowedValues:["Standard_LRS","Standard_GRS","Standard_RAGRS","Standard_ZRS","Premium_LRS"]}},accountKind:{serializedName:"x-ms-account-kind",xmlName:"x-ms-account-kind",type:{name:"Enum",allowedValues:["Storage","BlobStorage","StorageV2","FileStorage","BlockBlobStorage"]}}}}};const Xt={serializedName:"Blob_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"BlobGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const $t={serializedName:"Blob_queryHeaders",type:{name:"Composite",className:"BlobQueryHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},contentLength:{serializedName:"content-length",xmlName:"content-length",type:{name:"Number"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},contentRange:{serializedName:"content-range",xmlName:"content-range",type:{name:"String"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},contentEncoding:{serializedName:"content-encoding",xmlName:"content-encoding",type:{name:"String"}},cacheControl:{serializedName:"cache-control",xmlName:"cache-control",type:{name:"String"}},contentDisposition:{serializedName:"content-disposition",xmlName:"content-disposition",type:{name:"String"}},contentLanguage:{serializedName:"content-language",xmlName:"content-language",type:{name:"String"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},blobType:{serializedName:"x-ms-blob-type",xmlName:"x-ms-blob-type",type:{name:"Enum",allowedValues:["BlockBlob","PageBlob","AppendBlob"]}},copyCompletionTime:{serializedName:"x-ms-copy-completion-time",xmlName:"x-ms-copy-completion-time",type:{name:"DateTimeRfc1123"}},copyStatusDescription:{serializedName:"x-ms-copy-status-description",xmlName:"x-ms-copy-status-description",type:{name:"String"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyProgress:{serializedName:"x-ms-copy-progress",xmlName:"x-ms-copy-progress",type:{name:"String"}},copySource:{serializedName:"x-ms-copy-source",xmlName:"x-ms-copy-source",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},leaseDuration:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Enum",allowedValues:["infinite","fixed"]}},leaseState:{serializedName:"x-ms-lease-state",xmlName:"x-ms-lease-state",type:{name:"Enum",allowedValues:["available","leased","expired","breaking","broken"]}},leaseStatus:{serializedName:"x-ms-lease-status",xmlName:"x-ms-lease-status",type:{name:"Enum",allowedValues:["locked","unlocked"]}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},acceptRanges:{serializedName:"accept-ranges",xmlName:"accept-ranges",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-server-encrypted",xmlName:"x-ms-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},blobContentMD5:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}},contentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}}}};const Kt={serializedName:"Blob_queryExceptionHeaders",type:{name:"Composite",className:"BlobQueryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Zt={serializedName:"Blob_getTagsHeaders",type:{name:"Composite",className:"BlobGetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const er={serializedName:"Blob_getTagsExceptionHeaders",type:{name:"Composite",className:"BlobGetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const tr={serializedName:"Blob_setTagsHeaders",type:{name:"Composite",className:"BlobSetTagsHeaders",modelProperties:{clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const rr={serializedName:"Blob_setTagsExceptionHeaders",type:{name:"Composite",className:"BlobSetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ir={serializedName:"PageBlob_createHeaders",type:{name:"Composite",className:"PageBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const nr={serializedName:"PageBlob_createExceptionHeaders",type:{name:"Composite",className:"PageBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const sr={serializedName:"PageBlob_uploadPagesHeaders",type:{name:"Composite",className:"PageBlobUploadPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ar={serializedName:"PageBlob_uploadPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const or={serializedName:"PageBlob_clearPagesHeaders",type:{name:"Composite",className:"PageBlobClearPagesHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const lr={serializedName:"PageBlob_clearPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobClearPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const cr={serializedName:"PageBlob_uploadPagesFromURLHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const pr={serializedName:"PageBlob_uploadPagesFromURLExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const dr={serializedName:"PageBlob_getPageRangesHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ar={serializedName:"PageBlob_getPageRangesExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const ur={serializedName:"PageBlob_getPageRangesDiffHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const mr={serializedName:"PageBlob_getPageRangesDiffExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const gr={serializedName:"PageBlob_resizeHeaders",type:{name:"Composite",className:"PageBlobResizeHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const hr={serializedName:"PageBlob_resizeExceptionHeaders",type:{name:"Composite",className:"PageBlobResizeExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const fr={serializedName:"PageBlob_updateSequenceNumberHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},blobSequenceNumber:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Er={serializedName:"PageBlob_updateSequenceNumberExceptionHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const yr={serializedName:"PageBlob_copyIncrementalHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},copyId:{serializedName:"x-ms-copy-id",xmlName:"x-ms-copy-id",type:{name:"String"}},copyStatus:{serializedName:"x-ms-copy-status",xmlName:"x-ms-copy-status",type:{name:"Enum",allowedValues:["pending","success","aborted","failed"]}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Cr={serializedName:"PageBlob_copyIncrementalExceptionHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const br={serializedName:"AppendBlob_createHeaders",type:{name:"Composite",className:"AppendBlobCreateHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ir={serializedName:"AppendBlob_createExceptionHeaders",type:{name:"Composite",className:"AppendBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Br={serializedName:"AppendBlob_appendBlockHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const vr={serializedName:"AppendBlob_appendBlockExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Qr={serializedName:"AppendBlob_appendBlockFromUrlHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},blobAppendOffset:{serializedName:"x-ms-blob-append-offset",xmlName:"x-ms-blob-append-offset",type:{name:"String"}},blobCommittedBlockCount:{serializedName:"x-ms-blob-committed-block-count",xmlName:"x-ms-blob-committed-block-count",type:{name:"Number"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const wr={serializedName:"AppendBlob_appendBlockFromUrlExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const xr={serializedName:"AppendBlob_sealHeaders",type:{name:"Composite",className:"AppendBlobSealHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isSealed:{serializedName:"x-ms-blob-sealed",xmlName:"x-ms-blob-sealed",type:{name:"Boolean"}}}}};const Sr={serializedName:"AppendBlob_sealExceptionHeaders",type:{name:"Composite",className:"AppendBlobSealExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Nr={serializedName:"BlockBlob_uploadHeaders",type:{name:"Composite",className:"BlockBlobUploadHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Rr={serializedName:"BlockBlob_uploadExceptionHeaders",type:{name:"Composite",className:"BlockBlobUploadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Dr={serializedName:"BlockBlob_putBlobFromUrlHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Tr={serializedName:"BlockBlob_putBlobFromUrlExceptionHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const _r={serializedName:"BlockBlob_stageBlockHeaders",type:{name:"Composite",className:"BlockBlobStageBlockHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const kr={serializedName:"BlockBlob_stageBlockExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Or={serializedName:"BlockBlob_stageBlockFromURLHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLHeaders",modelProperties:{contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Pr={serializedName:"BlockBlob_stageBlockFromURLExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Lr={serializedName:"BlockBlob_commitBlockListHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListHeaders",modelProperties:{etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},contentMD5:{serializedName:"content-md5",xmlName:"content-md5",type:{name:"ByteArray"}},xMsContentCrc64:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},versionId:{serializedName:"x-ms-version-id",xmlName:"x-ms-version-id",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},isServerEncrypted:{serializedName:"x-ms-request-server-encrypted",xmlName:"x-ms-request-server-encrypted",type:{name:"Boolean"}},encryptionKeySha256:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}},encryptionScope:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Mr={serializedName:"BlockBlob_commitBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Fr={serializedName:"BlockBlob_getBlockListHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"etag",xmlName:"etag",type:{name:"String"}},contentType:{serializedName:"content-type",xmlName:"content-type",type:{name:"String"}},blobContentLength:{serializedName:"x-ms-blob-content-length",xmlName:"x-ms-blob-content-length",type:{name:"Number"}},clientRequestId:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}},requestId:{serializedName:"x-ms-request-id",xmlName:"x-ms-request-id",type:{name:"String"}},version:{serializedName:"x-ms-version",xmlName:"x-ms-version",type:{name:"String"}},date:{serializedName:"date",xmlName:"date",type:{name:"DateTimeRfc1123"}},errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};const Ur={serializedName:"BlockBlob_getBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}};var Hr=Object.freeze({__proto__:null,BlobServiceProperties:C,Logging:b,RetentionPolicy:I,Metrics:B,CorsRule:v,StaticWebsite:Q,StorageError:w,BlobServiceStatistics:x,GeoReplication:S,ListContainersSegmentResponse:N,ContainerItem:R,ContainerProperties:D,KeyInfo:T,UserDelegationKey:_,FilterBlobSegment:k,FilterBlobItem:O,BlobTags:P,BlobTag:L,SignedIdentifier:M,AccessPolicy:U,ListBlobsFlatSegmentResponse:H,BlobFlatListSegment:q,BlobItemInternal:G,BlobName:V,BlobPropertiesInternal:j,ListBlobsHierarchySegmentResponse:z,BlobHierarchyListSegment:Y,BlobPrefix:J,BlockLookupList:W,BlockList:X,Block:$,PageList:K,PageRange:Z,ClearRange:ee,QueryRequest:te,QuerySerialization:re,QueryFormat:ie,DelimitedTextConfiguration:ne,JsonTextConfiguration:se,ArrowConfiguration:ae,ArrowField:oe,ServiceSetPropertiesHeaders:le,ServiceSetPropertiesExceptionHeaders:ce,ServiceGetPropertiesHeaders:pe,ServiceGetPropertiesExceptionHeaders:de,ServiceGetStatisticsHeaders:Ae,ServiceGetStatisticsExceptionHeaders:ue,ServiceListContainersSegmentHeaders:me,ServiceListContainersSegmentExceptionHeaders:ge,ServiceGetUserDelegationKeyHeaders:he,ServiceGetUserDelegationKeyExceptionHeaders:fe,ServiceGetAccountInfoHeaders:Ee,ServiceGetAccountInfoExceptionHeaders:ye,ServiceSubmitBatchHeaders:Ce,ServiceSubmitBatchExceptionHeaders:be,ServiceFilterBlobsHeaders:Ie,ServiceFilterBlobsExceptionHeaders:Be,ContainerCreateHeaders:ve,ContainerCreateExceptionHeaders:Qe,ContainerGetPropertiesHeaders:we,ContainerGetPropertiesExceptionHeaders:xe,ContainerDeleteHeaders:Se,ContainerDeleteExceptionHeaders:Ne,ContainerSetMetadataHeaders:Re,ContainerSetMetadataExceptionHeaders:De,ContainerGetAccessPolicyHeaders:Te,ContainerGetAccessPolicyExceptionHeaders:_e,ContainerSetAccessPolicyHeaders:ke,ContainerSetAccessPolicyExceptionHeaders:Oe,ContainerRestoreHeaders:Pe,ContainerRestoreExceptionHeaders:Le,ContainerRenameHeaders:Me,ContainerRenameExceptionHeaders:Fe,ContainerSubmitBatchHeaders:Ue,ContainerSubmitBatchExceptionHeaders:He,ContainerFilterBlobsHeaders:qe,ContainerFilterBlobsExceptionHeaders:Ge,ContainerAcquireLeaseHeaders:Ve,ContainerAcquireLeaseExceptionHeaders:je,ContainerReleaseLeaseHeaders:ze,ContainerReleaseLeaseExceptionHeaders:Ye,ContainerRenewLeaseHeaders:Je,ContainerRenewLeaseExceptionHeaders:We,ContainerBreakLeaseHeaders:Xe,ContainerBreakLeaseExceptionHeaders:$e,ContainerChangeLeaseHeaders:Ke,ContainerChangeLeaseExceptionHeaders:Ze,ContainerListBlobFlatSegmentHeaders:et,ContainerListBlobFlatSegmentExceptionHeaders:tt,ContainerListBlobHierarchySegmentHeaders:rt,ContainerListBlobHierarchySegmentExceptionHeaders:it,ContainerGetAccountInfoHeaders:nt,ContainerGetAccountInfoExceptionHeaders:st,BlobDownloadHeaders:ot,BlobDownloadExceptionHeaders:ct,BlobGetPropertiesHeaders:pt,BlobGetPropertiesExceptionHeaders:dt,BlobDeleteHeaders:At,BlobDeleteExceptionHeaders:ut,BlobUndeleteHeaders:mt,BlobUndeleteExceptionHeaders:ht,BlobSetExpiryHeaders:ft,BlobSetExpiryExceptionHeaders:Et,BlobSetHttpHeadersHeaders:yt,BlobSetHttpHeadersExceptionHeaders:Ct,BlobSetImmutabilityPolicyHeaders:bt,BlobSetImmutabilityPolicyExceptionHeaders:It,BlobDeleteImmutabilityPolicyHeaders:Bt,BlobDeleteImmutabilityPolicyExceptionHeaders:vt,BlobSetLegalHoldHeaders:Qt,BlobSetLegalHoldExceptionHeaders:wt,BlobSetMetadataHeaders:xt,BlobSetMetadataExceptionHeaders:St,BlobAcquireLeaseHeaders:Nt,BlobAcquireLeaseExceptionHeaders:Rt,BlobReleaseLeaseHeaders:Dt,BlobReleaseLeaseExceptionHeaders:Tt,BlobRenewLeaseHeaders:_t,BlobRenewLeaseExceptionHeaders:kt,BlobChangeLeaseHeaders:Ot,BlobChangeLeaseExceptionHeaders:Pt,BlobBreakLeaseHeaders:Lt,BlobBreakLeaseExceptionHeaders:Mt,BlobCreateSnapshotHeaders:Ft,BlobCreateSnapshotExceptionHeaders:Ut,BlobStartCopyFromURLHeaders:Ht,BlobStartCopyFromURLExceptionHeaders:qt,BlobCopyFromURLHeaders:Gt,BlobCopyFromURLExceptionHeaders:Vt,BlobAbortCopyFromURLHeaders:jt,BlobAbortCopyFromURLExceptionHeaders:zt,BlobSetTierHeaders:Yt,BlobSetTierExceptionHeaders:Jt,BlobGetAccountInfoHeaders:Wt,BlobGetAccountInfoExceptionHeaders:Xt,BlobQueryHeaders:$t,BlobQueryExceptionHeaders:Kt,BlobGetTagsHeaders:Zt,BlobGetTagsExceptionHeaders:er,BlobSetTagsHeaders:tr,BlobSetTagsExceptionHeaders:rr,PageBlobCreateHeaders:ir,PageBlobCreateExceptionHeaders:nr,PageBlobUploadPagesHeaders:sr,PageBlobUploadPagesExceptionHeaders:ar,PageBlobClearPagesHeaders:or,PageBlobClearPagesExceptionHeaders:lr,PageBlobUploadPagesFromURLHeaders:cr,PageBlobUploadPagesFromURLExceptionHeaders:pr,PageBlobGetPageRangesHeaders:dr,PageBlobGetPageRangesExceptionHeaders:Ar,PageBlobGetPageRangesDiffHeaders:ur,PageBlobGetPageRangesDiffExceptionHeaders:mr,PageBlobResizeHeaders:gr,PageBlobResizeExceptionHeaders:hr,PageBlobUpdateSequenceNumberHeaders:fr,PageBlobUpdateSequenceNumberExceptionHeaders:Er,PageBlobCopyIncrementalHeaders:yr,PageBlobCopyIncrementalExceptionHeaders:Cr,AppendBlobCreateHeaders:br,AppendBlobCreateExceptionHeaders:Ir,AppendBlobAppendBlockHeaders:Br,AppendBlobAppendBlockExceptionHeaders:vr,AppendBlobAppendBlockFromUrlHeaders:Qr,AppendBlobAppendBlockFromUrlExceptionHeaders:wr,AppendBlobSealHeaders:xr,AppendBlobSealExceptionHeaders:Sr,BlockBlobUploadHeaders:Nr,BlockBlobUploadExceptionHeaders:Rr,BlockBlobPutBlobFromUrlHeaders:Dr,BlockBlobPutBlobFromUrlExceptionHeaders:Tr,BlockBlobStageBlockHeaders:_r,BlockBlobStageBlockExceptionHeaders:kr,BlockBlobStageBlockFromURLHeaders:Or,BlockBlobStageBlockFromURLExceptionHeaders:Pr,BlockBlobCommitBlockListHeaders:Lr,BlockBlobCommitBlockListExceptionHeaders:Mr,BlockBlobGetBlockListHeaders:Fr,BlockBlobGetBlockListExceptionHeaders:Ur});const qr={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Content-Type",type:{name:"String"}}};const Gr={parameterPath:"blobServiceProperties",mapper:C};const Vr={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const jr={parameterPath:"url",mapper:{serializedName:"url",required:true,xmlName:"url",type:{name:"String"}},skipEncoding:true};const zr={parameterPath:"restype",mapper:{defaultValue:"service",isConstant:true,serializedName:"restype",type:{name:"String"}}};const Yr={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Jr={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}};const Wr={parameterPath:"version",mapper:{defaultValue:"2022-11-02",isConstant:true,serializedName:"x-ms-version",type:{name:"String"}}};const Xr={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}};const $r={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const Kr={parameterPath:"comp",mapper:{defaultValue:"stats",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Zr={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ei={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}};const ti={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}};const ri={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}};const ii={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListContainersIncludeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["metadata","deleted","system"]}}}},collectionFormat:i.QueryCollectionFormat.Csv};const ni={parameterPath:"keyInfo",mapper:T};const si={parameterPath:"comp",mapper:{defaultValue:"userdelegationkey",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ai={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:true,serializedName:"restype",type:{name:"String"}}};const oi={parameterPath:"body",mapper:{serializedName:"body",required:true,xmlName:"body",type:{name:"Stream"}}};const li={parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ci={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:true,xmlName:"Content-Length",type:{name:"Number"}}};const pi={parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:true,xmlName:"Content-Type",type:{name:"String"}}};const di={parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Ai={parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}};const ui={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:true,serializedName:"restype",type:{name:"String"}}};const mi={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}},headerCollectionPrefix:"x-ms-meta-"}};const gi={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}};const hi={parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}};const fi={parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}};const Ei={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}};const yi={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}};const Ci={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}};const bi={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Ii={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Bi={parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:true,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}};const vi={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Qi={parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}};const wi={parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}};const xi={parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Si={parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:true,xmlName:"x-ms-source-container-name",type:{name:"String"}}};const Ni={parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}};const Ri={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Di={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Ti={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}};const _i={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}};const ki={parameterPath:"action",mapper:{defaultValue:"release",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Oi={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:true,xmlName:"x-ms-lease-id",type:{name:"String"}}};const Pi={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Li={parameterPath:"action",mapper:{defaultValue:"break",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Mi={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}};const Fi={parameterPath:"action",mapper:{defaultValue:"change",isConstant:true,serializedName:"x-ms-lease-action",type:{name:"String"}}};const Ui={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:true,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}};const Hi={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListBlobsIncludeItem",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["copy","deleted","metadata","snapshots","uncommittedblobs","versions","tags","immutabilitypolicy","legalhold","deletedwithversions"]}}}},collectionFormat:i.QueryCollectionFormat.Csv};const qi={parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:true,xmlName:"delimiter",type:{name:"String"}}};const Gi={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}};const Vi={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}};const ji={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}};const zi={parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}};const Yi={parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}};const Ji={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}};const Wi={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}};const Xi={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}};const $i={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}};const Ki={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}};const Zi={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}};const en={parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapshots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}};const tn={parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}};const rn={parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:true,serializedName:"comp",type:{name:"String"}}};const nn={parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:true,xmlName:"x-ms-expiry-option",type:{name:"String"}}};const sn={parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}};const an={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}};const on={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}};const ln={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}};const cn={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}};const pn={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}};const dn={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}};const An={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:true,serializedName:"comp",type:{name:"String"}}};const un={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}};const mn={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}};const gn={parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:true,serializedName:"comp",type:{name:"String"}}};const hn={parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:true,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}};const fn={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}};const En={parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:true,serializedName:"comp",type:{name:"String"}}};const yn={parameterPath:["options","tier"],mapper:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}};const Cn={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}};const bn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}};const In={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}};const Bn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}};const vn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}};const Qn={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}};const wn={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:true,xmlName:"x-ms-copy-source",type:{name:"String"}}};const xn={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}};const Sn={parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}};const Nn={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}};const Rn={parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:true,serializedName:"x-ms-requires-sync",type:{name:"String"}}};const Dn={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}};const Tn={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}};const _n={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}};const kn={parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:true,serializedName:"comp",type:{name:"String"}}};const On={parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:true,serializedName:"x-ms-copy-action",type:{name:"String"}}};const Pn={parameterPath:"copyId",mapper:{serializedName:"copyid",required:true,xmlName:"copyid",type:{name:"String"}}};const Ln={parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Mn={parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:true,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}};const Fn={parameterPath:["options","queryRequest"],mapper:te};const Un={parameterPath:"comp",mapper:{defaultValue:"query",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Hn={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:true,serializedName:"comp",type:{name:"String"}}};const qn={parameterPath:["options","tags"],mapper:P};const Gn={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}};const Vn={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}};const jn={parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const zn={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:true,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}};const Yn={parameterPath:["options","blobSequenceNumber"],mapper:{serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}};const Jn={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:true,serializedName:"Content-Type",type:{name:"String"}}};const Wn={parameterPath:"body",mapper:{serializedName:"body",required:true,xmlName:"body",type:{name:"Stream"}}};const Xn={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:true,serializedName:"Accept",type:{name:"String"}}};const $n={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Kn={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:true,serializedName:"x-ms-page-write",type:{name:"String"}}};const Zn={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}};const es={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}};const ts={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}};const rs={parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:true,serializedName:"x-ms-page-write",type:{name:"String"}}};const is={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:true,xmlName:"x-ms-copy-source",type:{name:"String"}}};const ns={parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:true,xmlName:"x-ms-source-range",type:{name:"String"}}};const ss={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}};const as={parameterPath:"range",mapper:{serializedName:"x-ms-range",required:true,xmlName:"x-ms-range",type:{name:"String"}}};const os={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ls={parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}};const cs={parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}};const ps={parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:true,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}};const ds={parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:true,serializedName:"comp",type:{name:"String"}}};const As={parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const us={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:true,serializedName:"comp",type:{name:"String"}}};const ms={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}};const gs={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}};const hs={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}};const fs={parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:true,serializedName:"comp",type:{name:"String"}}};const Es={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:true,serializedName:"x-ms-blob-type",type:{name:"String"}}};const ys={parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}};const Cs={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:true,serializedName:"comp",type:{name:"String"}}};const bs={parameterPath:"blockId",mapper:{serializedName:"blockid",required:true,xmlName:"blockid",type:{name:"String"}}};const Is={parameterPath:"blocks",mapper:W};const Bs={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:true,serializedName:"comp",type:{name:"String"}}};const vs={parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:true,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}};class Service{constructor(e){this.client=e}setProperties(e,t){const r={blobServiceProperties:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ws)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,xs)}getStatistics(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ss)}listContainersSegment(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ns)}getUserDelegationKey(e,t){const r={keyInfo:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Rs)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ds)}submitBatch(e,t,r,i){const n={contentLength:e,multipartContentType:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,Ts)}filterBlobs(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,_s)}}const Qs=new g.Serializer(Hr,true);const ws={path:"/",httpMethod:"PUT",responses:{202:{headersMapper:le},default:{bodyMapper:w,headersMapper:ce}},requestBody:Gr,queryParameters:[zr,Yr,Jr],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const xs={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:C,headersMapper:pe},default:{bodyMapper:w,headersMapper:de}},queryParameters:[zr,Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Ss={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:x,headersMapper:Ae},default:{bodyMapper:w,headersMapper:ue}},queryParameters:[zr,Jr,Kr],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Ns={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:N,headersMapper:me},default:{bodyMapper:w,headersMapper:ge}},queryParameters:[Jr,Zr,ei,ti,ri,ii],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};const Rs={path:"/",httpMethod:"POST",responses:{200:{bodyMapper:_,headersMapper:he},default:{bodyMapper:w,headersMapper:fe}},requestBody:ni,queryParameters:[zr,Jr,si],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const Ds={path:"/",httpMethod:"GET",responses:{200:{headersMapper:Ee},default:{bodyMapper:w,headersMapper:ye}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:Qs};const Ts={path:"/",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Ce},default:{bodyMapper:w,headersMapper:be}},requestBody:oi,queryParameters:[Jr,li],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,ci,pi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Qs};const _s={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:k,headersMapper:Ie},default:{bodyMapper:w,headersMapper:Be}},queryParameters:[Jr,ti,ri,di,Ai],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Qs};class Container{constructor(e){this.client=e}create(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Os)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ps)}delete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ls)}setMetadata(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ms)}getAccessPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Fs)}setAccessPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Us)}restore(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Hs)}rename(e,t){const r={sourceContainerName:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,qs)}submitBatch(e,t,r,i){const n={contentLength:e,multipartContentType:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,Gs)}filterBlobs(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Vs)}acquireLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,js)}releaseLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,zs)}renewLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ys)}breakLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Js)}changeLease(e,t,r){const i={leaseId:e,proposedLeaseId:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ws)}listBlobFlatSegment(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Xs)}listBlobHierarchySegment(e,t){const r={delimiter:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,$s)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ks)}}const ks=new g.Serializer(Hr,true);const Os={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ve},default:{bodyMapper:w,headersMapper:Qe}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,gi,hi,fi],isXML:true,serializer:ks};const Ps={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:we},default:{bodyMapper:w,headersMapper:xe}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei],isXML:true,serializer:ks};const Ls={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:Se},default:{bodyMapper:w,headersMapper:Ne}},queryParameters:[Jr,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci],isXML:true,serializer:ks};const Ms={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Re},default:{bodyMapper:w,headersMapper:De}},queryParameters:[Jr,ui,bi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi],isXML:true,serializer:ks};const Fs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:true,xmlElementName:"SignedIdentifier"},headersMapper:Te},default:{bodyMapper:w,headersMapper:_e}},queryParameters:[Jr,ui,Ii],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei],isXML:true,serializer:ks};const Us={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ke},default:{bodyMapper:w,headersMapper:Oe}},requestBody:Bi,queryParameters:[Jr,ui,Ii],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,gi,Ei,yi,Ci],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:ks};const Hs={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:Pe},default:{bodyMapper:w,headersMapper:Le}},queryParameters:[Jr,ui,vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Qi,wi],isXML:true,serializer:ks};const qs={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Me},default:{bodyMapper:w,headersMapper:Fe}},queryParameters:[Jr,ui,xi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Si,Ni],isXML:true,serializer:ks};const Gs={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:Ue},default:{bodyMapper:w,headersMapper:He}},requestBody:oi,queryParameters:[Jr,li,ui],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,ci,pi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:ks};const Vs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:k,headersMapper:qe},default:{bodyMapper:w,headersMapper:Ge}},queryParameters:[Jr,ti,ri,di,Ai,ui],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const js={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:Ve},default:{bodyMapper:w,headersMapper:je}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Di,Ti,_i],isXML:true,serializer:ks};const zs={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ze},default:{bodyMapper:w,headersMapper:Ye}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,ki,Oi],isXML:true,serializer:ks};const Ys={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Je},default:{bodyMapper:w,headersMapper:We}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Pi],isXML:true,serializer:ks};const Js={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:Xe},default:{bodyMapper:w,headersMapper:$e}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Li,Mi],isXML:true,serializer:ks};const Ws={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:Ke},default:{bodyMapper:w,headersMapper:Ze}},queryParameters:[Jr,ui,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Fi,Ui],isXML:true,serializer:ks};const Xs={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:H,headersMapper:et},default:{bodyMapper:w,headersMapper:tt}},queryParameters:[Jr,Zr,ei,ti,ri,ui,Hi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const $s={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:z,headersMapper:rt},default:{bodyMapper:w,headersMapper:it}},queryParameters:[Jr,Zr,ei,ti,ri,ui,Hi,qi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:ks};const Ks={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:nt},default:{bodyMapper:w,headersMapper:st}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:ks};class Blob$1{constructor(e){this.client=e}download(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ea)}getProperties(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ta)}delete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ra)}undelete(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ia)}setExpiry(e,t){const r={expiryOptions:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,na)}setHttpHeaders(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,sa)}setImmutabilityPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,aa)}deleteImmutabilityPolicy(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,oa)}setLegalHold(e,t){const r={legalHold:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,la)}setMetadata(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ca)}acquireLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,pa)}releaseLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,da)}renewLease(e,t){const r={leaseId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Aa)}changeLease(e,t,r){const i={leaseId:e,proposedLeaseId:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,ua)}breakLease(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ma)}createSnapshot(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ga)}startCopyFromURL(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ha)}copyFromURL(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,fa)}abortCopyFromURL(e,t){const r={copyId:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ea)}setTier(e,t){const r={tier:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ya)}getAccountInfo(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ca)}query(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,ba)}getTags(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ia)}setTags(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ba)}}const Zs=new g.Serializer(Hr,true);const ea={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ot},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ot},default:{bodyMapper:w,headersMapper:ct}},queryParameters:[Jr,Gi,Vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,zi,Yi,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,serializer:Zs};const ta={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:pt},default:{bodyMapper:w,headersMapper:dt}},queryParameters:[Jr,Gi,Vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,serializer:Zs};const ra={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:At},default:{bodyMapper:w,headersMapper:ut}},queryParameters:[Jr,Gi,Vi,tn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,en],isXML:true,serializer:Zs};const ia={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:mt},default:{bodyMapper:w,headersMapper:ht}},queryParameters:[Jr,vi],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Zs};const na={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:ft},default:{bodyMapper:w,headersMapper:Et}},queryParameters:[Jr,rn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,nn,sn],isXML:true,serializer:Zs};const sa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:yt},default:{bodyMapper:w,headersMapper:Ct}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,an,on,ln,cn,pn,dn],isXML:true,serializer:Zs};const aa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:bt},default:{bodyMapper:w,headersMapper:It}},queryParameters:[Jr,An],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ci,un,mn],isXML:true,serializer:Zs};const oa={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:Bt},default:{bodyMapper:w,headersMapper:vt}},queryParameters:[Jr,An],urlParameters:[jr],headerParameters:[Wr,Xr,$r],isXML:true,serializer:Zs};const la={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Qt},default:{bodyMapper:w,headersMapper:wt}},queryParameters:[Jr,gn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,hn],isXML:true,serializer:Zs};const ca={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:xt},default:{bodyMapper:w,headersMapper:St}},queryParameters:[Jr,bi],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn],isXML:true,serializer:Zs};const pa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Nt},default:{bodyMapper:w,headersMapper:Rt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Di,Ti,_i,$i,Ki,Zi],isXML:true,serializer:Zs};const da={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Dt},default:{bodyMapper:w,headersMapper:Tt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,ki,Oi,$i,Ki,Zi],isXML:true,serializer:Zs};const Aa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:_t},default:{bodyMapper:w,headersMapper:kt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Pi,$i,Ki,Zi],isXML:true,serializer:Zs};const ua={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Ot},default:{bodyMapper:w,headersMapper:Pt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Oi,Fi,Ui,$i,Ki,Zi],isXML:true,serializer:Zs};const ma={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Lt},default:{bodyMapper:w,headersMapper:Mt}},queryParameters:[Jr,Ri],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,Li,Mi,$i,Ki,Zi],isXML:true,serializer:Zs};const ga={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Ft},default:{bodyMapper:w,headersMapper:Ut}},queryParameters:[Jr,En],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn],isXML:true,serializer:Zs};const ha={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Ht},default:{bodyMapper:w,headersMapper:qt}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,$i,Ki,Zi,un,mn,yn,Cn,bn,In,Bn,vn,Qn,wn,xn,Sn,Nn],isXML:true,serializer:Zs};const fa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:Gt},default:{bodyMapper:w,headersMapper:Vt}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,mi,Ei,yi,Ci,$i,Ki,Zi,un,mn,fn,yn,bn,In,Bn,vn,wn,xn,Nn,Rn,Dn,Tn,_n],isXML:true,serializer:Zs};const Ea={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:jt},default:{bodyMapper:w,headersMapper:zt}},queryParameters:[Jr,kn,Pn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,On],isXML:true,serializer:Zs};const ya={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:Yt},202:{headersMapper:Yt},default:{bodyMapper:w,headersMapper:Jt}},queryParameters:[Jr,Gi,Vi,Ln],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi,Cn,Mn],isXML:true,serializer:Zs};const Ca={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:Wt},default:{bodyMapper:w,headersMapper:Xt}},queryParameters:[Yr,ai],urlParameters:[jr],headerParameters:[Wr,$r],isXML:true,serializer:Zs};const ba={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:$t},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:$t},default:{bodyMapper:w,headersMapper:Kt}},requestBody:Fn,queryParameters:[Jr,Gi,Un],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Zs};const Ia={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:P,headersMapper:Zt},default:{bodyMapper:w,headersMapper:er}},queryParameters:[Jr,Gi,Vi,Hn],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi],isXML:true,serializer:Zs};const Ba={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:tr},default:{bodyMapper:w,headersMapper:rr}},requestBody:qn,queryParameters:[Jr,Vi,Hn],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,Ei,Zi,Gn,Vn],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Zs};class PageBlob{constructor(e){this.client=e}create(e,t,r){const i={contentLength:e,blobContentLength:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,wa)}uploadPages(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,xa)}clearPages(e,t){const r={contentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Sa)}uploadPagesFromURL(e,t,r,i,n){const s={sourceUrl:e,sourceRange:t,contentLength:r,range:i,options:g.operationOptionsToRequestOptionsBase(n||{})};return this.client.sendOperationRequest(s,Na)}getPageRanges(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ra)}getPageRangesDiff(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Da)}resize(e,t){const r={blobContentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ta)}updateSequenceNumber(e,t){const r={sequenceNumberAction:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,_a)}copyIncremental(e,t){const r={copySource:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,ka)}}const va=new g.Serializer(Hr,true);const Qa=new g.Serializer(Hr,false);const wa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:ir},default:{bodyMapper:w,headersMapper:nr}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,jn,zn,Yn],isXML:true,serializer:va};const xa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:sr},default:{bodyMapper:w,headersMapper:ar}},requestBody:Wn,queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,yi,Ci,ji,Ji,Wi,Xi,$i,Ki,Zi,fn,Gn,Vn,Jn,Xn,Kn,Zn,es,ts],mediaType:"binary",serializer:Qa};const Sa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:or},default:{bodyMapper:w,headersMapper:lr}},queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,ji,Ji,Wi,Xi,$i,Ki,Zi,fn,Zn,es,ts,rs],isXML:true,serializer:va};const Na={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:cr},default:{bodyMapper:w,headersMapper:pr}},queryParameters:[Jr,$n],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,bn,In,Bn,vn,Dn,Tn,Kn,Zn,es,ts,is,ns,ss,as],isXML:true,serializer:va};const Ra={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:K,headersMapper:dr},default:{bodyMapper:w,headersMapper:Ar}},queryParameters:[Jr,ti,ri,Gi,os],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,$i,Ki,Zi],isXML:true,serializer:va};const Da={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:K,headersMapper:ur},default:{bodyMapper:w,headersMapper:mr}},queryParameters:[Jr,ti,ri,Gi,os,ls],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,ji,$i,Ki,Zi,cs],isXML:true,serializer:va};const Ta={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:gr},default:{bodyMapper:w,headersMapper:hr}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,zn],isXML:true,serializer:va};const _a={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:fr},default:{bodyMapper:w,headersMapper:Er}},queryParameters:[Yr,Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,Zi,Yn,ps],isXML:true,serializer:va};const ka={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:yr},default:{bodyMapper:w,headersMapper:Cr}},queryParameters:[Jr,ds],urlParameters:[jr],headerParameters:[Wr,Xr,$r,yi,Ci,$i,Ki,Zi,wn],isXML:true,serializer:va};class AppendBlob{constructor(e){this.client=e}create(e,t){const r={contentLength:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,La)}appendBlock(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ma)}appendBlockFromUrl(e,t,r){const i={sourceUrl:e,contentLength:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Fa)}seal(e){const t={options:g.operationOptionsToRequestOptionsBase(e||{})};return this.client.sendOperationRequest(t,Ua)}}const Oa=new g.Serializer(Hr,true);const Pa=new g.Serializer(Hr,false);const La={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:br},default:{bodyMapper:w,headersMapper:Ir}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,xn,Nn,As],isXML:true,serializer:Oa};const Ma={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Br},default:{bodyMapper:w,headersMapper:vr}},requestBody:Wn,queryParameters:[Jr,us],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,Gn,Vn,Jn,Xn,ms,gs],mediaType:"binary",serializer:Pa};const Fa={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Qr},default:{bodyMapper:w,headersMapper:wr}},queryParameters:[Jr,us],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,fn,bn,In,Bn,vn,Dn,Tn,Gn,is,ss,ms,gs,hs],isXML:true,serializer:Oa};const Ua={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:xr},default:{bodyMapper:w,headersMapper:Sr}},queryParameters:[Jr,fs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,yi,Ci,$i,Ki,gs],isXML:true,serializer:Oa};class BlockBlob{constructor(e){this.client=e}upload(e,t,r){const i={contentLength:e,body:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Ga)}putBlobFromUrl(e,t,r){const i={contentLength:e,copySource:t,options:g.operationOptionsToRequestOptionsBase(r||{})};return this.client.sendOperationRequest(i,Va)}stageBlock(e,t,r,i){const n={blockId:e,contentLength:t,body:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,ja)}stageBlockFromURL(e,t,r,i){const n={blockId:e,contentLength:t,sourceUrl:r,options:g.operationOptionsToRequestOptionsBase(i||{})};return this.client.sendOperationRequest(n,za)}commitBlockList(e,t){const r={blocks:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ya)}getBlockList(e,t){const r={listType:e,options:g.operationOptionsToRequestOptionsBase(t||{})};return this.client.sendOperationRequest(r,Ja)}}const Ha=new g.Serializer(Hr,true);const qa=new g.Serializer(Hr,false);const Ga={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Nr},default:{bodyMapper:w,headersMapper:Rr}},requestBody:Wn,queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,Gn,Vn,Jn,Xn,Es],mediaType:"binary",serializer:qa};const Va={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Dr},default:{bodyMapper:w,headersMapper:Tr}},queryParameters:[Jr],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,fn,yn,bn,In,Bn,vn,Qn,wn,xn,Dn,Tn,_n,Gn,Es,ys],isXML:true,serializer:Ha};const ja={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:_r},default:{bodyMapper:w,headersMapper:kr}},requestBody:Wn,queryParameters:[Jr,Cs,bs],urlParameters:[jr],headerParameters:[Wr,Xr,ci,Ei,Ji,Wi,Xi,fn,Gn,Vn,Jn,Xn],mediaType:"binary",serializer:qa};const za={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Or},default:{bodyMapper:w,headersMapper:Pr}},queryParameters:[Jr,Cs,bs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,ci,Ei,Ji,Wi,Xi,fn,bn,In,Bn,vn,Dn,Tn,is,ss,hs],isXML:true,serializer:Ha};const Ya={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:Lr},default:{bodyMapper:w,headersMapper:Mr}},requestBody:Is,queryParameters:[Jr,Bs],urlParameters:[jr],headerParameters:[qr,Vr,Wr,Xr,mi,Ei,yi,Ci,Ji,Wi,Xi,$i,Ki,Zi,an,on,ln,cn,pn,dn,un,mn,fn,yn,xn,Nn,Gn,Vn],isXML:true,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:Ha};const Ja={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:X,headersMapper:Fr},default:{bodyMapper:w,headersMapper:Ur}},queryParameters:[Jr,Gi,Bs,vs],urlParameters:[jr],headerParameters:[Wr,Xr,$r,Ei,Zi],isXML:true,serializer:Ha};const Wa=a.createClientLogger("storage-blob");const Xa="12.14.0";const $a="2022-11-02";const Ka=256*1024*1024;const Za=4e3*1024*1024;const eo=5e4;const to=8*1024*1024;const ro=4*1024*1024;const io=5;const no=100*1e3;const so="https://storage.azure.com/.default";const ao={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};const oo={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};const lo={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version"};const co="";const po="*";const Ao=1*1024*1024;const uo=256;const mo=4*Ao;const go="\r\n";const ho="HTTP/1.1";const fo="AES256";const Eo=`DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;const yo=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"];const Co=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"];const bo="BlobUsesCustomerSpecifiedEncryption";const Io="BlobDoesNotUseCustomerSpecifiedEncryption";const Bo=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function escapeURLPath(e){const t=i.URLBuilder.parse(e);let r=t.getPath();r=r||"/";r=escape(r);t.setPath(r);return t.toString()}function getProxyUriFromDevConnString(e){let t="";if(e.search("DevelopmentStorageProxyUri=")!==-1){const r=e.split(";");for(const e of r){if(e.trim().startsWith("DevelopmentStorageProxyUri=")){t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1]}}}return t}function getValueInConnString(e,t){const r=e.split(";");for(const e of r){if(e.trim().startsWith(t)){return e.trim().match(t+"=(.*)")[1]}}return""}function extractConnectionStringParts(e){let t="";if(e.startsWith("UseDevelopmentStorage=true")){t=getProxyUriFromDevConnString(e);e=Eo}let r=getValueInConnString(e,"BlobEndpoint");r=r.endsWith("/")?r.slice(0,-1):r;if(e.search("DefaultEndpointsProtocol=")!==-1&&e.search("AccountKey=")!==-1){let i="";let n="";let s=Buffer.from("accountKey","base64");let a="";n=getValueInConnString(e,"AccountName");s=Buffer.from(getValueInConnString(e,"AccountKey"),"base64");if(!r){i=getValueInConnString(e,"DefaultEndpointsProtocol");const t=i.toLowerCase();if(t!=="https"&&t!=="http"){throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'")}a=getValueInConnString(e,"EndpointSuffix");if(!a){throw new Error("Invalid EndpointSuffix in the provided Connection String")}r=`${i}://${n}.blob.${a}`}if(!n){throw new Error("Invalid AccountName in the provided Connection String")}else if(s.length===0){throw new Error("Invalid AccountKey in the provided Connection String")}return{kind:"AccountConnString",url:r,accountName:n,accountKey:s,proxyUri:t}}else{const t=getValueInConnString(e,"SharedAccessSignature");const i=getAccountNameFromUrl(r);if(!r){throw new Error("Invalid BlobEndpoint in the provided SAS Connection String")}else if(!t){throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}return{kind:"SASConnString",url:r,accountName:i,accountSas:t}}}function escape(e){return encodeURIComponent(e).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function appendToURLPath(e,t){const r=i.URLBuilder.parse(e);let n=r.getPath();n=n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t;r.setPath(n);const s=new URL(r.toString());return s.toString()}function setURLParameter(e,t,r){const n=i.URLBuilder.parse(e);n.setQueryParameter(t,r);return n.toString()}function getURLParameter(e,t){const r=i.URLBuilder.parse(e);return r.getQueryParameterValue(t)}function setURLHost(e,t){const r=i.URLBuilder.parse(e);r.setHost(t);return r.toString()}function getURLPath(e){const t=i.URLBuilder.parse(e);return t.getPath()}function getURLScheme(e){const t=i.URLBuilder.parse(e);return t.getScheme()}function getURLPathAndQuery(e){const t=i.URLBuilder.parse(e);const r=t.getPath();if(!r){throw new RangeError("Invalid url without valid path.")}let n=t.getQuery()||"";n=n.trim();if(n!==""){n=n.startsWith("?")?n:`?${n}`}return`${r}${n}`}function getURLQueries(e){let t=i.URLBuilder.parse(e).getQuery();if(!t){return{}}t=t.trim();t=t.startsWith("?")?t.substr(1):t;let r=t.split("&");r=r.filter((e=>{const t=e.indexOf("=");const r=e.lastIndexOf("=");return t>0&&t===r&&rn){e=e.slice(0,n)}const s=e+padStart(t.toString(),r-e.length,"0");return base64encode(s)}async function delay(e,t,r){return new Promise(((i,n)=>{let s;const abortHandler=()=>{if(s!==undefined){clearTimeout(s)}n(r)};const resolveHandler=()=>{if(t!==undefined){t.removeEventListener("abort",abortHandler)}i()};s=setTimeout(resolveHandler,e);if(t!==undefined){t.addEventListener("abort",abortHandler)}}))}function padStart(e,t,r=" "){if(String.prototype.padStart){return e.padStart(t,r)}r=r||" ";if(e.length>t){return e}else{t=t-e.length;if(t>r.length){r+=r.repeat(t/r.length)}return r.slice(0,t)+e}}function iEqual(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function getAccountNameFromUrl(e){const t=i.URLBuilder.parse(e);let r;try{if(t.getHost().split(".")[1]==="blob"){r=t.getHost().split(".")[0]}else if(isIpEndpointStyle(t)){r=t.getPath().split("/")[1]}else{r=""}return r}catch(e){throw new Error("Unable to extract accountName with provided information.")}}function isIpEndpointStyle(e){if(e.getHost()===undefined){return false}const t=e.getHost()+(e.getPort()===undefined?"":":"+e.getPort());return/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||e.getPort()!==undefined&&Bo.includes(e.getPort())}function toBlobTagsString(e){if(e===undefined){return undefined}const t=[];for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(i)}`)}}return t.join("&")}function toBlobTags(e){if(e===undefined){return undefined}const t={blobTagSet:[]};for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];t.blobTagSet.push({key:r,value:i})}}return t}function toTags(e){if(e===undefined){return undefined}const t={};for(const r of e.blobTagSet){t[r.key]=r.value}return t}function toQuerySerialization(e){if(e===undefined){return undefined}switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||false}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function parseObjectReplicationRecord(e){if(!e){return undefined}if("policy-id"in e){return undefined}const t=[];for(const r in e){const i=r.split("_");const n="or-";if(i[0].startsWith(n)){i[0]=i[0].substring(n.length)}const s={ruleId:i[1],replicationStatus:e[r]};const a=t.findIndex((e=>e.policyId===i[0]));if(a>-1){t[a].rules.push(s)}else{t.push({policyId:i[0],rules:[s]})}}return t}function attachCredential(e,t){e.credential=t;return e}function httpAuthorizationToString(e){return e?e.scheme+" "+e.value:undefined}function BlobNameToString(e){if(e.encoded){return decodeURIComponent(e.content)}else{return e.content}}function ConvertInternalResponseOfListBlobFlat(e){return Object.assign(Object.assign({},e),{segment:{blobItems:e.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)});return t}))}})}function ConvertInternalResponseOfListBlobHierarchy(e){var t;return Object.assign(Object.assign({},e),{segment:{blobPrefixes:(t=e.segment.blobPrefixes)===null||t===void 0?void 0:t.map((e=>{const t={name:BlobNameToString(e.name)};return t})),blobItems:e.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)});return t}))}})}function*ExtractPageRangeInfoItems(e){let t=[];let r=[];if(e.pageRange)t=e.pageRange;if(e.clearRange)r=e.clearRange;let i=0;let n=0;while(i=1?Math.floor(r.maxTries):vo.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:vo.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:vo.maxRetryDelayInMs):vo.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:vo.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:vo.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,false,1)}async attemptSendRequest(e,t,r){const i=e.clone();const n=t||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||r%2===1;if(!n){i.url=setURLHost(i.url,this.retryOptions.secondaryHost)}if(this.retryOptions.tryTimeoutInMs){i.url=setURLParameter(i.url,ao.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString())}let s;try{Wa.info(`RetryPolicy: =====> Try=${r} ${n?"Primary":"Secondary"}`);s=await this._nextPolicy.sendRequest(i);if(!this.shouldRetry(n,r,s)){return s}t=t||!n&&s.status===404}catch(e){Wa.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`);if(!this.shouldRetry(n,r,s,e)){throw e}}await this.delay(n,r,e.abortSignal);return this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,i){if(t>=this.retryOptions.maxTries){Wa.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`);return false}const n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(const e of n){if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e){Wa.info(`RetryPolicy: Network error ${e} found, will retry.`);return true}}}if(r||i){const t=r?r.status:i?i.statusCode:0;if(!e&&t===404){Wa.info(`RetryPolicy: Secondary access with 404, will retry.`);return true}if(t===503||t===500){Wa.info(`RetryPolicy: Will retry for status code ${t}.`);return true}}if((i===null||i===void 0?void 0:i.code)==="PARSE_ERROR"&&(i===null||i===void 0?void 0:i.message.startsWith(`Error "Error: Unclosed root tag`))){Wa.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");return true}return false}async delay(e,r,i){let n=0;if(e){switch(this.retryOptions.retryPolicyType){case t.StorageRetryPolicyType.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case t.StorageRetryPolicyType.FIXED:n=this.retryOptions.retryDelayInMs;break}}else{n=Math.random()*1e3}Wa.info(`RetryPolicy: Delay for ${n}ms`);return delay(n,i,Qo)}}class StorageRetryPolicyFactory{constructor(e){this.retryOptions=e}create(e,t){return new StorageRetryPolicy(e,t,this.retryOptions)}}class CredentialPolicy extends i.BaseRequestPolicy{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}class AnonymousCredentialPolicy extends CredentialPolicy{constructor(e,t){super(e,t)}}class Credential{create(e,t){throw new Error("Method should be implemented in children classes.")}}class AnonymousCredential extends Credential{create(e,t){return new AnonymousCredentialPolicy(e,t)}}class TelemetryPolicy extends i.BaseRequestPolicy{constructor(e,t,r){super(e,t);this.telemetry=r}async sendRequest(e){if(i.isNode){if(!e.headers){e.headers=new i.HttpHeaders}if(!e.headers.get(lo.USER_AGENT)){e.headers.set(lo.USER_AGENT,this.telemetry)}}return this._nextPolicy.sendRequest(e)}}class TelemetryPolicyFactory{constructor(e){const t=[];if(i.isNode){if(e){const r=e.userAgentPrefix||"";if(r.length>0&&t.indexOf(r)===-1){t.push(r)}}const r=`azsdk-js-storageblob/${Xa}`;if(t.indexOf(r)===-1){t.push(r)}let i=`(NODE-VERSION ${process.version})`;if(h){i=`(NODE-VERSION ${process.version}; ${h.type()} ${h.release()})`}if(t.indexOf(i)===-1){t.push(i)}}this.telemetryString=t.join(" ")}create(e,t){return new TelemetryPolicy(e,t,this.telemetryString)}}const wo=new i.DefaultHttpClient;function getCachedDefaultHttpClient(){return wo}const xo={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}};const So={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,r){async function tryGetAccessToken(){if(Date.now()e.getToken(t,r);i=beginRefresh(tryGetAccessToken,s.retryIntervalInMs,(o=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&o!==void 0?o:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(a.mustRefresh)return refresh(e);if(a.shouldRefresh){refresh(e)}return n}}function getChallenge(e){const t=e.headers.get("WWW-Authenticate");if(e.status===401&&t){return t}return}function parseChallenge(e){const t=e.slice("Bearer ".length);const r=`${t.trim()} `.split(" ").filter((e=>e));const i=r.map((e=>(([e,t])=>({[e]:t}))(e.trim().split("="))));return i.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}function storageBearerTokenChallengeAuthenticationPolicy(e,t){let r=createTokenCycler(e,t);class StorageBearerTokenChallengeAuthenticationPolicy extends i.BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(t){if(!t.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const n=r;const s=(await n({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext}})).token;t.headers.set(xo.HeaderConstants.AUTHORIZATION,`Bearer ${s}`);const a=await this._nextPolicy.sendRequest(t);if((a===null||a===void 0?void 0:a.status)===401){const n=getChallenge(a);if(n){const s=parseChallenge(n);const a=s.resource_id+xo.DefaultScope;const o=i.URLBuilder.parse(s.authorization_uri);const l=o.getPath().split("/");const c=l[1];const p=createTokenCycler(e,a);const d=(await p({abortSignal:t.abortSignal,tracingOptions:{tracingContext:t.tracingContext},tenantId:c})).token;r=p;t.headers.set(xo.HeaderConstants.AUTHORIZATION,`Bearer ${d}`);return this._nextPolicy.sendRequest(t)}}return a}}return{create:(e,t)=>new StorageBearerTokenChallengeAuthenticationPolicy(e,t)}}function isPipelineLike(e){if(!e||typeof e!=="object"){return false}const t=e;return Array.isArray(t.factories)&&typeof t.options==="object"&&typeof t.toServiceClientOptions==="function"}class Pipeline{constructor(e,t={}){this.factories=e;this.options=Object.assign(Object.assign({},t),{httpClient:t.httpClient||getCachedDefaultHttpClient()})}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}function newPipeline(e,t={}){var r;if(e===undefined){e=new AnonymousCredential}const n=new TelemetryPolicyFactory(t.userAgentOptions);const s=[i.tracingPolicy({userAgent:n.telemetryString}),i.keepAlivePolicy(t.keepAliveOptions),n,i.generateClientRequestIdPolicy(),new StorageBrowserPolicyFactory,new StorageRetryPolicyFactory(t.retryOptions),i.deserializationPolicy(undefined,{xmlCharKey:"#"}),i.logPolicy({logger:Wa.info,allowedHeaderNames:yo,allowedQueryParameters:Co})];if(i.isNode){s.push(i.proxyPolicy(t.proxyOptions));s.push(i.disableResponseDecompressionPolicy())}s.push(i.isTokenCredential(e)?attachCredential(storageBearerTokenChallengeAuthenticationPolicy(e,(r=t.audience)!==null&&r!==void 0?r:so),e):e);return new Pipeline(s,t)}class StorageSharedKeyCredentialPolicy extends CredentialPolicy{constructor(e,t,r){super(e,t);this.factory=r}signRequest(e){e.headers.set(lo.X_MS_DATE,(new Date).toUTCString());if(e.body&&(typeof e.body==="string"||e.body!==undefined)&&e.body.length>0){e.headers.set(lo.CONTENT_LENGTH,Buffer.byteLength(e.body))}const t=[e.method.toUpperCase(),this.getHeaderValueToSign(e,lo.CONTENT_LANGUAGE),this.getHeaderValueToSign(e,lo.CONTENT_ENCODING),this.getHeaderValueToSign(e,lo.CONTENT_LENGTH),this.getHeaderValueToSign(e,lo.CONTENT_MD5),this.getHeaderValueToSign(e,lo.CONTENT_TYPE),this.getHeaderValueToSign(e,lo.DATE),this.getHeaderValueToSign(e,lo.IF_MODIFIED_SINCE),this.getHeaderValueToSign(e,lo.IF_MATCH),this.getHeaderValueToSign(e,lo.IF_NONE_MATCH),this.getHeaderValueToSign(e,lo.IF_UNMODIFIED_SINCE),this.getHeaderValueToSign(e,lo.RANGE)].join("\n")+"\n"+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e);const r=this.factory.computeHMACSHA256(t);e.headers.set(lo.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${r}`);return e}getHeaderValueToSign(e,t){const r=e.headers.get(t);if(!r){return""}if(t===lo.CONTENT_LENGTH&&r==="0"){return""}return r}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter((e=>e.name.toLowerCase().startsWith(lo.PREFIX_FOR_STORAGE)));t.sort(((e,t)=>e.name.toLowerCase().localeCompare(t.name.toLowerCase())));t=t.filter(((e,t,r)=>{if(t>0&&e.name.toLowerCase()===r[t-1].name.toLowerCase()){return false}return true}));let r="";t.forEach((e=>{r+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}));return r}getCanonicalizedResourceString(e){const t=getURLPath(e.url)||"/";let r="";r+=`/${this.factory.accountName}${t}`;const i=getURLQueries(e.url);const n={};if(i){const e=[];for(const t in i){if(Object.prototype.hasOwnProperty.call(i,t)){const r=t.toLowerCase();n[r]=i[t];e.push(r)}}e.sort();for(const t of e){r+=`\n${t}:${decodeURIComponent(n[t])}`}}return r}}class StorageSharedKeyCredential extends Credential{constructor(e,t){super();this.accountName=e;this.accountKey=Buffer.from(t,"base64")}create(e,t){return new StorageSharedKeyCredentialPolicy(e,t,this)}computeHMACSHA256(e){return c.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}}const No="azure-storage-blob";const Ro="12.14.0";class StorageClientContext extends g.ServiceClient{constructor(e,t){if(e===undefined){throw new Error("'url' cannot be null")}if(!t){t={}}if(!t.userAgent){const e=g.getDefaultUserAgentValue();t.userAgent=`${No}/${Ro} ${e}`}super(undefined,t);this.requestContentType="application/json; charset=utf-8";this.baseUri=t.endpoint||"{url}";this.url=e;this.version=t.version||"2022-11-02"}}class StorageClient{constructor(e,t){this.url=escapeURLPath(e);this.accountName=getAccountNameFromUrl(e);this.pipeline=t;this.storageClientContext=new StorageClientContext(this.url,t.toServiceClientOptions());this.isHttps=iEqual(getURLScheme(this.url)||"","https");this.credential=new AnonymousCredential;for(const e of this.pipeline.factories){if(i.isNode&&e instanceof StorageSharedKeyCredential||e instanceof AnonymousCredential){this.credential=e}else if(i.isTokenCredential(e.credential)){this.credential=e.credential}}const r=this.storageClientContext;r.requestContentType=undefined}}const Do=s.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function convertTracingToRequestOptionsBase(e){var t,r;return{spanOptions:(t=e===null||e===void 0?void 0:e.tracingOptions)===null||t===void 0?void 0:t.spanOptions,tracingContext:(r=e===null||e===void 0?void 0:e.tracingOptions)===null||r===void 0?void 0:r.tracingContext}}class BlobSASPermissions{constructor(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false;this.permanentDelete=false}static parse(e){const t=new BlobSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"x":t.deleteVersion=true;break;case"t":t.tag=true;break;case"m":t.move=true;break;case"e":t.execute=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;default:throw new RangeError(`Invalid permission: ${r}`)}}return t}static from(e){const t=new BlobSASPermissions;if(e.read){t.read=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.deleteVersion){t.deleteVersion=true}if(e.tag){t.tag=true}if(e.move){t.move=true}if(e.execute){t.execute=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}return e.join("")}}class ContainerSASPermissions{constructor(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false;this.permanentDelete=false;this.filterByTags=false}static parse(e){const t=new ContainerSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"l":t.list=true;break;case"t":t.tag=true;break;case"x":t.deleteVersion=true;break;case"m":t.move=true;break;case"e":t.execute=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;case"f":t.filterByTags=true;break;default:throw new RangeError(`Invalid permission ${r}`)}}return t}static from(e){const t=new ContainerSASPermissions;if(e.read){t.read=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.list){t.list=true}if(e.deleteVersion){t.deleteVersion=true}if(e.tag){t.tag=true}if(e.move){t.move=true}if(e.execute){t.execute=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}if(e.filterByTags){t.filterByTags=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.list){e.push("l")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}if(this.filterByTags){e.push("f")}return e.join("")}}class UserDelegationKeyCredential{constructor(e,t){this.accountName=e;this.userDelegationKey=t;this.key=Buffer.from(t.value,"base64")}computeHMACSHA256(e){return c.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}}function ipRangeToString(e){return e.end?`${e.start}-${e.end}`:e.start}t.SASProtocol=void 0;(function(e){e["Https"]="https";e["HttpsAndHttp"]="https,http"})(t.SASProtocol||(t.SASProtocol={}));class SASQueryParameters{constructor(e,t,r,i,n,s,a,o,l,c,p,d,A,u,m,g,h,E,y,C){this.version=e;this.signature=t;if(r!==undefined&&typeof r!=="string"){this.permissions=r.permissions;this.services=r.services;this.resourceTypes=r.resourceTypes;this.protocol=r.protocol;this.startsOn=r.startsOn;this.expiresOn=r.expiresOn;this.ipRangeInner=r.ipRange;this.identifier=r.identifier;this.encryptionScope=r.encryptionScope;this.resource=r.resource;this.cacheControl=r.cacheControl;this.contentDisposition=r.contentDisposition;this.contentEncoding=r.contentEncoding;this.contentLanguage=r.contentLanguage;this.contentType=r.contentType;if(r.userDelegationKey){this.signedOid=r.userDelegationKey.signedObjectId;this.signedTenantId=r.userDelegationKey.signedTenantId;this.signedStartsOn=r.userDelegationKey.signedStartsOn;this.signedExpiresOn=r.userDelegationKey.signedExpiresOn;this.signedService=r.userDelegationKey.signedService;this.signedVersion=r.userDelegationKey.signedVersion;this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId;this.correlationId=r.correlationId}}else{this.services=i;this.resourceTypes=n;this.expiresOn=o;this.permissions=r;this.protocol=s;this.startsOn=a;this.ipRangeInner=l;this.encryptionScope=C;this.identifier=c;this.resource=p;this.cacheControl=d;this.contentDisposition=A;this.contentEncoding=u;this.contentLanguage=m;this.contentType=g;if(h){this.signedOid=h.signedObjectId;this.signedTenantId=h.signedTenantId;this.signedStartsOn=h.signedStartsOn;this.signedExpiresOn=h.signedExpiresOn;this.signedService=h.signedService;this.signedVersion=h.signedVersion;this.preauthorizedAgentObjectId=E;this.correlationId=y}}}get ipRange(){if(this.ipRangeInner){return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}return undefined}toString(){const e=["sv","ss","srt","spr","st","se","sip","si","ses","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"];const t=[];for(const r of e){switch(r){case"sv":this.tryAppendQueryParameter(t,r,this.version);break;case"ss":this.tryAppendQueryParameter(t,r,this.services);break;case"srt":this.tryAppendQueryParameter(t,r,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,r,this.protocol);break;case"st":this.tryAppendQueryParameter(t,r,this.startsOn?truncatedISO8061Date(this.startsOn,false):undefined);break;case"se":this.tryAppendQueryParameter(t,r,this.expiresOn?truncatedISO8061Date(this.expiresOn,false):undefined);break;case"sip":this.tryAppendQueryParameter(t,r,this.ipRange?ipRangeToString(this.ipRange):undefined);break;case"si":this.tryAppendQueryParameter(t,r,this.identifier);break;case"ses":this.tryAppendQueryParameter(t,r,this.encryptionScope);break;case"skoid":this.tryAppendQueryParameter(t,r,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,r,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,r,this.signedStartsOn?truncatedISO8061Date(this.signedStartsOn,false):undefined);break;case"ske":this.tryAppendQueryParameter(t,r,this.signedExpiresOn?truncatedISO8061Date(this.signedExpiresOn,false):undefined);break;case"sks":this.tryAppendQueryParameter(t,r,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,r,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,r,this.resource);break;case"sp":this.tryAppendQueryParameter(t,r,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,r,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,r,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,r,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,r,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,r,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,r,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,r,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,r,this.correlationId);break}}return t.join("&")}tryAppendQueryParameter(e,t,r){if(!r){return}t=encodeURIComponent(t);r=encodeURIComponent(r);if(t.length>0&&r.length>0){e.push(`${t}=${r}`)}}}function generateBlobSASQueryParameters(e,t,r){const i=e.version?e.version:$a;const n=t instanceof StorageSharedKeyCredential?t:undefined;let s;if(n===undefined&&r!==undefined){s=new UserDelegationKeyCredential(r,t)}if(n===undefined&&s===undefined){throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.")}if(i>="2020-12-06"){if(n!==undefined){return generateBlobSASQueryParameters20201206(e,n)}else{return generateBlobSASQueryParametersUDK20201206(e,s)}}if(i>="2018-11-09"){if(n!==undefined){return generateBlobSASQueryParameters20181109(e,n)}else{if(i>="2020-02-10"){return generateBlobSASQueryParametersUDK20200210(e,s)}else{return generateBlobSASQueryParametersUDK20181109(e,s)}}}if(i>="2015-04-05"){if(n!==undefined){return generateBlobSASQueryParameters20150405(e,n)}else{throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}}throw new RangeError("'version' must be >= '2015-04-05'.")}function generateBlobSASQueryParameters20150405(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";if(e.blobName){r="b"}let i;if(e.permissions){if(e.blobName){i=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{i=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const n=[i?i:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const s=t.computeHMACSHA256(n);return new SASQueryParameters(e.version,s,i,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20181109(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20201206(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,undefined,undefined,undefined,e.encryptionScope)}function generateBlobSASQueryParametersUDK20181109(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}function generateBlobSASQueryParametersUDK20200210(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}function generateBlobSASQueryParametersUDK20201206(e,t){e=SASSignatureValuesSanityCheckAndAutofill(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}let r="c";let i=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";i=e.versionId}}let n;if(e.permissions){if(e.blobName){n=BlobSASPermissions.parse(e.permissions.toString()).toString()}else{n=ContainerSASPermissions.parse(e.permissions.toString()).toString()}}const s=[n?n:"",e.startsOn?truncatedISO8061Date(e.startsOn,false):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,false):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,i,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");const a=t.computeHMACSHA256(s);return new SASQueryParameters(e.version,a,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope)}function getCanonicalName(e,t,r){const i=[`/blob/${e}/${t}`];if(r){i.push(`/${r}`)}return i.join("")}function SASSignatureValuesSanityCheckAndAutofill(e){const t=e.version?e.version:$a;if(e.snapshotTime&&t<"2018-11-09"){throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.")}if(e.blobName===undefined&&e.snapshotTime){throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.")}if(e.versionId&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.")}if(e.blobName===undefined&&e.versionId){throw RangeError("Must provide 'blobName' when providing 'versionId'.")}if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.")}if(e.permissions&&e.permissions.permanentDelete&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.")}if(e.permissions&&e.permissions.tag&&t<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.")}if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute)){throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.")}if(t<"2021-04-10"&&e.permissions&&e.permissions.filterByTags){throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.")}if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId)){throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.")}if(e.encryptionScope&&t<"2020-12-06"){throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.")}e.version=t;return e}class BlobLeaseClient{constructor(e,t){const r=new StorageClientContext(e.url,e.pipeline.toServiceClientOptions());this._url=e.url;if(e.name===undefined){this._isContainer=true;this._containerOrBlobOperation=new Container(r)}else{this._isContainer=false;this._containerOrBlobOperation=new Blob$1(r)}if(!t){t=i.generateUuid()}this._leaseId=t}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-acquireLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions}),proposedLeaseId:this._leaseId},convertTracingToRequestOptionsBase(p)))}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}async changeLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-changeLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{const r=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions})},convertTracingToRequestOptionsBase(p)));this._leaseId=e;return r}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}async releaseLease(e={}){var t,r,i,n,a,o;const{span:l,updatedOptions:c}=Do("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==co||((i=e.conditions)===null||i===void 0?void 0:i.ifNoneMatch)&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==co||((a=e.conditions)===null||a===void 0?void 0:a.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.releaseLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async renewLease(e={}){var t,r,i,n,a,o;const{span:l,updatedOptions:c}=Do("BlobLeaseClient-renewLease",e);if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==co||((i=e.conditions)===null||i===void 0?void 0:i.ifNoneMatch)&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==co||((a=e.conditions)===null||a===void 0?void 0:a.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{return await this._containerOrBlobOperation.renewLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async breakLease(e,t={}){var r,i,n,a,o,l;const{span:c,updatedOptions:p}=Do("BlobLeaseClient-breakLease",t);if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==co||((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==co||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}try{const r=Object.assign({abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(l=t.conditions)===null||l===void 0?void 0:l.tagConditions})},convertTracingToRequestOptionsBase(p));return await this._containerOrBlobOperation.breakLease(r)}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}}class RetriableReadableStream extends p.Readable{constructor(e,t,r,i,n={}){super({highWaterMark:n.highWaterMark});this.retries=0;this.sourceDataHandler=e=>{if(this.options.doInjectErrorOnce){this.options.doInjectErrorOnce=undefined;this.source.pause();this.source.removeAllListeners("data");this.source.emit("end");return}this.offset+=e.length;if(this.onProgress){this.onProgress({loadedBytes:this.offset-this.start})}if(!this.push(e)){this.source.pause()}};this.sourceErrorOrEndHandler=e=>{if(e&&e.name==="AbortError"){this.destroy(e);return}this.removeSourceEventHandlers();if(this.offset-1===this.end){this.push(null)}else if(this.offset<=this.end){if(this.retries{this.source=e;this.setSourceEventHandlers();return})).catch((e=>{this.destroy(e)}))}else{this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset-1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`))}}else{this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`))}};this.getter=t;this.source=e;this.start=r;this.offset=r;this.end=r+i-1;this.maxRetryRequests=n.maxRetryRequests&&n.maxRetryRequests>=0?n.maxRetryRequests:0;this.onProgress=n.onProgress;this.options=n;this.setSourceEventHandlers()}_read(){this.source.resume()}setSourceEventHandlers(){this.source.on("data",this.sourceDataHandler);this.source.on("end",this.sourceErrorOrEndHandler);this.source.on("error",this.sourceErrorOrEndHandler)}removeSourceEventHandlers(){this.source.removeListener("data",this.sourceDataHandler);this.source.removeListener("end",this.sourceErrorOrEndHandler);this.source.removeListener("error",this.sourceErrorOrEndHandler)}_destroy(e,t){this.removeSourceEventHandlers();this.source.destroy();t(e===null?undefined:e)}}class BlobDownloadResponse{constructor(e,t,r,i,n={}){this.originalResponse=e;this.blobDownloadStream=new RetriableReadableStream(this.originalResponse.readableStreamBody,t,r,i,n)}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return this.originalResponse.copyCompletedOn}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get tagCount(){return this.originalResponse.tagCount}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get lastAccessed(){return this.originalResponse.lastAccessed}get createdOn(){return this.originalResponse.createdOn}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get versionId(){return this.originalResponse.versionId}get isCurrentVersion(){return this.originalResponse.isCurrentVersion}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get objectReplicationDestinationPolicyId(){return this.originalResponse.objectReplicationDestinationPolicyId}get objectReplicationSourceProperties(){return this.originalResponse.objectReplicationSourceProperties}get isSealed(){return this.originalResponse.isSealed}get immutabilityPolicyExpiresOn(){return this.originalResponse.immutabilityPolicyExpiresOn}get immutabilityPolicyMode(){return this.originalResponse.immutabilityPolicyMode}get legalHold(){return this.originalResponse.legalHold}get contentAsBlob(){return this.originalResponse.blobBody}get readableStreamBody(){return i.isNode?this.blobDownloadStream:undefined}get _response(){return this.originalResponse._response}}const To=16;const _o=new Uint8Array([79,98,106,1]);const ko="avro.codec";const Oo="avro.schema";class AvroParser{static async readFixedBytes(e,t,r={}){const i=await e.read(t,{abortSignal:r.abortSignal});if(i.length!==t){throw new Error("Hit stream end.")}return i}static async readByte(e,t={}){const r=await AvroParser.readFixedBytes(e,1,t);return r[0]}static async readZigZagLong(e,t={}){let r=0;let i=0;let n,s,a;do{n=await AvroParser.readByte(e,t);s=n&128;r|=(n&127)<Number.MAX_SAFE_INTEGER){throw new Error("Integer overflow.")}return i}return r>>1^-(r&1)}static async readLong(e,t={}){return AvroParser.readZigZagLong(e,t)}static async readInt(e,t={}){return AvroParser.readZigZagLong(e,t)}static async readNull(){return null}static async readBoolean(e,t={}){const r=await AvroParser.readByte(e,t);if(r===1){return true}else if(r===0){return false}else{throw new Error("Byte was not a boolean.")}}static async readFloat(e,t={}){const r=await AvroParser.readFixedBytes(e,4,t);const i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.getFloat32(0,true)}static async readDouble(e,t={}){const r=await AvroParser.readFixedBytes(e,8,t);const i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.getFloat64(0,true)}static async readBytes(e,t={}){const r=await AvroParser.readLong(e,t);if(r<0){throw new Error("Bytes size was negative.")}return e.read(r,{abortSignal:t.abortSignal})}static async readString(e,t={}){const r=await AvroParser.readBytes(e,t);const i=new TextDecoder;return i.decode(r)}static async readMapPair(e,t,r={}){const i=await AvroParser.readString(e,r);const n=await t(e,r);return{key:i,value:n}}static async readMap(e,t,r={}){const readPairMethod=(e,r={})=>AvroParser.readMapPair(e,t,r);const i=await AvroParser.readArray(e,readPairMethod,r);const n={};for(const e of i){n[e.key]=e.value}return n}static async readArray(e,t,r={}){const i=[];for(let n=await AvroParser.readLong(e,r);n!==0;n=await AvroParser.readLong(e,r)){if(n<0){await AvroParser.readLong(e,r);n=-n}while(n--){const n=await t(e,r);i.push(n)}}return i}}var Po;(function(e){e["RECORD"]="record";e["ENUM"]="enum";e["ARRAY"]="array";e["MAP"]="map";e["UNION"]="union";e["FIXED"]="fixed"})(Po||(Po={}));var Lo;(function(e){e["NULL"]="null";e["BOOLEAN"]="boolean";e["INT"]="int";e["LONG"]="long";e["FLOAT"]="float";e["DOUBLE"]="double";e["BYTES"]="bytes";e["STRING"]="string"})(Lo||(Lo={}));class AvroType{static fromSchema(e){if(typeof e==="string"){return AvroType.fromStringSchema(e)}else if(Array.isArray(e)){return AvroType.fromArraySchema(e)}else{return AvroType.fromObjectSchema(e)}}static fromStringSchema(e){switch(e){case Lo.NULL:case Lo.BOOLEAN:case Lo.INT:case Lo.LONG:case Lo.FLOAT:case Lo.DOUBLE:case Lo.BYTES:case Lo.STRING:return new AvroPrimitiveType(e);default:throw new Error(`Unexpected Avro type ${e}`)}}static fromArraySchema(e){return new AvroUnionType(e.map(AvroType.fromSchema))}static fromObjectSchema(e){const t=e.type;try{return AvroType.fromStringSchema(t)}catch(e){}switch(t){case Po.RECORD:if(e.aliases){throw new Error(`aliases currently is not supported, schema: ${e}`)}if(!e.name){throw new Error(`Required attribute 'name' doesn't exist on schema: ${e}`)}const r={};if(!e.fields){throw new Error(`Required attribute 'fields' doesn't exist on schema: ${e}`)}for(const t of e.fields){r[t.name]=AvroType.fromSchema(t.type)}return new AvroRecordType(r,e.name);case Po.ENUM:if(e.aliases){throw new Error(`aliases currently is not supported, schema: ${e}`)}if(!e.symbols){throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${e}`)}return new AvroEnumType(e.symbols);case Po.MAP:if(!e.values){throw new Error(`Required attribute 'values' doesn't exist on schema: ${e}`)}return new AvroMapType(AvroType.fromSchema(e.values));case Po.ARRAY:case Po.FIXED:default:throw new Error(`Unexpected Avro type ${t} in ${e}`)}}}class AvroPrimitiveType extends AvroType{constructor(e){super();this._primitive=e}read(e,t={}){switch(this._primitive){case Lo.NULL:return AvroParser.readNull();case Lo.BOOLEAN:return AvroParser.readBoolean(e,t);case Lo.INT:return AvroParser.readInt(e,t);case Lo.LONG:return AvroParser.readLong(e,t);case Lo.FLOAT:return AvroParser.readFloat(e,t);case Lo.DOUBLE:return AvroParser.readDouble(e,t);case Lo.BYTES:return AvroParser.readBytes(e,t);case Lo.STRING:return AvroParser.readString(e,t);default:throw new Error("Unknown Avro Primitive")}}}class AvroEnumType extends AvroType{constructor(e){super();this._symbols=e}async read(e,t={}){const r=await AvroParser.readInt(e,t);return this._symbols[r]}}class AvroUnionType extends AvroType{constructor(e){super();this._types=e}async read(e,t={}){const r=await AvroParser.readInt(e,t);return this._types[r].read(e,t)}}class AvroMapType extends AvroType{constructor(e){super();this._itemType=e}read(e,t={}){const readItemMethod=(e,t)=>this._itemType.read(e,t);return AvroParser.readMap(e,readItemMethod,t)}}class AvroRecordType extends AvroType{constructor(e,t){super();this._fields=e;this._name=t}async read(e,t={}){const r={};r["$schema"]=this._name;for(const i in this._fields){if(Object.prototype.hasOwnProperty.call(this._fields,i)){r[i]=await this._fields[i].read(e,t)}}return r}}function arraysEqual(e,t){if(e===t)return true;if(e==null||t==null)return false;if(e.length!==t.length)return false;for(let r=0;r0){for(let t=0;t0}parseObjects(e={}){return n.__asyncGenerator(this,arguments,(function*parseObjects_1(){if(!this._initialized){yield n.__await(this.initialize(e))}while(this.hasNext()){const t=yield n.__await(this._itemType.read(this._dataStream,{abortSignal:e.abortSignal}));this._itemsRemainingInBlock--;this._objectIndex++;if(this._itemsRemainingInBlock===0){const t=yield n.__await(AvroParser.readFixedBytes(this._dataStream,To,{abortSignal:e.abortSignal}));this._blockOffset=this._initialBlockOffset+this._dataStream.position;this._objectIndex=0;if(!arraysEqual(this._syncMarker,t)){throw new Error("Stream is not a valid Avro file.")}try{this._itemsRemainingInBlock=yield n.__await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}))}catch(e){this._itemsRemainingInBlock=0}if(this._itemsRemainingInBlock>0){yield n.__await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}))}}yield yield n.__await(t)}}))}}class AvroReadable{}const Mo=new o.AbortError("Reading from the avro stream was aborted.");class AvroReadableFromStream extends AvroReadable{constructor(e){super();this._readable=e;this._position=0}toUint8Array(e){if(typeof e==="string"){return Buffer.from(e)}return e}get position(){return this._position}async read(e,t={}){var r;if((r=t.abortSignal)===null||r===void 0?void 0:r.aborted){throw Mo}if(e<0){throw new Error(`size parameter should be positive: ${e}`)}if(e===0){return new Uint8Array}if(!this._readable.readable){throw new Error("Stream no longer readable.")}const i=this._readable.read(e);if(i){this._position+=i.length;return this.toUint8Array(i)}else{return new Promise(((r,i)=>{const cleanUp=()=>{this._readable.removeListener("readable",readableCallback);this._readable.removeListener("error",rejectCallback);this._readable.removeListener("end",rejectCallback);this._readable.removeListener("close",rejectCallback);if(t.abortSignal){t.abortSignal.removeEventListener("abort",abortHandler)}};const readableCallback=()=>{const t=this._readable.read(e);if(t){this._position+=t.length;cleanUp();r(this.toUint8Array(t))}};const rejectCallback=()=>{cleanUp();i()};const abortHandler=()=>{cleanUp();i(Mo)};this._readable.on("readable",readableCallback);this._readable.once("error",rejectCallback);this._readable.once("end",rejectCallback);this._readable.once("close",rejectCallback);if(t.abortSignal){t.abortSignal.addEventListener("abort",abortHandler)}}))}}}class BlobQuickQueryStream extends p.Readable{constructor(e,t={}){super();this.avroPaused=true;this.source=e;this.onProgress=t.onProgress;this.onError=t.onError;this.avroReader=new AvroReader(new AvroReadableFromStream(this.source));this.avroIter=this.avroReader.parseObjects({abortSignal:t.abortSignal})}_read(){if(this.avroPaused){this.readInternal().catch((e=>{this.emit("error",e)}))}}async readInternal(){this.avroPaused=false;let e;do{e=await this.avroIter.next();if(e.done){break}const t=e.value;const r=t.$schema;if(typeof r!=="string"){throw Error("Missing schema in avro record.")}switch(r){case"com.microsoft.azure.storage.queryBlobContents.resultData":{const e=t.data;if(e instanceof Uint8Array===false){throw Error("Invalid data in avro result record.")}if(!this.push(Buffer.from(e))){this.avroPaused=true}}break;case"com.microsoft.azure.storage.queryBlobContents.progress":{const e=t.bytesScanned;if(typeof e!=="number"){throw Error("Invalid bytesScanned in avro progress record.")}if(this.onProgress){this.onProgress({loadedBytes:e})}}break;case"com.microsoft.azure.storage.queryBlobContents.end":if(this.onProgress){const e=t.totalBytes;if(typeof e!=="number"){throw Error("Invalid totalBytes in avro end record.")}this.onProgress({loadedBytes:e})}this.push(null);break;case"com.microsoft.azure.storage.queryBlobContents.error":if(this.onError){const e=t.fatal;if(typeof e!=="boolean"){throw Error("Invalid fatal in avro error record.")}const r=t.name;if(typeof r!=="string"){throw Error("Invalid name in avro error record.")}const i=t.description;if(typeof i!=="string"){throw Error("Invalid description in avro error record.")}const n=t.position;if(typeof n!=="number"){throw Error("Invalid position in avro error record.")}this.onError({position:n,name:r,isFatal:e,description:i})}break;default:throw Error(`Unknown schema ${r} in avro progress record.`)}}while(!e.done&&!this.avroPaused)}}class BlobQueryResponse{constructor(e,t={}){this.originalResponse=e;this.blobDownloadStream=new BlobQuickQueryStream(this.originalResponse.readableStreamBody,t)}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return undefined}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){return undefined}get readableStreamBody(){return i.isNode?this.blobDownloadStream:undefined}get _response(){return this.originalResponse._response}}t.BlockBlobTier=void 0;(function(e){e["Hot"]="Hot";e["Cool"]="Cool";e["Cold"]="Cold";e["Archive"]="Archive"})(t.BlockBlobTier||(t.BlockBlobTier={}));t.PremiumPageBlobTier=void 0;(function(e){e["P4"]="P4";e["P6"]="P6";e["P10"]="P10";e["P15"]="P15";e["P20"]="P20";e["P30"]="P30";e["P40"]="P40";e["P50"]="P50";e["P60"]="P60";e["P70"]="P70";e["P80"]="P80"})(t.PremiumPageBlobTier||(t.PremiumPageBlobTier={}));function toAccessTier(e){if(e===undefined){return undefined}return e}function ensureCpkIfSpecified(e,t){if(e&&!t){throw new RangeError("Customer-provided encryption key must be used over HTTPS.")}if(e&&!e.encryptionAlgorithm){e.encryptionAlgorithm=fo}}t.StorageBlobAudience=void 0;(function(e){e["StorageOAuthScopes"]="https://storage.azure.com/.default";e["DiskComputeOAuthScopes"]="https://disk.compute.azure.com/.default"})(t.StorageBlobAudience||(t.StorageBlobAudience={}));function rangeResponseFromModel(e){const t=(e._response.parsedBody.pageRange||[]).map((e=>({offset:e.start,count:e.end-e.start})));const r=(e._response.parsedBody.clearRange||[]).map((e=>({offset:e.start,count:e.end-e.start})));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}class BlobBeginCopyFromUrlPoller extends d.Poller{constructor(e){const{blobClient:t,copySource:r,intervalInMs:i=15e3,onProgress:n,resumeFrom:s,startCopyFromURLOptions:a}=e;let o;if(s){o=JSON.parse(s).state}const l=makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({},o),{blobClient:t,copySource:r,startCopyFromURLOptions:a}));super(l);if(typeof n==="function"){this.onProgress(n)}this.intervalInMs=i}delay(){return i.delay(this.intervalInMs)}}const Fo=async function cancel(e={}){const t=this.state;const{copyId:r}=t;if(t.isCompleted){return makeBlobBeginCopyFromURLPollOperation(t)}if(!r){t.isCancelled=true;return makeBlobBeginCopyFromURLPollOperation(t)}await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal});t.isCancelled=true;return makeBlobBeginCopyFromURLPollOperation(t)};const Uo=async function update(e={}){const t=this.state;const{blobClient:r,copySource:i,startCopyFromURLOptions:n}=t;if(!t.isStarted){t.isStarted=true;const e=await r.startCopyFromURL(i,n);t.copyId=e.copyId;if(e.copyStatus==="success"){t.result=e;t.isCompleted=true}}else if(!t.isCompleted){try{const r=await t.blobClient.getProperties({abortSignal:e.abortSignal});const{copyStatus:i,copyProgress:n}=r;const s=t.copyProgress;if(n){t.copyProgress=n}if(i==="pending"&&n!==s&&typeof e.fireProgress==="function"){e.fireProgress(t)}else if(i==="success"){t.result=r;t.isCompleted=true}else if(i==="failed"){t.error=new Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`);t.isCompleted=true}}catch(e){t.error=e;t.isCompleted=true}}return makeBlobBeginCopyFromURLPollOperation(t)};const Ho=function toString(){return JSON.stringify({state:this.state},((e,t)=>{if(e==="blobClient"){return undefined}return t}))};function makeBlobBeginCopyFromURLPollOperation(e){return{state:Object.assign({},e),cancel:Fo,toString:Ho,update:Uo}}function rangeToString(e){if(e.offset<0){throw new RangeError(`Range.offset cannot be smaller than 0.`)}if(e.count&&e.count<=0){throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`)}return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var qo;(function(e){e[e["Good"]=0]="Good";e[e["Error"]=1]="Error"})(qo||(qo={}));class Batch{constructor(e=5){this.actives=0;this.completed=0;this.offset=0;this.operations=[];this.state=qo.Good;if(e<1){throw new RangeError("concurrency must be larger than 0")}this.concurrency=e;this.emitter=new A.EventEmitter}addOperation(e){this.operations.push((async()=>{try{this.actives++;await e();this.actives--;this.completed++;this.parallelExecute()}catch(e){this.emitter.emit("error",e)}}))}async do(){if(this.operations.length===0){return Promise.resolve()}this.parallelExecute();return new Promise(((e,t)=>{this.emitter.on("finish",e);this.emitter.on("error",(e=>{this.state=qo.Error;t(e)}))}))}nextOperation(){if(this.offset=this.operations.length){this.emitter.emit("finish");return}while(this.actives=this.byteLength){this.push(null)}if(!e){e=this.readableHighWaterMark}const t=[];let r=0;while(re-r){const i=this.byteOffsetInCurrentBuffer+e-r;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,i));this.pushedBytesLength+=e-r;this.byteOffsetInCurrentBuffer=i;r=e;break}else{const e=this.byteOffsetInCurrentBuffer+s;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,e));if(s===n){this.byteOffsetInCurrentBuffer=0;this.bufferIndex++}else{this.byteOffsetInCurrentBuffer=e}this.pushedBytesLength+=s;r+=s}}if(t.length>1){this.push(Buffer.concat(t))}else if(t.length===1){this.push(t[0])}}}const Go=r(4300).constants.MAX_LENGTH;class PooledBuffer{constructor(e,t,r){this.buffers=[];this.capacity=e;this._size=0;const i=Math.ceil(e/Go);for(let t=0;t0){e[0]=e[0].slice(s)}}getReadableStream(){return new BuffersStream(this.buffers,this.size)}}class BufferScheduler{constructor(e,t,r,i,n,s){this.emitter=new A.EventEmitter;this.offset=0;this.isStreamEnd=false;this.isError=false;this.executingOutgoingHandlers=0;this.numBuffers=0;this.unresolvedDataArray=[];this.unresolvedLength=0;this.incoming=[];this.outgoing=[];if(t<=0){throw new RangeError(`bufferSize must be larger than 0, current is ${t}`)}if(r<=0){throw new RangeError(`maxBuffers must be larger than 0, current is ${r}`)}if(n<=0){throw new RangeError(`concurrency must be larger than 0, current is ${n}`)}this.bufferSize=t;this.maxBuffers=r;this.readable=e;this.outgoingHandler=i;this.concurrency=n;this.encoding=s}async do(){return new Promise(((e,t)=>{this.readable.on("data",(e=>{e=typeof e==="string"?Buffer.from(e,this.encoding):e;this.appendUnresolvedData(e);if(!this.resolveData()){this.readable.pause()}}));this.readable.on("error",(e=>{this.emitter.emit("error",e)}));this.readable.on("end",(()=>{this.isStreamEnd=true;this.emitter.emit("checkEnd")}));this.emitter.on("error",(e=>{this.isError=true;this.readable.pause();t(e)}));this.emitter.on("checkEnd",(()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0){if(this.unresolvedLength>0&&this.unresolvedLengthr.getReadableStream()),r.size,this.offset).then(e).catch(t)}else if(this.unresolvedLength>=this.bufferSize){return}else{e()}}}))}))}appendUnresolvedData(e){this.unresolvedDataArray.push(e);this.unresolvedLength+=e.length}shiftBufferFromUnresolvedDataArray(e){if(!e){e=new PooledBuffer(this.bufferSize,this.unresolvedDataArray,this.unresolvedLength)}else{e.fill(this.unresolvedDataArray,this.unresolvedLength)}this.unresolvedLength-=e.size;return e}resolveData(){while(this.unresolvedLength>=this.bufferSize){let e;if(this.incoming.length>0){e=this.incoming.shift();this.shiftBufferFromUnresolvedDataArray(e)}else{if(this.numBuffers=this.concurrency){return}e=this.outgoing.shift();if(e){this.triggerOutgoingHandler(e)}}while(e)}async triggerOutgoingHandler(e){const t=e.size;this.executingOutgoingHandlers++;this.offset+=t;try{await this.outgoingHandler((()=>e.getReadableStream()),t,this.offset-t)}catch(e){this.emitter.emit("error",e);return}this.executingOutgoingHandlers--;this.reuseBuffer(e);this.emitter.emit("checkEnd")}reuseBuffer(e){this.incoming.push(e);if(!this.isError&&this.resolveData()&&!this.isStreamEnd){this.readable.resume()}}}async function streamToBuffer(e,t,r,i,n){let s=0;const a=i-r;return new Promise(((i,o)=>{const l=setTimeout((()=>o(new Error(`The operation cannot be completed in timeout.`))),no);e.on("readable",(()=>{if(s>=a){clearTimeout(l);i();return}let o=e.read();if(!o){return}if(typeof o==="string"){o=Buffer.from(o,n)}const c=s+o.length>a?a-s:o.length;t.fill(o.slice(0,c),r+s,r+s+c);s+=c}));e.on("end",(()=>{clearTimeout(l);if(s{clearTimeout(l);o(e)}))}))}async function streamToBuffer2(e,t,r){let i=0;const n=t.length;return new Promise(((s,a)=>{e.on("readable",(()=>{let s=e.read();if(!s){return}if(typeof s==="string"){s=Buffer.from(s,r)}if(i+s.length>n){a(new Error(`Stream exceeds buffer size. Buffer size: ${n}`));return}t.fill(s,i,i+s.length);i+=s.length}));e.on("end",(()=>{s(i)}));e.on("error",a)}))}async function readStreamToLocalFile(e,t){return new Promise(((r,i)=>{const n=E.createWriteStream(t);e.on("error",(e=>{i(e)}));n.on("error",(e=>{i(e)}));n.on("close",r);e.pipe(n)}))}const Vo=y.promisify(E.stat);const jo=E.createReadStream;class BlobClient extends StorageClient{constructor(e,t,r,n){n=n||{};let s;let a;if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;if(r&&typeof r!=="string"){n=r}s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl());this.blobContext=new Blob$1(this.storageClientContext);this._snapshot=getURLParameter(this.url,ao.Parameters.SNAPSHOT);this._versionId=getURLParameter(this.url,ao.Parameters.VERSIONID)}get name(){return this._name}get containerName(){return this._containerName}withSnapshot(e){return new BlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}withVersion(e){return new BlobClient(setURLParameter(this.url,ao.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)}getAppendBlobClient(){return new AppendBlobClient(this.url,this.pipeline)}getBlockBlobClient(){return new BlockBlobClient(this.url,this.pipeline)}getPageBlobClient(){return new PageBlobClient(this.url,this.pipeline)}async download(e=0,t,r={}){var n;r.conditions=r.conditions||{};r.conditions=r.conditions||{};ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);const{span:a,updatedOptions:o}=Do("BlobClient-download",r);try{const s=await this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:i.isNode?undefined:r.onProgress},range:e===0&&!t?undefined:rangeToString({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},convertTracingToRequestOptionsBase(o)));const a=Object.assign(Object.assign({},s),{_response:s._response,objectReplicationDestinationPolicyId:s.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(s.objectReplicationRules)});if(!i.isNode){return a}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=io}if(s.contentLength===undefined){throw new RangeError(`File download response doesn't contain valid content length header`)}if(!s.etag){throw new RangeError(`File download response doesn't contain valid etag header`)}return new BlobDownloadResponse(a,(async t=>{var i;const n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||s.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions},range:rangeToString({count:e+s.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},n))).readableStreamBody}),e,s.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async exists(e={}){const{span:t,updatedOptions:r}=Do("BlobClient-exists",e);try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:r.tracingOptions});return true}catch(e){if(e.statusCode===404){return false}else if(e.statusCode===409&&(e.details.errorCode===bo||e.details.errorCode===Io)){return true}t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async getProperties(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-getProperties",e);try{e.conditions=e.conditions||{};ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);const r=await this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},convertTracingToRequestOptionsBase(i)));return Object.assign(Object.assign({},r),{_response:r._response,objectReplicationDestinationPolicyId:r.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(r.objectReplicationRules)})}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async delete(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-delete",e);e.conditions=e.conditions||{};try{return await this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async deleteIfExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("BlobClient-deleteIfExists",e);try{const e=await this.delete(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async undelete(e={}){const{span:t,updatedOptions:r}=Do("BlobClient-undelete",e);try{return await this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setHTTPHeaders(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setHTTPHeaders",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setMetadata(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setMetadata",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,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},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setTags(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setTags",t);try{return await this.blobContext.setTags(Object.assign(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})},convertTracingToRequestOptionsBase(n)),{tags:toBlobTags(e)}))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async getTags(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-getTags",e);try{const r=await this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)));const n=Object.assign(Object.assign({},r),{_response:r._response,tags:toTags({blobTagSet:r.blobTagSet})||{}});return n}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async createSnapshot(e={}){var t;const{span:r,updatedOptions:i}=Do("BlobClient-createSnapshot",e);e.conditions=e.conditions||{};try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return await this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async beginCopyFromURL(e,t={}){const r={abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)};const i=new BlobBeginCopyFromUrlPoller({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});await i.poll();return i}async abortCopyFromURL(e,t={}){const{span:r,updatedOptions:i}=Do("BlobClient-abortCopyFromURL",t);try{return await this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async syncCopyFromURL(e,t={}){var r,i,n;const{span:a,updatedOptions:o}=Do("BlobClient-syncCopyFromURL",t);t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};try{return await this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),immutabilityPolicyExpiry:(i=t.immutabilityPolicy)===null||i===void 0?void 0:i.expiriesOn,immutabilityPolicyMode:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async setAccessTier(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlobClient-setAccessTier",t);try{return await this.blobContext.setTier(toAccessTier(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}),rehydratePriority:t.rehydratePriority},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async downloadToBuffer(e,t,r,i={}){let n;let a=0;let o=0;let l=i;if(e instanceof Buffer){n=e;a=t||0;o=typeof r==="number"?r:0}else{a=typeof e==="number"?e:0;o=typeof t==="number"?t:0;l=r||{}}const{span:c,updatedOptions:p}=Do("BlobClient-downloadToBuffer",l);try{if(!l.blockSize){l.blockSize=0}if(l.blockSize<0){throw new RangeError("blockSize option must be >= 0")}if(l.blockSize===0){l.blockSize=ro}if(a<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!l.conditions){l.conditions={}}if(!o){const e=await this.getProperties(Object.assign(Object.assign({},l),{tracingOptions:Object.assign(Object.assign({},l.tracingOptions),convertTracingToRequestOptionsBase(p))}));o=e.contentLength-a;if(o<0){throw new RangeError(`offset ${a} shouldn't be larger than blob size ${e.contentLength}`)}}if(!n){try{n=Buffer.alloc(o)}catch(e){throw new Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}}if(n.length{let t=a+o;if(r+l.blockSize{if(!(this.credential instanceof StorageSharedKeyCredential)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}const r=generateBlobSASQueryParameters(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).toString();t(appendToURLQuery(this.url,r))}))}async deleteImmutabilityPolicy(e){const{span:t,updatedOptions:r}=Do("BlobClient-deleteImmutabilityPolicy",e);try{return await this.blobContext.deleteImmutabilityPolicy(Object.assign({abortSignal:e===null||e===void 0?void 0:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setImmutabilityPolicy(e,t){const{span:r,updatedOptions:i}=Do("BlobClient-setImmutabilityPolicy",t);try{return await this.blobContext.setImmutabilityPolicy(Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal,immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,modifiedAccessConditions:t===null||t===void 0?void 0:t.modifiedAccessCondition},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async setLegalHold(e,t){const{span:r,updatedOptions:i}=Do("BlobClient-setLegalHold",t);try{return await this.blobContext.setLegalHold(e,Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}}class AppendBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.appendBlobContext=new AppendBlob(this.storageClientContext)}withSnapshot(e){return new AppendBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e={}){var t,r,i;const{span:n,updatedOptions:a}=Do("AppendBlobClient-create",e);e.conditions=e.conditions||{};try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return await this.appendBlobContext.create(0,Object.assign({abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:(r=e.immutabilityPolicy)===null||r===void 0?void 0:r.expiriesOn,immutabilityPolicyMode:(i=e.immutabilityPolicy)===null||i===void 0?void 0:i.policyMode,legalHold:e.legalHold,blobTagsString:toBlobTagsString(e.tags)},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async createIfNotExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("AppendBlobClient-createIfNotExists",e);const a={ifNoneMatch:po};try{const e=await this.create(Object.assign(Object.assign({},n),{conditions:a}));return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobAlreadyExists"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async seal(e={}){var t;const{span:r,updatedOptions:i}=Do("AppendBlobClient-seal",e);e.conditions=e.conditions||{};try{return await this.appendBlobContext.seal(Object.assign({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async appendBlock(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("AppendBlobClient-appendBlock",r);r.conditions=r.conditions||{};try{ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);return await this.appendBlobContext.appendBlock(t,e,Object.assign({abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async appendBlockFromURL(e,t,r,i={}){var n;const{span:a,updatedOptions:o}=Do("AppendBlobClient-appendBlockFromURL",i);i.conditions=i.conditions||{};i.sourceConditions=i.sourceConditions||{};try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.appendBlobContext.appendBlockFromUrl(e,0,Object.assign({abortSignal:i.abortSignal,sourceRange:rangeToString({offset:t,count:r}),sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,appendPositionAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:i.sourceConditions.ifMatch,sourceIfModifiedSince:i.sourceConditions.ifModifiedSince,sourceIfNoneMatch:i.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:i.sourceConditions.ifUnmodifiedSince},copySourceAuthorization:httpAuthorizationToString(i.sourceAuthorization),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}}class BlockBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;if(r&&typeof r!=="string"){n=r}s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.blockBlobContext=new BlockBlob(this.storageClientContext);this._blobContext=new Blob$1(this.storageClientContext)}withSnapshot(e){return new BlockBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async query(e,t={}){var r;ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);const{span:n,updatedOptions:a}=Do("BlockBlobClient-query",t);try{if(!i.isNode){throw new Error("This operation currently is only supported in Node.js.")}ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);const n=await this._blobContext.query(Object.assign({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:toQuerySerialization(t.inputTextConfiguration),outputSerialization:toQuerySerialization(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey},convertTracingToRequestOptionsBase(a)));return new BlobQueryResponse(n,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async upload(e,t,r={}){var i,n,a;r.conditions=r.conditions||{};const{span:o,updatedOptions:l}=Do("BlockBlobClient-upload",r);try{ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);return await this.blockBlobContext.upload(t,e,Object.assign({abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:(n=r.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=r.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:r.legalHold,tier:toAccessTier(r.tier),blobTagsString:toBlobTagsString(r.tags)},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async syncUploadFromURL(e,t={}){var r,i,n,a,o;t.conditions=t.conditions||{};const{span:l,updatedOptions:c}=Do("BlockBlobClient-syncUploadFromURL",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:t.conditions.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:(r=t.sourceConditions)===null||r===void 0?void 0:r.ifMatch,sourceIfModifiedSince:(i=t.sourceConditions)===null||i===void 0?void 0:i.ifModifiedSince,sourceIfNoneMatch:(n=t.sourceConditions)===null||n===void 0?void 0:n.ifNoneMatch,sourceIfUnmodifiedSince:(a=t.sourceConditions)===null||a===void 0?void 0:a.ifUnmodifiedSince,sourceIfTags:(o=t.sourceConditions)===null||o===void 0?void 0:o.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),copySourceTags:t.copySourceTags}),convertTracingToRequestOptionsBase(c)))}catch(e){l.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{l.end()}}async stageBlock(e,t,r,i={}){const{span:n,updatedOptions:a}=Do("BlockBlobClient-stageBlock",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.blockBlobContext.stageBlock(e,r,t,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,requestOptions:{onUploadProgress:i.onProgress},transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async stageBlockFromURL(e,t,r=0,i,n={}){const{span:a,updatedOptions:o}=Do("BlockBlobClient-stageBlockFromURL",n);try{ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps);return await this.blockBlobContext.stageBlockFromURL(e,0,t,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,sourceRange:r===0&&!i?undefined:rangeToString({offset:r,count:i}),cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async commitBlockList(e,t={}){var r,i,n;t.conditions=t.conditions||{};const{span:a,updatedOptions:o}=Do("BlockBlobClient-commitBlockList",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blockBlobContext.commitBlockList({latest:e},Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,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:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async getBlockList(e,t={}){var r;const{span:i,updatedOptions:n}=Do("BlockBlobClient-getBlockList",t);try{const i=await this.blockBlobContext.getBlockList(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})},convertTracingToRequestOptionsBase(n)));if(!i.committedBlocks){i.committedBlocks=[]}if(!i.uncommittedBlocks){i.uncommittedBlocks=[]}return i}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async uploadData(e,t={}){const{span:r,updatedOptions:n}=Do("BlockBlobClient-uploadData",t);try{if(i.isNode){let t;if(e instanceof Buffer){t=e}else if(e instanceof ArrayBuffer){t=Buffer.from(e)}else{e=e;t=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}return this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.byteLength,n)}else{const t=new Blob([e]);return this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.size,n)}}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadBrowserData(e,t={}){const{span:r,updatedOptions:i}=Do("BlockBlobClient-uploadBrowserData",t);try{const t=new Blob([e]);return await this.uploadSeekableInternal(((e,r)=>t.slice(e,e+r)),t.size,i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadSeekableInternal(e,t,r={}){if(!r.blockSize){r.blockSize=0}if(r.blockSize<0||r.blockSize>Za){throw new RangeError(`blockSize option must be >= 0 and <= ${Za}`)}if(r.maxSingleShotSize!==0&&!r.maxSingleShotSize){r.maxSingleShotSize=Ka}if(r.maxSingleShotSize<0||r.maxSingleShotSize>Ka){throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${Ka}`)}if(r.blockSize===0){if(t>Za*eo){throw new RangeError(`${t} is too larger to upload to a block blob.`)}if(t>r.maxSingleShotSize){r.blockSize=Math.ceil(t/eo);if(r.blockSizeeo){throw new RangeError(`The buffer's size is too big or the BlockSize is too small;`+`the number of blocks must be <= ${eo}`)}const s=[];const o=i.generateUuid();let l=0;const c=new Batch(r.concurrency);for(let i=0;i{const c=generateBlockID(o,i);const p=r.blockSize*i;const d=i===n-1?t:p+r.blockSize;const A=d-p;s.push(c);await this.stageBlock(c,e(p,A),A,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:a.tracingOptions});l+=A;if(r.onProgress){r.onProgress({loadedBytes:l})}}))}await c.do();return this.commitBlockList(s,a)}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadFile(e,t={}){const{span:r,updatedOptions:i}=Do("BlockBlobClient-uploadFile",t);try{const r=(await Vo(e)).size;return await this.uploadSeekableInternal(((t,r)=>()=>jo(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:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadStream(e,t=to,r=5,n={}){if(!n.blobHTTPHeaders){n.blobHTTPHeaders={}}if(!n.conditions){n.conditions={}}const{span:a,updatedOptions:o}=Do("BlockBlobClient-uploadStream",n);try{let s=0;const a=i.generateUuid();let l=0;const c=[];const p=new BufferScheduler(e,t,r,(async(e,t)=>{const r=generateBlockID(a,s);c.push(r);s++;await this.stageBlock(r,e,t,{conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:o.tracingOptions});l+=t;if(n.onProgress){n.onProgress({loadedBytes:l})}}),Math.ceil(r/4*3));await p.do();return await this.commitBlockList(c,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),convertTracingToRequestOptionsBase(o))}))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}}class PageBlobClient extends BlobClient{constructor(e,t,r,n){let s;let a;n=n||{};if(isPipelineLike(t)){a=e;s=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){a=e;n=r;s=newPipeline(t,n)}else if(!t&&typeof t!=="string"){a=e;s=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const l=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}s=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){a=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(l))+"?"+c.accountSas;s=newPipeline(new AnonymousCredential,n)}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(a,s);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(e){return new PageBlobClient(setURLParameter(this.url,ao.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e,t={}){var r,i,n;t.conditions=t.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async createIfNotExists(e,t={}){var r,i;const{span:n,updatedOptions:a}=Do("PageBlobClient-createIfNotExists",t);try{const r={ifNoneMatch:po};const i=await this.create(e,Object.assign(Object.assign({},t),{conditions:r,tracingOptions:a.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"){n.setStatus({code:s.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})}n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadPages(e,t,r,i={}){var n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.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){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async uploadPagesFromURL(e,t,r,i,n={}){var a;n.conditions=n.conditions||{};n.sourceConditions=n.sourceConditions||{};const{span:o,updatedOptions:l}=Do("PageBlobClient-uploadPagesFromURL",n);try{ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(e,rangeToString({offset:t,count:i}),0,rangeToString({offset:r,count:i}),Object.assign({abortSignal:n.abortSignal,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,sequenceNumberAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:n.sourceConditions.ifMatch,sourceIfModifiedSince:n.sourceConditions.ifModifiedSince,sourceIfNoneMatch:n.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:n.sourceConditions.ifUnmodifiedSince},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization)},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async clearPages(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async getPageRanges(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async listPageRangesSegment(e=0,t,r,i={}){var n;const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),range:rangeToString({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize},convertTracingToRequestOptionsBase(o)))}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}listPageRangeItemSegments(e=0,t,r,i={}){return n.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let s;if(!!r||r===undefined){do{s=yield n.__await(this.listPageRangesSegment(e,t,r,i));r=s.continuationToken;yield yield n.__await(yield n.__await(s))}while(r)}}))}listPageRangeItems(e=0,t,r={}){return n.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var i,s;let a;try{for(var o=n.__asyncValues(this.listPageRangeItemSegments(e,t,a,r)),l;l=yield n.__await(o.next()),!l.done;){const e=l.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){i={error:e}}finally{try{if(l&&!l.done&&(s=o.return))yield n.__await(s.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 n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async listPageRangesDiffSegment(e,t,r,i,n){var a;const{span:o,updatedOptions:l}=Do("PageBlobClient-getPageRangesDiffSegment",n);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n===null||n===void 0?void 0:n.abortSignal,leaseAccessConditions:n===null||n===void 0?void 0:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n===null||n===void 0?void 0:n.conditions),{ifTags:(a=n===null||n===void 0?void 0:n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),marker:i,maxPageSize:n===null||n===void 0?void 0:n.maxPageSize},convertTracingToRequestOptionsBase(l)))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}listPageRangeDiffItemSegments(e,t,r,i,s){return n.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let a;if(!!i||i===undefined){do{a=yield n.__await(this.listPageRangesDiffSegment(e,t,r,i,s));i=a.continuationToken;yield yield n.__await(yield n.__await(a))}while(i)}}))}listPageRangeDiffItems(e,t,r,i){return n.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var s,a;let o;try{for(var l=n.__asyncValues(this.listPageRangeDiffItemSegments(e,t,r,o,i)),c;c=yield n.__await(l.next()),!c.done;){const e=c.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){s={error:e}}finally{try{if(c&&!c.done&&(a=l.return))yield n.__await(a.call(l))}finally{if(s)throw s.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const n=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next(){return n.next()},[Symbol.asyncIterator](){return this},byPage:(n={})=>this.listPageRangeDiffItemSegments(e,t,r,n.continuationToken,Object.assign({maxPageSize:n.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){var n;i.conditions=i.conditions||{};const{span:a,updatedOptions:o}=Do("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:(n=i.conditions)===null||n===void 0?void 0:n.tagConditions}),prevSnapshotUrl:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){a.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async resize(e,t={}){var r;t.conditions=t.conditions||{};const{span:i,updatedOptions:n}=Do("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(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async updateSequenceNumber(e,t,r={}){var i;r.conditions=r.conditions||{};const{span:n,updatedOptions:a}=Do("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(a)))}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async startCopyIncremental(e,t={}){var r;const{span:i,updatedOptions:n}=Do("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(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}}async function getBodyAsText(e){let t=Buffer.alloc(mo);const r=await streamToBuffer2(e.readableStreamBody,t);t=t.slice(0,r);return t.toString()}function utf8ByteLength(e){return Buffer.byteLength(e)}const zo=": ";const Yo=" ";const Jo=-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}${go}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==oo.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 n=new Array(r);let s=0;let a=0;for(let e=0;e=0&&A{if(this.keys[e]===undefined||this.keys[e]===Wo.UNLOCKED){this.keys[e]=Wo.LOCKED;t()}else{this.onUnlockEvent(e,(()=>{this.keys[e]=Wo.LOCKED;t()}))}}))}static async unlock(e){return new Promise((t=>{if(this.keys[e]===Wo.LOCKED){this.emitUnlockEvent(e)}delete this.keys[e];t()}))}static onUnlockEvent(e,t){if(this.listeners[e]===undefined){this.listeners[e]=[t]}else{this.listeners[e].push(t)}}static emitUnlockEvent(e){if(this.listeners[e]!==undefined&&this.listeners[e].length>0){const t=this.listeners[e].shift();setImmediate((()=>{t.call(this)}))}}}Mutex.keys={};Mutex.listeners={};class BlobBatch{constructor(){this.batch="batch";this.batchRequest=new InnerBatchRequest}getMultiPartContentType(){return this.batchRequest.getMultipartContentType()}getHttpRequestBody(){return this.batchRequest.getHttpRequestBody()}getSubRequests(){return this.batchRequest.getSubRequests()}async addSubRequestInternal(e,t){await Mutex.lock(this.batch);try{this.batchRequest.preAddSubRequest(e);await t();this.batchRequest.postAddSubRequest(e)}finally{await Mutex.unlock(this.batch)}}setBatchType(e){if(!this.batchType){this.batchType=e}if(this.batchType!==e){throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`)}}async deleteBlob(e,t,r){let n;let a;if(typeof e==="string"&&(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t))){n=e;a=t}else if(e instanceof BlobClient){n=e.url;a=e.credential;r=t}else{throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.")}if(!r){r={}}const{span:o,updatedOptions:l}=Do("BatchDeleteRequest-addSubRequest",r);try{this.setBatchType("delete");await this.addSubRequestInternal({url:n,credential:a},(async()=>{await new BlobClient(n,this.batchRequest.createPipeline(a)).delete(l)}))}catch(e){o.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async setBlobAccessTier(e,t,r,n){let a;let o;let l;if(typeof e==="string"&&(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t))){a=e;o=t;l=r}else if(e instanceof BlobClient){a=e.url;o=e.credential;l=t;n=r}else{throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.")}if(!n){n={}}const{span:c,updatedOptions:p}=Do("BatchSetTierRequest-addSubRequest",n);try{this.setBatchType("setAccessTier");await this.addSubRequestInternal({url:a,credential:o},(async()=>{await new BlobClient(a,this.batchRequest.createPipeline(o)).setAccessTier(l,p)}))}catch(e){c.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{c.end()}}}class InnerBatchRequest{constructor(){this.operationCount=0;this.body="";const e=i.generateUuid();this.boundary=`batch_${e}`;this.subRequestPrefix=`--${this.boundary}${go}${lo.CONTENT_TYPE}: application/http${go}${lo.CONTENT_TRANSFER_ENCODING}: binary`;this.multipartContentType=`multipart/mixed; boundary=${this.boundary}`;this.batchRequestEnding=`--${this.boundary}--`;this.subRequests=new Map}createPipeline(e){const t=e instanceof AnonymousCredential;const r=3+(t?0:1);const n=new Array(r);n[0]=i.deserializationPolicy();n[1]=new BatchHeaderFilterPolicyFactory;if(!t){n[2]=i.isTokenCredential(e)?attachCredential(i.bearerTokenAuthenticationPolicy(e,so),e):e}n[r-1]=new BatchRequestAssemblePolicyFactory(this);return new Pipeline(n,{})}appendSubRequestToBody(e){this.body+=[this.subRequestPrefix,`${lo.CONTENT_ID}: ${this.operationCount}`,"",`${e.method.toString()} ${getURLPathAndQuery(e.url)} ${ho}${go}`].join(go);for(const t of e.headers.headersArray()){this.body+=`${t.name}: ${t.value}${go}`}this.body+=go}preAddSubRequest(e){if(this.operationCount>=uo){throw new RangeError(`Cannot exceed ${uo} sub requests in a single batch`)}const t=getURLPath(e.url);if(!t||t===""){throw new RangeError(`Invalid url for sub request: '${e.url}'`)}}postAddSubRequest(e){this.subRequests.set(this.operationCount,e);this.operationCount++}getHttpRequestBody(){return`${this.body}${this.batchRequestEnding}${go}`}getMultipartContentType(){return this.multipartContentType}getSubRequests(){return this.subRequests}}class BatchRequestAssemblePolicy extends i.BaseRequestPolicy{constructor(e,t,r){super(t,r);this.dummyResponse={request:new i.WebResource,status:200,headers:new i.HttpHeaders};this.batchRequest=e}async sendRequest(e){await this.batchRequest.appendSubRequestToBody(e);return this.dummyResponse}}class BatchRequestAssemblePolicyFactory{constructor(e){this.batchRequest=e}create(e,t){return new BatchRequestAssemblePolicy(this.batchRequest,e,t)}}class BatchHeaderFilterPolicy extends i.BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){let t="";for(const r of e.headers.headersArray()){if(iEqual(r.name,lo.X_MS_VERSION)){t=r.name}}if(t!==""){e.headers.remove(t)}return this._nextPolicy.sendRequest(e)}}class BatchHeaderFilterPolicyFactory{create(e,t){return new BatchHeaderFilterPolicy(e,t)}}class BlobBatchClient{constructor(e,t,r){let i;if(isPipelineLike(t)){i=t}else if(!t){i=newPipeline(new AnonymousCredential,r)}else{i=newPipeline(t,r)}const n=new StorageClientContext(e,i.toServiceClientOptions());const s=getURLPath(e);if(s&&s!=="/"){this.serviceOrContainerContext=new Container(n)}else{this.serviceOrContainerContext=new Service(n)}}createBatch(){return new BlobBatch}async deleteBlobs(e,t,r){const i=new BlobBatch;for(const n of e){if(typeof n==="string"){await i.deleteBlob(n,t,r)}else{await i.deleteBlob(n,t)}}return this.submitBatch(i)}async setBlobsAccessTier(e,t,r,i){const n=new BlobBatch;for(const s of e){if(typeof s==="string"){await n.setBlobAccessTier(s,t,r,i)}else{await n.setBlobAccessTier(s,t,r)}}return this.submitBatch(n)}async submitBatch(e,t={}){if(!e||e.getSubRequests().size===0){throw new RangeError("Batch request should contain one or more sub requests.")}const{span:r,updatedOptions:i}=Do("BlobBatchClient-submitBatch",t);try{const r=e.getHttpRequestBody();const n=await this.serviceOrContainerContext.submitBatch(utf8ByteLength(r),e.getMultiPartContentType(),r,Object.assign(Object.assign({},t),convertTracingToRequestOptionsBase(i)));const s=new BatchResponseParser(n,e.getSubRequests());const a=await s.parseBatchResponse();const o={_response:n._response,contentType:n.contentType,errorCode:n.errorCode,requestId:n.requestId,clientRequestId:n.clientRequestId,version:n.version,subResponses:a.subResponses,subResponsesSucceededCount:a.subResponsesSucceededCount,subResponsesFailedCount:a.subResponsesFailedCount};return o}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}}class ContainerClient extends StorageClient{constructor(e,t,r){let n;let s;r=r||{};if(isPipelineLike(t)){s=e;n=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){s=e;n=newPipeline(t,r)}else if(!t&&typeof t!=="string"){s=e;n=newPipeline(new AnonymousCredential,r)}else if(t&&typeof t==="string"){const a=t;const o=extractConnectionStringParts(e);if(o.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(o.accountName,o.accountKey);s=appendToURLPath(o.url,encodeURIComponent(a));if(!r.proxyOptions){r.proxyOptions=i.getDefaultProxySettings(o.proxyUri)}n=newPipeline(e,r)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(o.kind==="SASConnString"){s=appendToURLPath(o.url,encodeURIComponent(a))+"?"+o.accountSas;n=newPipeline(new AnonymousCredential,r)}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 parameter")}super(s,n);this._containerName=this.getContainerNameFromUrl();this.containerContext=new Container(this.storageClientContext)}get containerName(){return this._containerName}async create(e={}){const{span:t,updatedOptions:r}=Do("ContainerClient-create",e);try{return await this.containerContext.create(Object.assign(Object.assign({},e),convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async createIfNotExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("ContainerClient-createIfNotExists",e);try{const e=await this.create(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="ContainerAlreadyExists"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when creating a container only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async exists(e={}){const{span:t,updatedOptions:r}=Do("ContainerClient-exists",e);try{await this.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions});return true}catch(e){if(e.statusCode===404){t.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when checking container existence"});return false}t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}getBlobClient(e){return new BlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getAppendBlobClient(e){return new AppendBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getBlockBlobClient(e){return new BlockBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}getPageBlobClient(e){return new PageBlobClient(appendToURLPath(this.url,EscapePath(e)),this.pipeline)}async getProperties(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-getProperties",e);try{return await this.containerContext.getProperties(Object.assign(Object.assign({abortSignal:e.abortSignal},e.conditions),convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async delete(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-delete",e);try{return await this.containerContext.delete(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:e.conditions},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async deleteIfExists(e={}){var t,r;const{span:i,updatedOptions:n}=Do("ContainerClient-deleteIfExists",e);try{const e=await this.delete(n);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="ContainerNotFound"){i.setStatus({code:s.SpanStatusCode.ERROR,message:"Expected exception when deleting a container only if it exists."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async setMetadata(e,t={}){if(!t.conditions){t.conditions={}}if(t.conditions.ifUnmodifiedSince){throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service")}const{span:r,updatedOptions:i}=Do("ContainerClient-setMetadata",t);try{return await this.containerContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:t.conditions},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async getAccessPolicy(e={}){if(!e.conditions){e.conditions={}}const{span:t,updatedOptions:r}=Do("ContainerClient-getAccessPolicy",e);try{const t=await this.containerContext.getAccessPolicy(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions},convertTracingToRequestOptionsBase(r)));const i={_response:t._response,blobPublicAccess:t.blobPublicAccess,date:t.date,etag:t.etag,errorCode:t.errorCode,lastModified:t.lastModified,requestId:t.requestId,clientRequestId:t.clientRequestId,signedIdentifiers:[],version:t.version};for(const e of t){let t=undefined;if(e.accessPolicy){t={permissions:e.accessPolicy.permissions};if(e.accessPolicy.expiresOn){t.expiresOn=new Date(e.accessPolicy.expiresOn)}if(e.accessPolicy.startsOn){t.startsOn=new Date(e.accessPolicy.startsOn)}}i.signedIdentifiers.push({accessPolicy:t,id:e.id})}return i}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setAccessPolicy(e,t,r={}){r.conditions=r.conditions||{};const{span:i,updatedOptions:n}=Do("ContainerClient-setAccessPolicy",r);try{const i=[];for(const e of t||[]){i.push({accessPolicy:{expiresOn:e.accessPolicy.expiresOn?truncatedISO8061Date(e.accessPolicy.expiresOn):"",permissions:e.accessPolicy.permissions,startsOn:e.accessPolicy.startsOn?truncatedISO8061Date(e.accessPolicy.startsOn):""},id:e.id})}return await this.containerContext.setAccessPolicy(Object.assign({abortSignal:r.abortSignal,access:e,containerAcl:i,leaseAccessConditions:r.conditions,modifiedAccessConditions:r.conditions},convertTracingToRequestOptionsBase(n)))}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async uploadBlockBlob(e,t,r,i={}){const{span:n,updatedOptions:a}=Do("ContainerClient-uploadBlockBlob",i);try{const i=this.getBlockBlobClient(e);const n=await i.upload(t,r,a);return{blockBlobClient:i,response:n}}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async deleteBlob(e,t={}){const{span:r,updatedOptions:i}=Do("ContainerClient-deleteBlob",t);try{let r=this.getBlobClient(e);if(t.versionId){r=r.withVersion(t.versionId)}return await r.delete(i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async listBlobFlatSegment(e,t={}){const{span:r,updatedOptions:i}=Do("ContainerClient-listBlobFlatSegment",t);try{const r=await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({marker:e},t),convertTracingToRequestOptionsBase(i)));const n=Object.assign(Object.assign({},r),{_response:Object.assign(Object.assign({},r._response),{parsedBody:ConvertInternalResponseOfListBlobFlat(r._response.parsedBody)}),segment:Object.assign(Object.assign({},r.segment),{blobItems:r.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)});return t}))})});return n}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async listBlobHierarchySegment(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("ContainerClient-listBlobHierarchySegment",r);try{const n=await this.containerContext.listBlobHierarchySegment(e,Object.assign(Object.assign({marker:t},r),convertTracingToRequestOptionsBase(a)));const s=Object.assign(Object.assign({},n),{_response:Object.assign(Object.assign({},n._response),{parsedBody:ConvertInternalResponseOfListBlobHierarchy(n._response.parsedBody)}),segment:Object.assign(Object.assign({},n.segment),{blobItems:n.segment.blobItems.map((e=>{const t=Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)});return t})),blobPrefixes:(i=n.segment.blobPrefixes)===null||i===void 0?void 0:i.map((e=>{const t={name:BlobNameToString(e.name)};return t}))})});return s}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}listSegments(e,t={}){return n.__asyncGenerator(this,arguments,(function*listSegments_1(){let r;if(!!e||e===undefined){do{r=yield n.__await(this.listBlobFlatSegment(e,t));e=r.continuationToken;yield yield n.__await(yield n.__await(r))}while(e)}}))}listItems(e={}){return n.__asyncGenerator(this,arguments,(function*listItems_1(){var t,r;let i;try{for(var s=n.__asyncValues(this.listSegments(i,e)),a;a=yield n.__await(s.next()),!a.done;){const e=a.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.segment.blobItems)))}}catch(e){t={error:e}}finally{try{if(a&&!a.done&&(r=s.return))yield n.__await(r.call(s))}finally{if(t)throw t.error}}}))}listBlobsFlat(e={}){const t=[];if(e.includeCopy){t.push("copy")}if(e.includeDeleted){t.push("deleted")}if(e.includeMetadata){t.push("metadata")}if(e.includeSnapshots){t.push("snapshots")}if(e.includeVersions){t.push("versions")}if(e.includeUncommitedBlobs){t.push("uncommittedblobs")}if(e.includeTags){t.push("tags")}if(e.includeDeletedWithVersions){t.push("deletedwithversions")}if(e.includeImmutabilityPolicy){t.push("immutabilitypolicy")}if(e.includeLegalHold){t.push("legalhold")}if(e.prefix===""){e.prefix=undefined}const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{});const i=this.listItems(r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}listHierarchySegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*listHierarchySegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.listBlobHierarchySegment(e,t,r));t=i.continuationToken;yield yield n.__await(yield n.__await(i))}while(t)}}))}listItemsByHierarchy(e,t={}){return n.__asyncGenerator(this,arguments,(function*listItemsByHierarchy_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.listHierarchySegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;const t=e.segment;if(t.blobPrefixes){for(const e of t.blobPrefixes){yield yield n.__await(Object.assign({kind:"prefix"},e))}}for(const e of t.blobItems){yield yield n.__await(Object.assign({kind:"blob"},e))}}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}listBlobsByHierarchy(e,t={}){if(e===""){throw new RangeError("delimiter should contain one or more characters")}const r=[];if(t.includeCopy){r.push("copy")}if(t.includeDeleted){r.push("deleted")}if(t.includeMetadata){r.push("metadata")}if(t.includeSnapshots){r.push("snapshots")}if(t.includeVersions){r.push("versions")}if(t.includeUncommitedBlobs){r.push("uncommittedblobs")}if(t.includeTags){r.push("tags")}if(t.includeDeletedWithVersions){r.push("deletedwithversions")}if(t.includeImmutabilityPolicy){r.push("immutabilitypolicy")}if(t.includeLegalHold){r.push("legalhold")}if(t.prefix===""){t.prefix=undefined}const i=Object.assign(Object.assign({},t),r.length>0?{include:r}:{});const n=this.listItemsByHierarchy(e,i);return{async next(){return n.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.listHierarchySegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},i))}}async findBlobsByTagsSegment(e,t,r={}){const{span:i,updatedOptions:n}=Do("ContainerClient-findBlobsByTagsSegment",r);try{const i=await this.containerContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize},convertTracingToRequestOptionsBase(n)));const s=Object.assign(Object.assign({},i),{_response:i._response,blobs:i.blobs.map((e=>{var t;let r="";if(((t=e.tags)===null||t===void 0?void 0:t.blobTagSet.length)===1){r=e.tags.blobTagSet[0].value}return Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))});return s}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}findBlobsByTagsSegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsSegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.findBlobsByTagsSegment(e,t,r));i.blobs=i.blobs||[];t=i.continuationToken;yield yield n.__await(i)}while(t)}}))}findBlobsByTagsItems(e,t={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsItems_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.findBlobsByTagsSegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.blobs)))}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t);const i=this.findBlobsByTagsItems(e,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}getContainerNameFromUrl(){let e;try{const t=i.URLBuilder.parse(this.url);if(t.getHost().split(".")[1]==="blob"){e=t.getPath().split("/")[1]}else if(isIpEndpointStyle(t)){e=t.getPath().split("/")[2]}else{e=t.getPath().split("/")[1]}e=decodeURIComponent(e);if(!e){throw new Error("Provided containerName is invalid.")}return e}catch(e){throw new Error("Unable to extract containerName with provided information.")}}generateSasUrl(e){return new Promise((t=>{if(!(this.credential instanceof StorageSharedKeyCredential)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}const r=generateBlobSASQueryParameters(Object.assign({containerName:this._containerName},e),this.credential).toString();t(appendToURLQuery(this.url,r))}))}getBlobBatchClient(){return new BlobBatchClient(this.url,this.pipeline)}}class AccountSASPermissions{constructor(){this.read=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.add=false;this.create=false;this.update=false;this.process=false;this.tag=false;this.filter=false;this.setImmutabilityPolicy=false;this.permanentDelete=false}static parse(e){const t=new AccountSASPermissions;for(const r of e){switch(r){case"r":t.read=true;break;case"w":t.write=true;break;case"d":t.delete=true;break;case"x":t.deleteVersion=true;break;case"l":t.list=true;break;case"a":t.add=true;break;case"c":t.create=true;break;case"u":t.update=true;break;case"p":t.process=true;break;case"t":t.tag=true;break;case"f":t.filter=true;break;case"i":t.setImmutabilityPolicy=true;break;case"y":t.permanentDelete=true;break;default:throw new RangeError(`Invalid permission character: ${r}`)}}return t}static from(e){const t=new AccountSASPermissions;if(e.read){t.read=true}if(e.write){t.write=true}if(e.delete){t.delete=true}if(e.deleteVersion){t.deleteVersion=true}if(e.filter){t.filter=true}if(e.tag){t.tag=true}if(e.list){t.list=true}if(e.add){t.add=true}if(e.create){t.create=true}if(e.update){t.update=true}if(e.process){t.process=true}if(e.setImmutabilityPolicy){t.setImmutabilityPolicy=true}if(e.permanentDelete){t.permanentDelete=true}return t}toString(){const e=[];if(this.read){e.push("r")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.filter){e.push("f")}if(this.tag){e.push("t")}if(this.list){e.push("l")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.update){e.push("u")}if(this.process){e.push("p")}if(this.setImmutabilityPolicy){e.push("i")}if(this.permanentDelete){e.push("y")}return e.join("")}}class AccountSASResourceTypes{constructor(){this.service=false;this.container=false;this.object=false}static parse(e){const t=new AccountSASResourceTypes;for(const r of e){switch(r){case"s":t.service=true;break;case"c":t.container=true;break;case"o":t.object=true;break;default:throw new RangeError(`Invalid resource type: ${r}`)}}return t}toString(){const e=[];if(this.service){e.push("s")}if(this.container){e.push("c")}if(this.object){e.push("o")}return e.join("")}}class AccountSASServices{constructor(){this.blob=false;this.file=false;this.queue=false;this.table=false}static parse(e){const t=new AccountSASServices;for(const r of e){switch(r){case"b":t.blob=true;break;case"f":t.file=true;break;case"q":t.queue=true;break;case"t":t.table=true;break;default:throw new RangeError(`Invalid service character: ${r}`)}}return t}toString(){const e=[];if(this.blob){e.push("b")}if(this.table){e.push("t")}if(this.queue){e.push("q")}if(this.file){e.push("f")}return e.join("")}}function generateAccountSASQueryParameters(e,t){const r=e.version?e.version:$a;if(e.permissions&&e.permissions.setImmutabilityPolicy&&r<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&r<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.")}if(e.permissions&&e.permissions.permanentDelete&&r<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.")}if(e.permissions&&e.permissions.tag&&r<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission.")}if(e.permissions&&e.permissions.filter&&r<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.")}if(e.encryptionScope&&r<"2020-12-06"){throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.")}const i=AccountSASPermissions.parse(e.permissions.toString());const n=AccountSASServices.parse(e.services).toString();const s=AccountSASResourceTypes.parse(e.resourceTypes).toString();let a;if(r>="2020-12-06"){a=[t.accountName,i,n,s,e.startsOn?truncatedISO8061Date(e.startsOn,false):"",truncatedISO8061Date(e.expiresOn,false),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,e.encryptionScope?e.encryptionScope:"",""].join("\n")}else{a=[t.accountName,i,n,s,e.startsOn?truncatedISO8061Date(e.startsOn,false):"",truncatedISO8061Date(e.expiresOn,false),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,""].join("\n")}const o=t.computeHMACSHA256(a);return new SASQueryParameters(r,o,i.toString(),n,s,e.protocol,e.startsOn,e.expiresOn,e.ipRange,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,e.encryptionScope)}class BlobServiceClient extends StorageClient{constructor(e,t,r){let n;if(isPipelineLike(t)){n=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){n=newPipeline(t,r)}else{n=newPipeline(new AnonymousCredential,r)}super(e,n);this.serviceContext=new Service(this.storageClientContext)}static fromConnectionString(e,t){t=t||{};const r=extractConnectionStringParts(e);if(r.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(r.accountName,r.accountKey);if(!t.proxyOptions){t.proxyOptions=i.getDefaultProxySettings(r.proxyUri)}const n=newPipeline(e,t);return new BlobServiceClient(r.url,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(r.kind==="SASConnString"){const e=newPipeline(new AnonymousCredential,t);return new BlobServiceClient(r.url+"?"+r.accountSas,e)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}getContainerClient(e){return new ContainerClient(appendToURLPath(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-createContainer",t);try{const t=this.getContainerClient(e);const r=await t.create(i);return{containerClient:t,containerCreateResponse:r}}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async deleteContainer(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-deleteContainer",t);try{const t=this.getContainerClient(e);return await t.delete(i)}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async undeleteContainer(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-undeleteContainer",r);try{const i=this.getContainerClient(r.destinationContainerName||e);const s=new Container(i["storageClientContext"]);const a=await s.restore(Object.assign({deletedContainerName:e,deletedContainerVersion:t},n));return{containerClient:i,containerUndeleteResponse:a}}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async renameContainer(e,t,r={}){var i;const{span:n,updatedOptions:a}=Do("BlobServiceClient-renameContainer",r);try{const n=this.getContainerClient(t);const s=new Container(n["storageClientContext"]);const o=await s.rename(e,Object.assign(Object.assign({},a),{sourceLeaseId:(i=r.sourceCondition)===null||i===void 0?void 0:i.leaseId}));return{containerClient:n,containerRenameResponse:o}}catch(e){n.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async getProperties(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setProperties(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-setProperties",t);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:t.abortSignal},convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async getStatistics(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async getAccountInfo(e={}){const{span:t,updatedOptions:r}=Do("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async listContainersSegment(e,t={}){const{span:r,updatedOptions:i}=Do("BlobServiceClient-listContainersSegment",t);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:t.abortSignal,marker:e},t),{include:typeof t.include==="string"?[t.include]:t.include}),convertTracingToRequestOptionsBase(i)))}catch(e){r.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async findBlobsByTagsSegment(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-findBlobsByTagsSegment",r);try{const i=await this.serviceContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize},convertTracingToRequestOptionsBase(n)));const s=Object.assign(Object.assign({},i),{_response:i._response,blobs:i.blobs.map((e=>{var t;let r="";if(((t=e.tags)===null||t===void 0?void 0:t.blobTagSet.length)===1){r=e.tags.blobTagSet[0].value}return Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))});return s}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}findBlobsByTagsSegments(e,t,r={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsSegments_1(){let i;if(!!t||t===undefined){do{i=yield n.__await(this.findBlobsByTagsSegment(e,t,r));i.blobs=i.blobs||[];t=i.continuationToken;yield yield n.__await(i)}while(t)}}))}findBlobsByTagsItems(e,t={}){return n.__asyncGenerator(this,arguments,(function*findBlobsByTagsItems_1(){var r,i;let s;try{for(var a=n.__asyncValues(this.findBlobsByTagsSegments(e,s,t)),o;o=yield n.__await(a.next()),!o.done;){const e=o.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.blobs)))}}catch(e){r={error:e}}finally{try{if(o&&!o.done&&(i=a.return))yield n.__await(i.call(a))}finally{if(r)throw r.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t);const i=this.findBlobsByTagsItems(e,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}listSegments(e,t={}){return n.__asyncGenerator(this,arguments,(function*listSegments_1(){let r;if(!!e||e===undefined){do{r=yield n.__await(this.listContainersSegment(e,t));r.containerItems=r.containerItems||[];e=r.continuationToken;yield yield n.__await(yield n.__await(r))}while(e)}}))}listItems(e={}){return n.__asyncGenerator(this,arguments,(function*listItems_1(){var t,r;let i;try{for(var s=n.__asyncValues(this.listSegments(i,e)),a;a=yield n.__await(s.next()),!a.done;){const e=a.value;yield n.__await(yield*n.__asyncDelegator(n.__asyncValues(e.containerItems)))}}catch(e){t={error:e}}finally{try{if(a&&!a.done&&(r=s.return))yield n.__await(r.call(s))}finally{if(t)throw t.error}}}))}listContainers(e={}){if(e.prefix===""){e.prefix=undefined}const t=[];if(e.includeDeleted){t.push("deleted")}if(e.includeMetadata){t.push("metadata")}if(e.includeSystem){t.push("system")}const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{});const i=this.listItems(r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}async getUserDelegationKey(e,t,r={}){const{span:i,updatedOptions:n}=Do("BlobServiceClient-getUserDelegationKey",r);try{const i=await this.serviceContext.getUserDelegationKey({startsOn:truncatedISO8061Date(e,false),expiresOn:truncatedISO8061Date(t,false)},Object.assign({abortSignal:r.abortSignal},convertTracingToRequestOptionsBase(n)));const s={signedObjectId:i.signedObjectId,signedTenantId:i.signedTenantId,signedStartsOn:new Date(i.signedStartsOn),signedExpiresOn:new Date(i.signedExpiresOn),signedService:i.signedService,signedVersion:i.signedVersion,value:i.value};const a=Object.assign({_response:i._response,requestId:i.requestId,clientRequestId:i.clientRequestId,version:i.version,date:i.date,errorCode:i.errorCode},s);return a}catch(e){i.setStatus({code:s.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}getBlobBatchClient(){return new BlobBatchClient(this.url,this.pipeline)}generateAccountSasUrl(e,t=AccountSASPermissions.parse("r"),r="sco",i={}){if(!(this.credential instanceof StorageSharedKeyCredential)){throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential")}if(e===undefined){const t=new Date;e=new Date(t.getTime()+3600*1e3)}const n=generateAccountSASQueryParameters(Object.assign({permissions:t,expiresOn:e,resourceTypes:r,services:AccountSASServices.parse("b").toString()},i),this.credential).toString();return appendToURLQuery(this.url,n)}}t.KnownEncryptionAlgorithmType=void 0;(function(e){e["AES256"]="AES256"})(t.KnownEncryptionAlgorithmType||(t.KnownEncryptionAlgorithmType={}));Object.defineProperty(t,"BaseRequestPolicy",{enumerable:true,get:function(){return i.BaseRequestPolicy}});Object.defineProperty(t,"HttpHeaders",{enumerable:true,get:function(){return i.HttpHeaders}});Object.defineProperty(t,"RequestPolicyOptions",{enumerable:true,get:function(){return i.RequestPolicyOptions}});Object.defineProperty(t,"RestError",{enumerable:true,get:function(){return i.RestError}});Object.defineProperty(t,"WebResource",{enumerable:true,get:function(){return i.WebResource}});Object.defineProperty(t,"deserializationPolicy",{enumerable:true,get:function(){return i.deserializationPolicy}});t.AccountSASPermissions=AccountSASPermissions;t.AccountSASResourceTypes=AccountSASResourceTypes;t.AccountSASServices=AccountSASServices;t.AnonymousCredential=AnonymousCredential;t.AnonymousCredentialPolicy=AnonymousCredentialPolicy;t.AppendBlobClient=AppendBlobClient;t.BlobBatch=BlobBatch;t.BlobBatchClient=BlobBatchClient;t.BlobClient=BlobClient;t.BlobLeaseClient=BlobLeaseClient;t.BlobSASPermissions=BlobSASPermissions;t.BlobServiceClient=BlobServiceClient;t.BlockBlobClient=BlockBlobClient;t.ContainerClient=ContainerClient;t.ContainerSASPermissions=ContainerSASPermissions;t.Credential=Credential;t.CredentialPolicy=CredentialPolicy;t.PageBlobClient=PageBlobClient;t.Pipeline=Pipeline;t.SASQueryParameters=SASQueryParameters;t.StorageBrowserPolicy=StorageBrowserPolicy;t.StorageBrowserPolicyFactory=StorageBrowserPolicyFactory;t.StorageOAuthScopes=so;t.StorageRetryPolicy=StorageRetryPolicy;t.StorageRetryPolicyFactory=StorageRetryPolicyFactory;t.StorageSharedKeyCredential=StorageSharedKeyCredential;t.StorageSharedKeyCredentialPolicy=StorageSharedKeyCredentialPolicy;t.generateAccountSASQueryParameters=generateAccountSASQueryParameters;t.generateBlobSASQueryParameters=generateBlobSASQueryParameters;t.isPipelineLike=isPipelineLike;t.logger=Wa;t.newPipeline=newPipeline},6361:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.BuildKit=void 0;const a=s(r(2186));const o=s(r(3220));const l=r(9994);const c=r(7991);const p=r(1019);const d=r(1949);class BuildKit{buildx;config;constructor(e){this.config=new p.Config;this.buildx=e?.buildx||new l.Buildx}async getVersion(e){if(!e.buildkit&&e.name){try{return await this.getVersionWithinImage(e.name)}catch(e){a.warning(e)}}return e.buildkit}async getVersionWithinImage(e){a.debug(`BuildKit.getVersionWithinImage nodeName: ${e}`);return d.Exec.getExecOutput(`docker`,["inspect","--format","{{.Config.Image}}",`${l.Buildx.containerNamePrefix}${e}`],{ignoreReturnCode:true,silent:true}).then((e=>{if(e.exitCode==0&&e.stdout.length>0){a.debug(`BuildKit.getVersionWithinImage image: ${e.stdout.trim()}`);return d.Exec.getExecOutput(`docker`,["run","--rm",e.stdout.trim(),"--version"],{ignoreReturnCode:true,silent:true}).then((t=>{if(t.exitCode==0&&t.stdout.length>0){return`${e.stdout.trim()} => ${t.stdout.trim()}`}else if(t.stderr.length>0){throw new Error(e.stderr.trim())}return t.stdout.trim()}))}else if(e.stderr.length>0){throw new Error(e.stderr.trim())}return e.stdout.trim()}))}async versionSatisfies(e,t,r){if(!r){r=await new c.Builder({buildx:this.buildx}).inspect(e)}for(const e of r.nodes){let i=e.buildkit;a.debug(`BuildKit.versionSatisfies ${i}: ${t}`);if(!i){try{i=await this.getVersionWithinImage(e.name||"")}catch(t){a.debug(`BuildKit.versionSatisfies ${e.name}: can't get version`);return false}}a.debug(`BuildKit.versionSatisfies ${e.name}: version ${i}`);if(r.driver=="docker"&&!i.endsWith("-moby")){return false}if(!o.satisfies(i.replace(/-moby$/,""),t)){return false}}return true}}t.BuildKit=BuildKit},1019:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Config=void 0;const n=i(r(7147));const s=r(4051);class Config{resolveFromString(e){return this.resolve(e,false)}resolveFromFile(e){return this.resolve(e,true)}resolve(e,t){if(t){if(!n.default.existsSync(e)){throw new Error(`config file ${e} not found`)}e=n.default.readFileSync(e,{encoding:"utf-8"})}const r=s.Context.tmpName({tmpdir:s.Context.tmpDir()});n.default.writeFileSync(r,e);return r}}t.Config=Config},2008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Bake=void 0;const i=r(9994);const n=r(1949);const s=r(5284);const a=r(8662);class Bake{buildx;constructor(e){this.buildx=e?.buildx||new i.Buildx}async parseDefinitions(e,t,r,i,s,o){const l=["bake"];let c;const p=[];if(e){for(const t of e.map((e=>e.trim()))){if(t.length==0){continue}if(!a.Util.isValidRef(t)){p.push(t);continue}if(c){throw new Error(`Only one remote bake definition is allowed`)}c=t}}if(c){l.push(c)}for(const e of p){l.push("--file",e)}if(r){for(const e of r){l.push("--set",e)}}if(i){l.push("--load")}if(s){l.push("--push")}const d=await this.buildx.getCommand([...l,"--print",...t||[]]);return await n.Exec.getExecOutput(d.command,d.args,{cwd:o,ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(`cannot parse bake definitions: ${e.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`)}return JSON.parse(e.stdout.trim())}))}static hasLocalExporter(e){return s.Inputs.hasExporterType("local",Bake.exporters(e))}static hasTarExporter(e){return s.Inputs.hasExporterType("tar",Bake.exporters(e))}static hasDockerExporter(e,t){return t||s.Inputs.hasExporterType("docker",Bake.exporters(e))}static exporters(e){const t=new Array;for(const r in e.target){const i=e.target[r];if(i.output){t.push(...i.output)}}return t}}t.Bake=Bake},7991:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Builder=void 0;const a=s(r(2186));const o=r(9994);const l=r(1949);class Builder{buildx;constructor(e){this.buildx=e?.buildx||new o.Buildx}async exists(e){const t=await this.buildx.getCommand(["inspect",e]);const r=await l.Exec.getExecOutput(t.command,t.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){a.debug(`Builder.exists cmd err: ${e.stderr.trim()}`);return false}return e.exitCode==0})).catch((e=>{a.debug(`Builder.exists error: ${e}`);return false}));a.debug(`Builder.exists: ${r}`);return r}async inspect(e){const t=Object.assign({},process.env,{DEBUG:"1"});const r=await this.buildx.getCommand(["inspect",e]);return await l.Exec.getExecOutput(r.command,r.args,{ignoreReturnCode:true,silent:true,env:t}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr.trim())}return Builder.parseInspect(e.stdout)}))}static parseInspect(e){const t={nodes:[]};let r;let i={};let n;for(const s of e.trim().split(`\n`)){const[e,...a]=s.split(":");const o=e.toLowerCase();const l=a.map((e=>e.trim())).join(":");if(e.length==0){continue}switch(true){case o=="name":r=undefined;if(t.name==undefined){t.name=l}else{if(n&&i.gcPolicy){i.gcPolicy.push(n);n=undefined}if(i.name){t.nodes.push(i)}i={name:l}}break;case o=="driver":r=undefined;t.driver=l;break;case o=="last activity":r=undefined;t.lastActivity=new Date(l);break;case o=="endpoint":r=undefined;i.endpoint=l;break;case o=="driver options":r=undefined;i["driver-opts"]=(l.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map((e=>e.replace(/^(.*)="(.*)"$/g,"$1=$2")));break;case o=="status":r=undefined;i.status=l;break;case o=="buildkit daemon flags":case o=="flags":r=undefined;i["buildkitd-flags"]=l;break;case o=="buildkit version":case o=="buildkit":r=undefined;i.buildkit=l;break;case o=="platforms":{r=undefined;if(!l){break}let e=[];if(l.includes("*")){for(const t of l.split(", ")){if(t.includes("*")){e.push(t.replace(/\*/g,""))}}}else{e=l.split(", ")}i.platforms=e.join(",");break}case o=="features":r="features";i.features={};break;case o=="labels":r="label";i.labels={};break;case o.startsWith("gc policy rule#"):r="gcpolicy";if(i.gcPolicy&&n){i.gcPolicy.push(n);n=undefined}break;default:{switch(r||""){case"features":{i.features=i.features||{};i.features[e.trim()]=Boolean(l);break}case"label":{i.labels=i.labels||{};i.labels[e.trim()]=l;break}case"gcpolicy":{i.gcPolicy=i.gcPolicy||[];n=n||{};switch(o.trim()){case"all":{n.all=l=="true";break}case"filters":{if(l){n.filter=l.split(",")}break}case"keep duration":{n.keepDuration=l;break}case"keep bytes":{n.keepBytes=l;break}}break}}}}}if(n&&i.gcPolicy){i.gcPolicy.push(n)}if(i.name){t.nodes.push(i)}return t}}t.Builder=Builder},9994:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Buildx=void 0;const o=a(r(7147));const l=a(r(1017));const c=s(r(2186));const p=s(r(3220));const d=r(976);const A=r(1949);class Buildx{_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone;this._version="";this._versionOnce=false}static get configDir(){return process.env.BUILDX_CONFIG||l.default.join(d.Docker.configDir,"buildx")}static get certsDir(){return l.default.join(Buildx.configDir,"certs")}async isStandalone(){const e=this._standalone??!await d.Docker.isAvailable();c.debug(`Buildx.isStandalone: ${e}`);return e}async getCommand(e){const t=await this.isStandalone();return{command:t?"buildx":"docker",args:t?e:["buildx",...e]}}async isAvailable(){const e=await this.getCommand([]);const t=await A.Exec.getExecOutput(e.command,e.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){c.debug(`Buildx.isAvailable cmd err: ${e.stderr.trim()}`);return false}return e.exitCode==0})).catch((e=>{c.debug(`Buildx.isAvailable error: ${e}`);return false}));c.debug(`Buildx.isAvailable: ${t}`);return t}async printInspect(e){const t=await this.getCommand(["inspect",e]);await A.Exec.exec(t.command,t.args,{failOnStdErr:false})}async version(){if(this._versionOnce){return this._version}this._versionOnce=true;const e=await this.getCommand(["version"]);this._version=await A.Exec.getExecOutput(e.command,e.args,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr.trim())}return Buildx.parseVersion(e.stdout.trim())}));return this._version}async printVersion(){const e=await this.getCommand(["version"]);await A.Exec.exec(e.command,e.args,{failOnStdErr:false})}static parseVersion(e){const t=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!t){throw new Error(`Cannot parse buildx version`)}return t[1]}async versionSatisfies(e,t){const r=t??await this.version();if(!r){c.debug(`Buildx.versionSatisfies false: undefined version`);return false}const i=p.satisfies(r,e)||/^[0-9a-f]{7}$/.exec(r)!==null;c.debug(`Buildx.versionSatisfies ${r} statisfies ${e}: ${i}`);return i}static resolveCertsDriverOpts(e,t,r){let i;try{i=new URL(t)}catch(e){return[]}if(i.protocol!="tcp:"){return[]}const n=[];if(Object.keys(r).length==0){return n}let s=i.hostname;if(i.port.length>0){s+=`-${i.port}`}if(r.cacert!==undefined){const e=l.default.join(Buildx.certsDir,`cacert_${s}.pem`);o.default.writeFileSync(e,r.cacert);n.push(`cacert=${e}`)}if(r.cert!==undefined){const e=l.default.join(Buildx.certsDir,`cert_${s}.pem`);o.default.writeFileSync(e,r.cert);n.push(`cert=${e}`)}if(r.key!==undefined){const e=l.default.join(Buildx.certsDir,`key_${s}.pem`);o.default.writeFileSync(e,r.key);n.push(`key=${e}`)}if(e!="remote"){return[]}return n}}t.Buildx=Buildx},5284:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Inputs=void 0;const o=a(r(7147));const l=a(r(1017));const c=s(r(2186));const p=r(4393);const d=r(4051);const A=r(6276);const parseKvp=e=>{const t=e.indexOf("=");const r=e.substring(0,t);const i=e.substring(t+1);if(r.length==0||i.length==0){throw new Error(`${e} is not a valid secret`)}return[r,i]};class Inputs{static getBuildImageIDFilePath(){return l.default.join(d.Context.tmpDir(),"iidfile")}static getBuildMetadataFilePath(){return l.default.join(d.Context.tmpDir(),"metadata-file")}static resolveBuildImageID(){const e=Inputs.getBuildImageIDFilePath();if(!o.default.existsSync(e)){return undefined}return o.default.readFileSync(e,{encoding:"utf-8"}).trim()}static resolveBuildMetadata(){const e=Inputs.getBuildMetadataFilePath();if(!o.default.existsSync(e)){return undefined}const t=o.default.readFileSync(e,{encoding:"utf-8"}).trim();if(t==="null"){return undefined}return t}static resolveDigest(){const e=Inputs.resolveBuildMetadata();if(e===undefined){return undefined}const t=JSON.parse(e);if(t["containerimage.digest"]){return t["containerimage.digest"]}return undefined}static resolveBuildSecretString(e){return Inputs.resolveBuildSecret(e,false)}static resolveBuildSecretFile(e){return Inputs.resolveBuildSecret(e,true)}static resolveBuildSecretEnv(e){const[t,r]=parseKvp(e);return`id=${t},env=${r}`}static resolveBuildSecret(e,t){const[r,i]=parseKvp(e);let n=i;if(t){if(!o.default.existsSync(n)){throw new Error(`secret file ${n} not found`)}n=o.default.readFileSync(n,{encoding:"utf-8"})}const s=d.Context.tmpName({tmpdir:d.Context.tmpDir()});o.default.writeFileSync(s,n);return`id=${r},src=${s}`}static getProvenanceInput(e){const t=c.getInput(e);if(!t){return t}try{return c.getBooleanInput(e)?`builder-id=${A.GitHub.workflowRunURL}`:"false"}catch(e){return Inputs.resolveProvenanceAttrs(t)}}static resolveProvenanceAttrs(e){if(!e){return`builder-id=${A.GitHub.workflowRunURL}`}const t=(0,p.parse)(e,{relaxColumnCount:true,skipEmptyLines:true})[0];for(const r of t){const t=r.toString().split(/(?<=^[^=]+?)=/).map((e=>e.trim()));if(t[0]=="builder-id"){return e}}return`${e},builder-id=${A.GitHub.workflowRunURL}`}static hasLocalExporter(e){return Inputs.hasExporterType("local",e)}static hasTarExporter(e){return Inputs.hasExporterType("tar",e)}static hasDockerExporter(e,t){return t||Inputs.hasExporterType("docker",e)}static hasExporterType(e,t){const r=(0,p.parse)(t.join(`\n`),{delimiter:",",trim:true,columns:false,relaxColumnCount:true});for(const t of r){if(t.length==1&&!t[0].startsWith("type=")){return e=="local"}for(const[r,i]of t.map((e=>e.split("=").map((e=>e.trim()))))){if(r=="type"&&i==e){return true}}}return false}static hasGitAuthTokenSecret(e){for(const t of e){if(t.startsWith("GIT_AUTH_TOKEN=")){return true}}return false}}t.Inputs=Inputs},2262:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Install=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(6255));const A=s(r(7784));const u=s(r(3220));const m=s(r(3837));const g=r(9994);const h=r(1455);const E=r(4051);const y=r(1949);const C=r(976);const b=r(6074);const I=r(8662);class Install{_standalone;constructor(e){this._standalone=e?.standalone}async download(e,t){const r=await Install.getDownloadVersion(e);p.debug(`Install.download version: ${r.version}`);const i=await Install.getRelease(r);p.debug(`Install.download release tag name: ${i.tag_name}`);const n=await this.vspec(i.tag_name);p.debug(`Install.download vspec: ${n}`);const s=u.clean(n)||"";if(!u.valid(s)){throw new Error(`Invalid Buildx version "${n}".`)}const a=new h.Cache({htcName:r.key!="official"?`buildx-dl-bin-${r.key}`:"buildx-dl-bin",htcVersion:n,baseCacheDir:c.default.join(g.Buildx.configDir,".bin"),cacheFile:l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx",ghaNoCache:t});const o=await a.find();if(o){p.info(`Buildx binary found in ${o}`);return o}const d=m.format(r.downloadURL,n,this.filename(n));p.info(`Downloading ${d}`);const E=await A.downloadTool(d);p.debug(`Install.download htcDownloadPath: ${E}`);const y=await a.save(E);p.info(`Cached to ${y}`);return y}async build(e,t){const r=await this.vspec(e);p.debug(`Install.build vspec: ${r}`);const i=new h.Cache({htcName:"buildx-build-bin",htcVersion:r,baseCacheDir:c.default.join(g.Buildx.configDir,".bin"),cacheFile:l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx",ghaNoCache:t});const n=await i.find();if(n){p.info(`Buildx binary found in ${n}`);return n}const s=c.default.join(E.Context.tmpDir(),"buildx-build-cache");const a=await this.buildCommand(e,s);const o=await y.Exec.getExecOutput(a.command,a.args,{ignoreReturnCode:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(`build failed with: ${e.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`)}return`${s}/buildx`}));const d=await i.save(o);p.info(`Cached to ${d}`);return d}async installStandalone(e,t){p.info("Standalone mode");t=t||E.Context.tmpDir();const r=c.default.join(t,"buildx-bin-standalone");if(!o.default.existsSync(r)){o.default.mkdirSync(r,{recursive:true})}const i=l.default.platform()=="win32"?"buildx.exe":"buildx";const n=c.default.join(r,i);o.default.copyFileSync(e,n);p.info("Fixing perms");o.default.chmodSync(n,"0755");p.addPath(r);p.info("Added Buildx to PATH");p.info(`Binary path: ${n}`);return n}async installPlugin(e,t){p.info("Docker plugin mode");t=t||C.Docker.configDir;const r=c.default.join(t,"cli-plugins");if(!o.default.existsSync(r)){o.default.mkdirSync(r,{recursive:true})}const i=l.default.platform()=="win32"?"docker-buildx.exe":"docker-buildx";const n=c.default.join(r,i);o.default.copyFileSync(e,n);p.info("Fixing perms");o.default.chmodSync(n,"0755");p.info(`Plugin path: ${n}`);return n}async buildCommand(e,t){const r=await new g.Buildx({standalone:true}).isAvailable();const i=await new g.Buildx({standalone:false}).isAvailable();let n=false;if(await this.isStandalone()&&r){p.debug(`Install.buildCommand: Buildx standalone found, build with it`);n=true}else if(!await this.isStandalone()&&i){p.debug(`Install.buildCommand: Buildx plugin found, build with it`);n=false}else if(r){p.debug(`Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it`);n=true}else if(i){p.debug(`Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it`);n=false}else{throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`)}const s=["build","--target","binaries","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${t}`];if(process.env.GIT_AUTH_TOKEN){s.push("--secret","id=GIT_AUTH_TOKEN")}s.push(e);return await new g.Buildx({standalone:n}).getCommand(s)}async isStandalone(){const e=this._standalone??!await C.Docker.isAvailable();p.debug(`Install.isStandalone: ${e}`);return e}filename(e){let t;switch(l.default.arch()){case"x64":{t="amd64";break}case"ppc64":{t="ppc64le";break}case"arm":{const e=process.config.variables.arm_version;t=e?"arm-v"+e:"arm";break}default:{t=l.default.arch();break}}const r=l.default.platform()=="win32"?"windows":l.default.platform();const i=l.default.platform()=="win32"?".exe":"";return m.format("buildx-v%s.%s-%s%s",e,r,t,i)}async vspec(e){if(!I.Util.isValidRef(e)){const t=e.replace(/^v+|v+$/g,"");p.info(`Use ${t} version spec cache key for ${e}`);return t}let[t,r]=e.split("#");if(r.length==0){r="master"}let i;if(r.match(/^[0-9a-fA-F]{40}$/)){i=r}else{i=await b.Git.remoteSha(t,r,process.env.GIT_AUTH_TOKEN)}const[n,s]=t.substring("https://github.com/".length).split("/");const a=`${n}/${I.Util.trimSuffix(s,".git")}/${i}`;const o=I.Util.hash(a);p.info(`Use ${o} version spec cache key for ${a}`);return o}static async getDownloadVersion(e){let[t,r]=e.split(":");if(!r){r=t;t="official"}switch(t){case"official":{return{key:t,version:r,downloadURL:"https://github.com/docker/buildx/releases/download/v%s/%s",releasesURL:"https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json"}}case"lab":{return{key:t,version:r,downloadURL:"https://github.com/docker/buildx-desktop/releases/download/v%s/%s",releasesURL:"https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json"}}default:{throw new Error(`Cannot find buildx version for ${e}`)}}}static async getRelease(e){const t=new d.HttpClient("docker-actions-toolkit");const r=await t.get(e.releasesURL);const i=await r.readBody();const n=r.message.statusCode||500;if(n>=400){throw new Error(`Failed to get Buildx releases from ${e.releasesURL} with status code ${n}: ${i}`)}const s=JSON.parse(i);if(!s[e.version]){throw new Error(`Cannot find Buildx release ${e.version} in ${e.releasesURL}`)}return s[e.version]}}t.Install=Install},1455:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Cache=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(7784));const A=s(r(7799));const u=s(r(3837));class Cache{opts;ghaCacheKey;ghaNoCache;cacheDir;cachePath;constructor(e){this.opts=e;this.ghaCacheKey=u.format("%s-%s-%s",this.opts.htcName,this.opts.htcVersion,this.platform());this.ghaNoCache=this.opts.ghaNoCache;this.cacheDir=c.default.join(this.opts.baseCacheDir,this.opts.htcVersion,this.platform());this.cachePath=c.default.join(this.cacheDir,this.opts.cacheFile);if(!o.default.existsSync(this.cacheDir)){o.default.mkdirSync(this.cacheDir,{recursive:true})}}async save(e){p.debug(`Cache.save ${e}`);const t=this.copyToCache(e);const r=await d.cacheDir(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());p.debug(`Cache.save cached to hosted tool cache ${r}`);if(!this.ghaNoCache&&A.isFeatureAvailable()){p.debug(`Cache.save caching ${this.ghaCacheKey} to GitHub Actions cache`);await A.saveCache([this.cacheDir],this.ghaCacheKey)}return t}async find(){let e=d.find(this.opts.htcName,this.opts.htcVersion,this.platform());if(e){p.info(`Restored from hosted tool cache ${e}`);return this.copyToCache(`${e}/${this.opts.cacheFile}`)}if(!this.ghaNoCache&&A.isFeatureAvailable()){p.debug(`GitHub Actions cache feature available`);if(await A.restoreCache([this.cacheDir],this.ghaCacheKey)){p.info(`Restored ${this.ghaCacheKey} from GitHub Actions cache`);e=await d.cacheDir(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());p.info(`Restored to hosted tool cache ${e}`);return this.copyToCache(`${e}/${this.opts.cacheFile}`)}}else if(this.ghaNoCache){p.info(`GitHub Actions cache disabled`)}else{p.info(`GitHub Actions cache feature not available`)}return""}copyToCache(e){p.debug(`Copying ${e} to ${this.cachePath}`);o.default.copyFileSync(e,this.cachePath);return this.cachePath}platform(){const e=process.config.variables.arm_version;return`${l.default.platform()}-${l.default.arch()}${e?"v"+e:""}`}}t.Cache=Cache},4051:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Context=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(8517));const d=s(r(5438));const A=r(6276);class Context{static _tmpDir=o.default.mkdtempSync(c.default.join(Context.ensureDirExists(process.env.RUNNER_TEMP||l.default.tmpdir()),"docker-actions-toolkit-"));static ensureDirExists(e){o.default.mkdirSync(e,{recursive:true});return e}static tmpDir(){return Context._tmpDir}static tmpName(e){return p.tmpNameSync(e)}static gitRef(){let e=d.context.ref;if(d.context.sha&&e&&!e.startsWith("refs/")){e=`refs/heads/${d.context.ref}`}if(d.context.sha&&!e.startsWith(`refs/pull/`)){e=d.context.sha}return e}static gitContext(){return`${A.GitHub.serverURL}/${d.context.repo.owner}/${d.context.repo.repo}.git#${Context.gitRef()}`}static provenanceBuilderID(){return`${A.GitHub.serverURL}/${d.context.repo.owner}/${d.context.repo.repo}/actions/runs/${d.context.runId}`}}t.Context=Context},976:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Docker=void 0;const o=a(r(7147));const l=a(r(2037));const c=a(r(1017));const p=s(r(2186));const d=s(r(7436));const A=r(1949);class Docker{static get configDir(){return process.env.DOCKER_CONFIG||c.default.join(l.default.homedir(),".docker")}static configFile(){const e=c.default.join(Docker.configDir,"config.json");if(!o.default.existsSync(e)){return undefined}return JSON.parse(o.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await d.which("docker",true).then((e=>{p.debug(`Docker.isAvailable ok: ${e}`);return true})).catch((e=>{p.debug(`Docker.isAvailable error: ${e}`);return false}))}static async context(e){const t=["context","inspect","--format","{{.Name}}"];if(e){t.push(e)}return await A.Exec.getExecOutput(`docker`,t,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr)}return e.stdout.trim()}))}static async printVersion(){await A.Exec.exec("docker",["version"])}static async printInfo(){await A.Exec.exec("docker",["info"])}}t.Docker=Docker},1949:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Exec=void 0;const a=s(r(2186));const o=s(r(1514));class Exec{static async exec(e,t,r){a.debug(`Exec.exec: ${e} ${t?.join(" ")}`);return o.exec(e,t,r)}static async getExecOutput(e,t,r){a.debug(`Exec.getExecOutput: ${e} ${t?.join(" ")}`);return o.getExecOutput(e,t,r)}}t.Exec=Exec},6074:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Git=void 0;const a=s(r(2186));const o=r(6762);const l=r(3044);const c=r(1949);const p=r(6276);const d=r(4087);class Git{static async context(){const e=new d.Context;e.ref=await Git.ref();e.sha=await Git.fullCommit();return e}static async isInsideWorkTree(){return await Git.exec(["rev-parse","--is-inside-work-tree"]).then((e=>e==="true")).catch((()=>false))}static async remoteSha(e,t,r){const i=e.match(/github.com\/([^/]+)\/([^/]+?)(?:\.git)?(\/|$)/);if(r&&i){a.setSecret(r);const n=new(o.Octokit.plugin(l.restEndpointMethods).defaults({baseUrl:p.GitHub.apiURL}))({auth:r});const[s,c]=i.slice(1,3);try{return(await n.rest.repos.listCommits({owner:s,repo:c,sha:t,per_page:1})).data[0].sha}catch(r){throw new Error(`Cannot find remote ref for ${e}#${t}: ${r.message}`)}}return await Git.exec(["ls-remote",e,t]).then((r=>{const[i]=r.split(/[\s\t]/);if(i.length==0){throw new Error(`Cannot find remote ref for ${e}#${t}`)}return i}))}static async remoteURL(){return await Git.exec(["remote","get-url","origin"]).then((e=>{if(e.length==0){return Git.exec(["remote","get-url","upstream"]).then((e=>{if(e.length==0){throw new Error(`Cannot find remote URL for origin or upstream`)}return e}))}return e}))}static async ref(){const e=await Git.isHeadDetached();if(e){return await Git.getDetachedRef()}return await Git.exec(["symbolic-ref","HEAD"])}static async fullCommit(){return await Git.exec(["show","--format=%H","HEAD","--quiet","--"])}static async shortCommit(){return await Git.exec(["show","--format=%h","HEAD","--quiet","--"])}static async tag(){return await Git.exec(["tag","--points-at","HEAD","--sort","-version:creatordate"]).then((e=>{if(e.length==0){return Git.exec(["describe","--tags","--abbrev=0"])}return e.split("\n")[0]}))}static async isHeadDetached(){return await Git.exec(["branch","--show-current"]).then((e=>e.length==0))}static async getDetachedRef(){const e=await Git.exec(["show","-s","--pretty=%D"]);const t=e.match(/^(grafted, )?HEAD, (.*)$/);if(!t||!t[2]){throw new Error(`Cannot find detached HEAD ref in "${e}"`)}const r=t[2].trim();if(r.startsWith("tag: ")){return`refs/tags/${r.split(":")[1].trim()}`}const i=r.match(/^[^/]+\/[^/]+, (.+)$/);if(i){return`refs/heads/${i[1].trim()}`}const n=r.match(/^pull\/\d+\/(head|merge)$/);if(n){return`refs/${r}`}throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await c.Exec.getExecOutput(`git`,e,{ignoreReturnCode:true,silent:true}).then((e=>{if(e.stderr.length>0&&e.exitCode!=0){throw new Error(e.stderr)}return e.stdout.trim()}))}}t.Git=Git},6276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.GitHub=void 0;const a=s(r(2186));const o=s(r(5438));const l=r(2971);class GitHub{octokit;constructor(e){this.octokit=o.getOctokit(`${e?.token}`)}repoData(){return this.octokit.rest.repos.get({...o.context.repo}).then((e=>e.data))}static get context(){return o.context}static get serverURL(){return process.env.GITHUB_SERVER_URL||"https://github.com"}static get apiURL(){return process.env.GITHUB_API_URL||"https://api.github.com"}static get workflowRunURL(){return`${GitHub.serverURL}/${o.context.repo.owner}/${o.context.repo.repo}/actions/runs/${o.context.runId}`}static get actionsRuntimeToken(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";return e?(0,l.jwtDecode)(e):undefined}static async printActionsRuntimeTokenACs(){let e;try{e=GitHub.actionsRuntimeToken}catch(e){throw new Error(`Cannot parse GitHub Actions Runtime Token: ${e.message}`)}if(!e){throw new Error(`ACTIONS_RUNTIME_TOKEN not set`)}try{JSON.parse(`${e.ac}`).forEach((e=>{let t;switch(e.Permission){case 1:t="read";break;case 2:t="write";break;case 3:t="read/write";break;default:t=`unimplemented (${e.Permission})`}a.info(`${e.Scope}: ${t}`)}))}catch(e){throw new Error(`Cannot parse GitHub Actions Runtime Token ACs: ${e.message}`)}}}t.GitHub=GitHub},6618:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.run=void 0;const a=s(r(2186));const o=!!process.env["STATE_isPost"];if(!o){a.saveState("isPost","true")}async function run(e,t){if(!o){try{await e()}catch(e){a.setFailed(e.message)}}else if(t){await t()}}t.run=run},2680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Toolkit=void 0;const i=r(9994);const n=r(2262);const s=r(2008);const a=r(7991);const o=r(6361);const l=r(6276);class Toolkit{github;buildx;buildxInstall;bake;builder;buildkit;constructor(e={}){this.github=new l.GitHub({token:e.githubToken});this.buildx=new i.Buildx;this.buildxInstall=new n.Install;this.bake=new s.Bake({buildx:this.buildx});this.builder=new a.Builder({buildx:this.buildx});this.buildkit=new o.BuildKit({buildx:this.buildx})}}t.Toolkit=Toolkit},8662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=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);n(t,e);return t};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Util=void 0;const o=a(r(6113));const l=a(r(7147));const c=s(r(2186));const p=s(r(7436));const d=r(4393);class Util{static getInputList(e,t){return this.getList(c.getInput(e),t)}static getList(e,t){const r=[];if(e==""){return r}const i=(0,d.parse)(e,{columns:false,relaxQuotes:true,comment:t?.comment,relaxColumnCount:true,skipEmptyLines:true,quote:t?.quote});for(const e of i){if(e.length==1){if(t?.ignoreComma){r.push(e[0])}else{r.push(...e[0].split(","))}}else if(!t?.ignoreComma){r.push(...e)}else{r.push(e.join(","))}}return r.filter((e=>e)).map((e=>e.trim()))}static async asyncForEach(e,t){for(let r=0;rsetTimeout(t,e*1e3)))}static hash(e){return o.default.createHash("sha256").update(e).digest("hex")}}t.Util=Util},4274:(e,t,r)=>{"use strict";const i=r(8208);const n=Symbol("max");const s=Symbol("length");const a=Symbol("lengthCalculator");const o=Symbol("allowStale");const l=Symbol("maxAge");const c=Symbol("dispose");const p=Symbol("noDisposeOnSet");const d=Symbol("lruList");const A=Symbol("cache");const u=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[a]=typeof r!=="function"?naiveLength:r;this[o]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[c]=e.dispose;this[p]=e.noDisposeOnSet||false;this[u]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;trim(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[a]){this[a]=e;this[s]=0;this[d].forEach((e=>{e.length=this[a](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[a]}get length(){return this[s]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;r!==null;){const i=r.prev;forEachStep(this,e,r,t);r=i}}forEach(e,t){t=t||this;for(let r=this[d].head;r!==null;){const i=r.next;forEachStep(this,e,r,t);r=i}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){if(this[c]&&this[d]&&this[d].length){this[d].forEach((e=>this[c](e.key,e.value)))}this[A]=new Map;this[d]=new i;this[s]=0}dump(){return this[d].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const i=r?Date.now():0;const o=this[a](t,e);if(this[A].has(e)){if(o>this[n]){del(this,this[A].get(e));return false}const a=this[A].get(e);const l=a.value;if(this[c]){if(!this[p])this[c](e,l.value)}l.now=i;l.maxAge=r;l.value=t;this[s]+=o-l.length;l.length=o;this.get(e);trim(this);return true}const u=new Entry(e,t,o,i,r);if(u.length>this[n]){if(this[c])this[c](e,t);return false}this[s]+=u.length;this[d].unshift(u);this[A].set(e,this[d].head);trim(this);return true}has(e){if(!this[A].has(e))return false;const t=this[A].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[d].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[A].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r];const n=i.e||0;if(n===0)this.set(i.k,i.v);else{const e=n-t;if(e>0){this.set(i.k,i.v,e)}}}}prune(){this[A].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const i=e[A].get(t);if(i){const t=i.value;if(isStale(e,t)){del(e,i);if(!e[o])return undefined}else{if(r){if(e[u])i.value.now=Date.now();e[d].unshiftNode(i)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const trim=e=>{if(e[s]>e[n]){for(let t=e[d].tail;e[s]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[c])e[c](r.key,r.value);e[s]-=r.length;e[A].delete(r.key);e[d].removeNode(t)}};class Entry{constructor(e,t,r,i,n){this.key=e;this.value=t;this.length=r;this.now=i;this.maxAge=n||0}}const forEachStep=(e,t,r,i)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[o])n=undefined}if(n)t.call(i,n.value,n.key,e)};e.exports=LRUCache},5790:(e,t,r)=>{const i=Symbol("SemVer ANY");class Comparator{static get ANY(){return i}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===i){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=i}else{this.semver=new c(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===i||e===i){return true}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}return o(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new p(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new p(this.value,t).test(e.semver)}t=n(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(o(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(o(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const n=r(5326);const{safeRe:s,t:a}=r(7693);const o=r(8822);const l=r(3528);const c=r(3863);const p=r(8330)},8330:(e,t,r)=>{class Range{constructor(e,t){t=s(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof a){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&m)|(this.options.loose&&g);const r=t+":"+e;const i=n.get(r);if(i){return i}const s=this.options.loose;const l=s?c[p.HYPHENRANGELOOSE]:c[p.HYPHENRANGE];e=e.replace(l,hyphenReplace(this.options.includePrerelease));o("hyphen replace",e);e=e.replace(c[p.COMPARATORTRIM],d);o("comparator trim",e);e=e.replace(c[p.TILDETRIM],A);o("tilde trim",e);e=e.replace(c[p.CARETTRIM],u);o("caret trim",e);let h=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(s){h=h.filter((e=>{o("loose invalid filter",e,this.options);return!!e.match(c[p.COMPARATORLOOSE])}))}o("range list",h);const E=new Map;const y=h.map((e=>new a(e,this.options)));for(const e of y){if(isNullSet(e)){return[e]}E.set(e.value,e)}if(E.size>1&&E.has("")){E.delete("")}const C=[...E.values()];n.set(r,C);return C}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const i=e.slice();let n=i.pop();while(r&&i.length){r=i.every((e=>n.intersects(e,t)));n=i.pop()}return r};const parseComparator=(e,t)=>{o("comp",e,t);e=replaceCarets(e,t);o("caret",e);e=replaceTildes(e,t);o("tildes",e);e=replaceXRanges(e,t);o("xrange",e);e=replaceStars(e,t);o("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?c[p.TILDELOOSE]:c[p.TILDE];return e.replace(r,((t,r,i,n,s)=>{o("tilde",e,t,r,i,n,s);let a;if(isX(r)){a=""}else if(isX(i)){a=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`}else if(s){o("replaceTilde pr",s);a=`>=${r}.${i}.${n}-${s} <${r}.${+i+1}.0-0`}else{a=`>=${r}.${i}.${n} <${r}.${+i+1}.0-0`}o("tilde return",a);return a}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{o("caret",e,t);const r=t.loose?c[p.CARETLOOSE]:c[p.CARET];const i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,s,a)=>{o("caret",e,t,r,n,s,a);let l;if(isX(r)){l=""}else if(isX(n)){l=`>=${r}.0.0${i} <${+r+1}.0.0-0`}else if(isX(s)){if(r==="0"){l=`>=${r}.${n}.0${i} <${r}.${+n+1}.0-0`}else{l=`>=${r}.${n}.0${i} <${+r+1}.0.0-0`}}else if(a){o("replaceCaret pr",a);if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${s}-${a} <${r}.${n}.${+s+1}-0`}else{l=`>=${r}.${n}.${s}-${a} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${s}-${a} <${+r+1}.0.0-0`}}else{o("no pr");if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${s}${i} <${r}.${n}.${+s+1}-0`}else{l=`>=${r}.${n}.${s}${i} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${s} <${+r+1}.0.0-0`}}o("caret return",l);return l}))};const replaceXRanges=(e,t)=>{o("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?c[p.XRANGELOOSE]:c[p.XRANGE];return e.replace(r,((r,i,n,s,a,l)=>{o("xRange",e,r,i,n,s,a,l);const c=isX(n);const p=c||isX(s);const d=p||isX(a);const A=d;if(i==="="&&A){i=""}l=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){r="<0.0.0-0"}else{r="*"}}else if(i&&A){if(p){s=0}a=0;if(i===">"){i=">=";if(p){n=+n+1;s=0;a=0}else{s=+s+1;a=0}}else if(i==="<="){i="<";if(p){n=+n+1}else{s=+s+1}}if(i==="<"){l="-0"}r=`${i+n}.${s}.${a}${l}`}else if(p){r=`>=${n}.0.0${l} <${+n+1}.0.0-0`}else if(d){r=`>=${n}.${s}.0${l} <${n}.${+s+1}.0-0`}o("xRange return",r);return r}))};const replaceStars=(e,t)=>{o("replaceStars",e,t);return e.trim().replace(c[p.STAR],"")};const replaceGTE0=(e,t)=>{o("replaceGTE0",e,t);return e.trim().replace(c[t.includePrerelease?p.GTE0PRE:p.GTE0],"")};const hyphenReplace=e=>(t,r,i,n,s,a,o,l,c,p,d,A,u)=>{if(isX(i)){r=""}else if(isX(n)){r=`>=${i}.0.0${e?"-0":""}`}else if(isX(s)){r=`>=${i}.${n}.0${e?"-0":""}`}else if(a){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(c)){l=""}else if(isX(p)){l=`<${+c+1}.0.0-0`}else if(isX(d)){l=`<${c}.${+p+1}.0-0`}else if(A){l=`<=${c}.${p}.${d}-${A}`}else if(e){l=`<${c}.${p}.${+d+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch){return true}}}return false}return true}},3863:(e,t,r)=>{const i=r(3528);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:s}=r(1728);const{safeRe:a,t:o}=r(7693);const l=r(5326);const{compareIdentifiers:c}=r(5212);class SemVer{constructor(e,t){t=l(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}i("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){if(t===this.prerelease.join(".")&&r===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let i=[t,e];if(r===false){i=[t]}if(c(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=i}}else{this.prerelease=i}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},4909:(e,t,r)=>{const i=r(7269);const clean=(e,t)=>{const r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},8822:(e,t,r)=>{const i=r(2801);const n=r(3610);const s=r(8489);const a=r(9541);const o=r(2351);const l=r(576);const cmp=(e,t,r,c)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return i(e,r,c);case"!=":return n(e,r,c);case">":return s(e,r,c);case">=":return a(e,r,c);case"<":return o(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},6132:(e,t,r)=>{const i=r(3863);const n=r(7269);const{safeRe:s,t:a}=r(7693);const coerce=(e,t)=>{if(e instanceof i){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(s[a.COERCE])}else{let t;while((t=s[a.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}s[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}s[a.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},4081:(e,t,r)=>{const i=r(3863);const compareBuild=(e,t,r)=>{const n=new i(e,r);const s=new i(t,r);return n.compare(s)||n.compareBuild(s)};e.exports=compareBuild},6254:(e,t,r)=>{const i=r(74);const compareLoose=(e,t)=>i(e,t,true);e.exports=compareLoose},74:(e,t,r)=>{const i=r(3863);const compare=(e,t,r)=>new i(e,r).compare(new i(t,r));e.exports=compare},2941:(e,t,r)=>{const i=r(7269);const diff=(e,t)=>{const r=i(e,null,true);const n=i(t,null,true);const s=r.compare(n);if(s===0){return null}const a=s>0;const o=a?r:n;const l=a?n:r;const c=!!o.prerelease.length;const p=!!l.prerelease.length;if(p&&!c){if(!l.patch&&!l.minor){return"major"}if(o.patch){return"patch"}if(o.minor){return"minor"}return"major"}const d=c?"pre":"";if(r.major!==n.major){return d+"major"}if(r.minor!==n.minor){return d+"minor"}if(r.patch!==n.patch){return d+"patch"}return"prerelease"};e.exports=diff},2801:(e,t,r)=>{const i=r(74);const eq=(e,t,r)=>i(e,t,r)===0;e.exports=eq},8489:(e,t,r)=>{const i=r(74);const gt=(e,t,r)=>i(e,t,r)>0;e.exports=gt},9541:(e,t,r)=>{const i=r(74);const gte=(e,t,r)=>i(e,t,r)>=0;e.exports=gte},8300:(e,t,r)=>{const i=r(3863);const inc=(e,t,r,n,s)=>{if(typeof r==="string"){s=n;n=r;r=undefined}try{return new i(e instanceof i?e.version:e,r).inc(t,n,s).version}catch(e){return null}};e.exports=inc},2351:(e,t,r)=>{const i=r(74);const lt=(e,t,r)=>i(e,t,r)<0;e.exports=lt},576:(e,t,r)=>{const i=r(74);const lte=(e,t,r)=>i(e,t,r)<=0;e.exports=lte},6490:(e,t,r)=>{const i=r(3863);const major=(e,t)=>new i(e,t).major;e.exports=major},1313:(e,t,r)=>{const i=r(3863);const minor=(e,t)=>new i(e,t).minor;e.exports=minor},3610:(e,t,r)=>{const i=r(74);const neq=(e,t,r)=>i(e,t,r)!==0;e.exports=neq},7269:(e,t,r)=>{const i=r(3863);const parse=(e,t,r=false)=>{if(e instanceof i){return e}try{return new i(e,t)}catch(e){if(!r){return null}throw e}};e.exports=parse},738:(e,t,r)=>{const i=r(3863);const patch=(e,t)=>new i(e,t).patch;e.exports=patch},3097:(e,t,r)=>{const i=r(7269);const prerelease=(e,t)=>{const r=i(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6440:(e,t,r)=>{const i=r(74);const rcompare=(e,t,r)=>i(t,e,r);e.exports=rcompare},4197:(e,t,r)=>{const i=r(4081);const rsort=(e,t)=>e.sort(((e,r)=>i(r,e,t)));e.exports=rsort},981:(e,t,r)=>{const i=r(8330);const satisfies=(e,t,r)=>{try{t=new i(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},4631:(e,t,r)=>{const i=r(4081);const sort=(e,t)=>e.sort(((e,r)=>i(e,r,t)));e.exports=sort},5995:(e,t,r)=>{const i=r(7269);const valid=(e,t)=>{const r=i(e,t);return r?r.version:null};e.exports=valid},3220:(e,t,r)=>{const i=r(7693);const n=r(1728);const s=r(3863);const a=r(5212);const o=r(7269);const l=r(5995);const c=r(4909);const p=r(8300);const d=r(2941);const A=r(6490);const u=r(1313);const m=r(738);const g=r(3097);const h=r(74);const E=r(6440);const y=r(6254);const C=r(4081);const b=r(4631);const I=r(4197);const B=r(8489);const v=r(2351);const Q=r(2801);const w=r(3610);const x=r(9541);const S=r(576);const N=r(8822);const R=r(6132);const D=r(5790);const T=r(8330);const _=r(981);const k=r(6967);const O=r(473);const P=r(2180);const L=r(3870);const M=r(6040);const U=r(5966);const H=r(9556);const q=r(6632);const G=r(5447);const V=r(2529);const j=r(7542);e.exports={parse:o,valid:l,clean:c,inc:p,diff:d,major:A,minor:u,patch:m,prerelease:g,compare:h,rcompare:E,compareLoose:y,compareBuild:C,sort:b,rsort:I,gt:B,lt:v,eq:Q,neq:w,gte:x,lte:S,cmp:N,coerce:R,Comparator:D,Range:T,satisfies:_,toComparators:k,maxSatisfying:O,minSatisfying:P,minVersion:L,validRange:M,outside:U,gtr:H,ltr:q,intersects:G,simplifyRange:V,subset:j,SemVer:s,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},1728:e=>{const t="2.0.0";const r=256;const i=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;const s=r-6;const a=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:i,RELEASE_TYPES:a,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},3528:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},5212:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const i=t.test(e);const n=t.test(r);if(i&&n){e=+e;r=+r}return e===r?0:i&&!n?-1:n&&!i?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},5326:e=>{const t=Object.freeze({loose:true});const r=Object.freeze({});const parseOptions=e=>{if(!e){return r}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},7693:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=r(1728);const a=r(3528);t=e.exports={};const o=t.re=[];const l=t.safeRe=[];const c=t.src=[];const p=t.t={};let d=0;const A="[a-zA-Z0-9-]";const u=[["\\s",1],["\\d",s],[A,n]];const makeSafeRegex=e=>{for(const[t,r]of u){e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`)}return e};const createToken=(e,t,r)=>{const i=makeSafeRegex(t);const n=d++;a(e,n,t);p[e]=n;c[n]=t;o[n]=new RegExp(t,r?"g":undefined);l[n]=new RegExp(i,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${A}*`);createToken("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.`+`(${c[p.NUMERICIDENTIFIER]})\\.`+`(${c[p.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.`+`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.`+`(${c[p.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${c[p.NUMERICIDENTIFIER]}|${c[p.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NUMERICIDENTIFIERLOOSE]}|${c[p.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${A}+`);createToken("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`);createToken("FULL",`^${c[p.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`);createToken("LOOSE",`^${c[p.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})`+`(?:\\.(${c[p.XRANGEIDENTIFIER]})`+`(?:\\.(${c[p.XRANGEIDENTIFIER]})`+`(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})`+`(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${i}})`+`(?:\\.(\\d{1,${i}}))?`+`(?:\\.(\\d{1,${i}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",c[p.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${c[p.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${c[p.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9556:(e,t,r)=>{const i=r(5966);const gtr=(e,t,r)=>i(e,t,">",r);e.exports=gtr},5447:(e,t,r)=>{const i=r(8330);const intersects=(e,t,r)=>{e=new i(e,r);t=new i(t,r);return e.intersects(t,r)};e.exports=intersects},6632:(e,t,r)=>{const i=r(5966);const ltr=(e,t,r)=>i(e,t,"<",r);e.exports=ltr},473:(e,t,r)=>{const i=r(3863);const n=r(8330);const maxSatisfying=(e,t,r)=>{let s=null;let a=null;let o=null;try{o=new n(t,r)}catch(e){return null}e.forEach((e=>{if(o.test(e)){if(!s||a.compare(e)===-1){s=e;a=new i(s,r)}}}));return s};e.exports=maxSatisfying},2180:(e,t,r)=>{const i=r(3863);const n=r(8330);const minSatisfying=(e,t,r)=>{let s=null;let a=null;let o=null;try{o=new n(t,r)}catch(e){return null}e.forEach((e=>{if(o.test(e)){if(!s||a.compare(e)===1){s=e;a=new i(s,r)}}}));return s};e.exports=minSatisfying},3870:(e,t,r)=>{const i=r(3863);const n=r(8330);const s=r(8489);const minVersion=(e,t)=>{e=new n(e,t);let r=new i("0.0.0");if(e.test(r)){return r}r=new i("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new i(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!a||s(t,a)){a=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(a&&(!r||s(r,a))){r=a}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},5966:(e,t,r)=>{const i=r(3863);const n=r(5790);const{ANY:s}=n;const a=r(8330);const o=r(981);const l=r(8489);const c=r(2351);const p=r(576);const d=r(9541);const outside=(e,t,r,A)=>{e=new i(e,A);t=new a(t,A);let u,m,g,h,E;switch(r){case">":u=l;m=p;g=c;h=">";E=">=";break;case"<":u=c;m=d;g=l;h="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,A)){return false}for(let r=0;r{if(e.semver===s){e=new n(">=0.0.0")}a=a||e;o=o||e;if(u(e.semver,a.semver,A)){a=e}else if(g(e.semver,o.semver,A)){o=e}}));if(a.operator===h||a.operator===E){return false}if((!o.operator||o.operator===h)&&m(e,o.semver)){return false}else if(o.operator===E&&g(e,o.semver)){return false}}return true};e.exports=outside},2529:(e,t,r)=>{const i=r(981);const n=r(74);e.exports=(e,t,r)=>{const s=[];let a=null;let o=null;const l=e.sort(((e,t)=>n(e,t,r)));for(const e of l){const n=i(e,t,r);if(n){o=e;if(!a){a=e}}else{if(o){s.push([a,o])}o=null;a=null}}if(a){s.push([a,null])}const c=[];for(const[e,t]of s){if(e===t){c.push(e)}else if(!t&&e===l[0]){c.push("*")}else if(!t){c.push(`>=${e}`)}else if(e===l[0]){c.push(`<=${t}`)}else{c.push(`${e} - ${t}`)}}const p=c.join(" || ");const d=typeof t.raw==="string"?t.raw:String(t);return p.length{const i=r(8330);const n=r(5790);const{ANY:s}=n;const a=r(981);const o=r(74);const subset=(e,t,r={})=>{if(e===t){return true}e=new i(e,r);t=new i(t,r);let n=false;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const l=[new n(">=0.0.0-0")];const c=[new n(">=0.0.0")];const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===s){if(t.length===1&&t[0].semver===s){return true}else if(r.includePrerelease){e=l}else{e=c}}if(t.length===1&&t[0].semver===s){if(r.includePrerelease){return true}else{t=c}}const i=new Set;let n,p;for(const t of e){if(t.operator===">"||t.operator===">="){n=higherGT(n,t,r)}else if(t.operator==="<"||t.operator==="<="){p=lowerLT(p,t,r)}else{i.add(t.semver)}}if(i.size>1){return null}let d;if(n&&p){d=o(n.semver,p.semver,r);if(d>0){return null}else if(d===0&&(n.operator!==">="||p.operator!=="<=")){return null}}for(const e of i){if(n&&!a(e,String(n),r)){return null}if(p&&!a(e,String(p),r)){return null}for(const i of t){if(!a(e,String(i),r)){return false}}return true}let A,u;let m,g;let h=p&&!r.includePrerelease&&p.semver.prerelease.length?p.semver:false;let E=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:false;if(h&&h.prerelease.length===1&&p.operator==="<"&&h.prerelease[0]===0){h=false}for(const e of t){g=g||e.operator===">"||e.operator===">=";m=m||e.operator==="<"||e.operator==="<=";if(n){if(E){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===E.major&&e.semver.minor===E.minor&&e.semver.patch===E.patch){E=false}}if(e.operator===">"||e.operator===">="){A=higherGT(n,e,r);if(A===e&&A!==n){return false}}else if(n.operator===">="&&!a(n.semver,String(e),r)){return false}}if(p){if(h){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===h.major&&e.semver.minor===h.minor&&e.semver.patch===h.patch){h=false}}if(e.operator==="<"||e.operator==="<="){u=lowerLT(p,e,r);if(u===e&&u!==p){return false}}else if(p.operator==="<="&&!a(p.semver,String(e),r)){return false}}if(!e.operator&&(p||n)&&d!==0){return false}}if(n&&m&&!p&&d!==0){return false}if(p&&g&&!n&&d!==0){return false}if(E||h){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const i=o(e.semver,t.semver,r);return i>0?e:i<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const i=o(e.semver,t.semver,r);return i<0?e:i>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},6967:(e,t,r)=>{const i=r(8330);const toComparators=(e,t)=>new i(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},6040:(e,t,r)=>{const i=r(8330);const validRange=(e,t)=>{try{return new i(e,t).range||"*"}catch(e){return null}};e.exports=validRange},8940:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},8208:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,i=arguments.length;r1){r=t}else if(this.head){i=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;i!==null;n++){r=e(r,i.value,n);i=i.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var i=this.tail;if(arguments.length>1){r=t}else if(this.tail){i=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;i!==null;n--){r=e(r,i.value,n);i=i.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var i=0,n=this.head;n!==null&&ithis.length){t=this.length}for(var i=this.length,n=this.tail;n!==null&&i>t;i--){n=n.prev}for(;n!==null&&i>e;i--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var i=0,n=this.head;n!==null&&i{"use strict";const i=r(4492).Writable;const n=r(7261).inherits;const s=r(8534);const a=r(8710);const o=r(333);const l=45;const c=Buffer.from("-");const p=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}i.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new o(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}n(Dicer,i);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{i.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this._events.preamble){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const i=r(5673).EventEmitter;const n=r(7261).inherits;const s=r(9692);const a=r(8534);const o=Buffer.from("\r\n\r\n");const l=/\r\n/g;const c=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){i.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=s(e,"maxHeaderPairs",2e3);this.maxHeaderSize=s(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(o);this.ss.on("info",(function(e,r,i,n){if(r&&!t.maxed){if(t.nread+n-i>=t.maxHeaderSize){n=t.maxHeaderSize-t.nread+i;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=n-i}t.buffer+=r.toString("binary",i,n)}if(e){t._finish()}}))}n(HeaderParser,i);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,i;for(var n=0;n{"use strict";const i=r(7261).inherits;const n=r(4492).Readable;function PartStream(e){n.call(this,e)}i(PartStream,n);PartStream.prototype._read=function(e){};e.exports=PartStream},8534:(e,t,r)=>{"use strict";const i=r(5673).EventEmitter;const n=r(7261).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+s;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}s+=(s>=0)*this._bufpos;if(e.indexOf(r,s)!==-1){s=e.indexOf(r,s);++this.matches;if(s>0){this.emit("info",true,e,this._bufpos,s)}else{this.emit("info",true)}return this._bufpos=s+i}else{s=t-i}while(s0){this.emit("info",false,e,this._bufpos,s{"use strict";const i=r(4492).Writable;const{inherits:n}=r(7261);const s=r(2856);const a=r(415);const o=r(6780);const l=r(4426);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};i.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}n(Busboy,i);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}i.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(o.detect.test(t[0])){return new o(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=s},415:(e,t,r)=>{"use strict";const{Readable:i}=r(4492);const{inherits:n}=r(7261);const s=r(2856);const a=r(4426);const o=r(9136);const l=r(496);const c=r(9692);const p=/^boundary$/i;const d=/^form-data$/i;const A=/^charset$/i;const u=/^filename$/i;const m=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let i;const n=this;let g;const h=t.limits;const E=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const y=t.parsedConType||[];const C=t.defCharset||"utf8";const b=t.preservePath;const I={highWaterMark:t.fileHwm};for(r=0,i=y.length;rx){n.parser.removeListener("part",onPart);n.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(k){const e=k;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(s){let c;let p;let g;let h;let y;let x;let S=0;if(s["content-type"]){g=a(s["content-type"][0]);if(g[0]){c=g[0].toLowerCase();for(r=0,i=g.length;rv){const i=v-S+e.length;if(i>0){r.push(e.slice(0,i))}r.truncated=true;r.bytesRead=v;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){n._pause=true}r.bytesRead=S};O=function(){_=undefined;r.push(null)}}else{if(D===w){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++D;++T;let r="";let i=false;k=t;N=function(e){if((S+=e.length)>B){const n=B-(S-e.length);r+=e.toString("binary",0,n);i=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};O=function(){k=undefined;if(r.length){r=o(r,"binary",h)}e.emit("field",p,r,false,i,y,c);--T;checkFinished()}}t._readableState.sync=false;t.on("data",N);t.on("end",O)})).on("error",(function(e){if(_){_.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){O=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){i.call(this,e);this.bytesRead=0;this.truncated=false}n(FileStream,i);FileStream.prototype._read=function(e){};e.exports=Multipart},6780:(e,t,r)=>{"use strict";const i=r(9730);const n=r(9136);const s=r(9692);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const n=t.parsedConType;this.boy=e;this.fieldSizeLimit=s(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=s(r,"fieldNameSize",100);this.fieldsLimit=s(r,"fields",Infinity);let o;for(var l=0,c=n.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(i!==undefined){++this._fields;let r;const s=this._keyTrunc;if(i>a){r=this._key+=this.decoder.write(e.toString("binary",a,i))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",n(r,"binary",this.charset),"",s,false)}a=i+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(s>a){this._key+=this.decoder.write(e.toString("binary",a,s))}a=s;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,i))}this.boy.emit("field",n(this._key,"binary",this.charset),n(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=i+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(s>a){this._val+=this.decoder.write(e.toString("binary",a,s))}a=s;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",n(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",n(this._key,"binary",this.charset),n(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},9730:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let i="";let n=0;let s=0;const a=e.length;for(;ns){i+=e.substring(s,n);s=n}this.buffer="";++s}}if(s{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},9136:e=>{"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function decodeText(e,t,i){if(e){if(r.has(i)){try{return r.get(i).decode(Buffer.from(e,t))}catch(e){}}else{try{r.set(i,new TextDecoder(i));return r.get(i).decode(Buffer.from(e,t))}catch(e){}}}return e}e.exports=decodeText},9692:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},4426:(e,t,r)=>{"use strict";const i=r(9136);const n=/%([a-fA-F0-9]{2})/g;function encodedReplacer(e,t){return String.fromCharCode(parseInt(t,16))}function parseParams(e){const t=[];let r="key";let s="";let a=false;let o=false;let l=0;let c="";for(var p=0,d=e.length;p{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{createTokenAuth:()=>c});e.exports=__toCommonJS(s);var a=/^v1\./;var o=/^ghs_/;var l=/^ghu_/;async function auth(e){const t=e.split(/\./).length===3;const r=a.test(e)||o.test(e);const i=l.test(e);const n=t?"app":r?"installation":i?"user-to-server":"oauth";return{type:"token",token:e,tokenType:n}}function withAuthorizationPrefix(e){if(e.split(/\./).length===3){return`bearer ${e}`}return`token ${e}`}async function hook(e,t,r,i){const n=t.endpoint.merge(r,i);n.headers.authorization=withAuthorizationPrefix(e);return t(n)}var c=function createTokenAuth2(e){if(!e){throw new Error("[@octokit/auth-token] No token passed to createTokenAuth")}if(typeof e!=="string"){throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string")}e=e.replace(/^(token|bearer) +/i,"");return Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})};0&&0},6762:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{Octokit:()=>E});e.exports=__toCommonJS(o);var l=r(5030);var c=r(3682);var p=r(6234);var d=r(8467);var A=r(334);var u="5.1.0";var noop=()=>{};var m=console.warn.bind(console);var g=console.error.bind(console);var h=`octokit-core.js/${u} ${(0,l.getUserAgent)()}`;var E=class{static{this.VERSION=u}static defaults(e){const t=class extends(this){constructor(...t){const r=t[0]||{};if(typeof e==="function"){super(e(r));return}super(Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null))}};return t}static{this.plugins=[]}static plugin(...e){const t=this.plugins;const r=class extends(this){static{this.plugins=t.concat(e.filter((e=>!t.includes(e))))}};return r}constructor(e={}){const t=new c.Collection;const r={baseUrl:p.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};r.headers["user-agent"]=e.userAgent?`${e.userAgent} ${h}`:h;if(e.baseUrl){r.baseUrl=e.baseUrl}if(e.previews){r.mediaType.previews=e.previews}if(e.timeZone){r.headers["time-zone"]=e.timeZone}this.request=p.request.defaults(r);this.graphql=(0,d.withCustomRequest)(this.request).defaults(r);this.log=Object.assign({debug:noop,info:noop,warn:m,error:g},e.log);this.hook=t;if(!e.authStrategy){if(!e.auth){this.auth=async()=>({type:"unauthenticated"})}else{const r=(0,A.createTokenAuth)(e.auth);t.wrap("request",r.hook);this.auth=r}}else{const{authStrategy:r,...i}=e;const n=r(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:i},e.auth));t.wrap("request",n.hook);this.auth=n}const i=this.constructor;for(let t=0;t{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{endpoint:()=>m});e.exports=__toCommonJS(o);var l=r(5030);var c="9.0.1";var p=`octokit-endpoint.js/${c} ${(0,l.getUserAgent)()}`;var d={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":p},mediaType:{format:""}};function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce(((t,r)=>{t[r.toLowerCase()]=e[r];return t}),{})}var A=r(3287);function mergeDeep(e,t){const r=Object.assign({},e);Object.keys(t).forEach((i=>{if((0,A.isPlainObject)(t[i])){if(!(i in e))Object.assign(r,{[i]:t[i]});else r[i]=mergeDeep(e[i],t[i])}else{Object.assign(r,{[i]:t[i]})}}));return r}function removeUndefinedProperties(e){for(const t in e){if(e[t]===void 0){delete e[t]}}return e}function merge(e,t,r){if(typeof t==="string"){let[e,i]=t.split(" ");r=Object.assign(i?{method:e,url:i}:{url:e},r)}else{r=Object.assign({},t)}r.headers=lowercaseKeys(r.headers);removeUndefinedProperties(r);removeUndefinedProperties(r.headers);const i=mergeDeep(e||{},r);if(r.url==="/graphql"){if(e&&e.mediaType.previews?.length){i.mediaType.previews=e.mediaType.previews.filter((e=>!i.mediaType.previews.includes(e))).concat(i.mediaType.previews)}i.mediaType.previews=(i.mediaType.previews||[]).map((e=>e.replace(/-preview/,"")))}return i}function addQueryParameters(e,t){const r=/\?/.test(e)?"&":"?";const i=Object.keys(t);if(i.length===0){return e}return e+r+i.map((e=>{if(e==="q"){return"q="+t.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(t[e])}`})).join("&")}var u=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(u);if(!t){return[]}return t.map(removeNonChars).reduce(((e,t)=>e.concat(t)),[])}function omit(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,r)=>{t[r]=e[r];return t}),{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,r){t=e==="+"||e==="#"?encodeReserved(t):encodeUnreserved(t);if(r){return encodeUnreserved(r)+"="+t}else{return t}}function isDefined(e){return e!==void 0&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,t,r,i){var n=e[r],s=[];if(isDefined(n)&&n!==""){if(typeof n==="string"||typeof n==="number"||typeof n==="boolean"){n=n.toString();if(i&&i!=="*"){n=n.substring(0,parseInt(i,10))}s.push(encodeValue(t,n,isKeyOperator(t)?r:""))}else{if(i==="*"){if(Array.isArray(n)){n.filter(isDefined).forEach((function(e){s.push(encodeValue(t,e,isKeyOperator(t)?r:""))}))}else{Object.keys(n).forEach((function(e){if(isDefined(n[e])){s.push(encodeValue(t,n[e],e))}}))}}else{const e=[];if(Array.isArray(n)){n.filter(isDefined).forEach((function(r){e.push(encodeValue(t,r))}))}else{Object.keys(n).forEach((function(r){if(isDefined(n[r])){e.push(encodeUnreserved(r));e.push(encodeValue(t,n[r].toString()))}}))}if(isKeyOperator(t)){s.push(encodeUnreserved(r)+"="+e.join(","))}else if(e.length!==0){s.push(e.join(","))}}}}else{if(t===";"){if(isDefined(n)){s.push(encodeUnreserved(r))}}else if(n===""&&(t==="&"||t==="?")){s.push(encodeUnreserved(r)+"=")}else if(n===""){s.push("")}}return s}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var r=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,i,n){if(i){let e="";const n=[];if(r.indexOf(i.charAt(0))!==-1){e=i.charAt(0);i=i.substr(1)}i.split(/,/g).forEach((function(r){var i=/([^:\*]*)(?::(\d+)|(\*))?/.exec(r);n.push(getValues(t,e,i[1],i[2]||i[3]))}));if(e&&e!=="+"){var s=",";if(e==="?"){s="&"}else if(e!=="#"){s=e}return(n.length!==0?e:"")+n.join(s)}else{return n.join(",")}}else{return encodeReserved(n)}}))}function parse(e){let t=e.method.toUpperCase();let r=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}");let i=Object.assign({},e.headers);let n;let s=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const a=extractUrlVariableNames(r);r=parseUrl(r).expand(s);if(!/^http/.test(r)){r=e.baseUrl+r}const o=Object.keys(e).filter((e=>a.includes(e))).concat("baseUrl");const l=omit(s,o);const c=/application\/octet-stream/i.test(i.accept);if(!c){if(e.mediaType.format){i.accept=i.accept.split(/,/).map((t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")}if(r.endsWith("/graphql")){if(e.mediaType.previews?.length){const t=i.accept.match(/[\w-]+(?=-preview)/g)||[];i.accept=t.concat(e.mediaType.previews).map((t=>{const r=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${t}-preview${r}`})).join(",")}}}if(["GET","HEAD"].includes(t)){r=addQueryParameters(r,l)}else{if("data"in l){n=l.data}else{if(Object.keys(l).length){n=l}}}if(!i["content-type"]&&typeof n!=="undefined"){i["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(t)&&typeof n==="undefined"){n=""}return Object.assign({method:t,url:r,headers:i},typeof n!=="undefined"?{body:n}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,r){return parse(merge(e,t,r))}function withDefaults(e,t){const r=merge(e,t);const i=endpointWithDefaults.bind(null,r);return Object.assign(i,{DEFAULTS:r,defaults:withDefaults.bind(null,r),merge:merge.bind(null,r),parse:parse})}var m=withDefaults(null,d);0&&0},8467:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{GraphqlResponseError:()=>u,graphql:()=>E,withCustomRequest:()=>withCustomRequest});e.exports=__toCommonJS(o);var l=r(6234);var c=r(5030);var p="7.0.2";var d=r(6234);var A=r(6234);function _buildMessageForResponseErrors(e){return`Request failed due to following response errors:\n`+e.errors.map((e=>` - ${e.message}`)).join("\n")}var u=class extends Error{constructor(e,t,r){super(_buildMessageForResponseErrors(r));this.request=e;this.headers=t;this.response=r;this.name="GraphqlResponseError";this.errors=r.errors;this.data=r.data;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}};var m=["method","baseUrl","url","headers","request","query","mediaType"];var g=["query","method","url"];var h=/\/api\/v3\/?$/;function graphql(e,t,r){if(r){if(typeof t==="string"&&"query"in r){return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`))}for(const e in r){if(!g.includes(e))continue;return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}}const i=typeof t==="string"?Object.assign({query:t},r):t;const n=Object.keys(i).reduce(((e,t)=>{if(m.includes(t)){e[t]=i[t];return e}if(!e.variables){e.variables={}}e.variables[t]=i[t];return e}),{});const s=i.baseUrl||e.endpoint.DEFAULTS.baseUrl;if(h.test(s)){n.url=s.replace(h,"/api/graphql")}return e(n).then((e=>{if(e.data.errors){const t={};for(const r of Object.keys(e.headers)){t[r]=e.headers[r]}throw new u(n,t,e.data)}return e.data.data}))}function withDefaults(e,t){const r=e.defaults(t);const newApi=(e,t)=>graphql(r,e,t);return Object.assign(newApi,{defaults:withDefaults.bind(null,r),endpoint:r.endpoint})}var E=withDefaults(l.request,{headers:{"user-agent":`octokit-graphql.js/${p} ${(0,c.getUserAgent)()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}0&&0},4193:e=>{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{composePaginateRest:()=>o,isPaginatingEndpoint:()=>isPaginatingEndpoint,paginateRest:()=>paginateRest,paginatingEndpoints:()=>l});e.exports=__toCommonJS(s);var a="9.0.0";function normalizePaginatedListResponse(e){if(!e.data){return{...e,data:[]}}const t="total_count"in e.data&&!("url"in e.data);if(!t)return e;const r=e.data.incomplete_results;const i=e.data.repository_selection;const n=e.data.total_count;delete e.data.incomplete_results;delete e.data.repository_selection;delete e.data.total_count;const s=Object.keys(e.data)[0];const a=e.data[s];e.data=a;if(typeof r!=="undefined"){e.data.incomplete_results=r}if(typeof i!=="undefined"){e.data.repository_selection=i}e.data.total_count=n;return e}function iterator(e,t,r){const i=typeof t==="function"?t.endpoint(r):e.request.endpoint(t,r);const n=typeof t==="function"?t:e.request;const s=i.method;const a=i.headers;let o=i.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!o)return{done:true};try{const e=await n({method:s,url:o,headers:a});const t=normalizePaginatedListResponse(e);o=((t.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:t}}catch(e){if(e.status!==409)throw e;o="";return{value:{status:200,headers:{},data:[]}}}}})}}function paginate(e,t,r,i){if(typeof r==="function"){i=r;r=void 0}return gather(e,[],iterator(e,t,r)[Symbol.asyncIterator](),i)}function gather(e,t,r,i){return r.next().then((n=>{if(n.done){return t}let s=false;function done(){s=true}t=t.concat(i?i(n.value,done):n.value.data);if(s){return t}return gather(e,t,r,i)}))}var o=Object.assign(paginate,{iterator:iterator});var l=["GET /advisories","GET /app/hook/deliveries","GET /app/installation-requests","GET /app/installations","GET /assignments/{assignment_id}/accepted_assignments","GET /classrooms","GET /classrooms/{classroom_id}/assignments","GET /enterprises/{enterprise}/dependabot/alerts","GET /enterprises/{enterprise}/secret-scanning/alerts","GET /events","GET /gists","GET /gists/public","GET /gists/starred","GET /gists/{gist_id}/comments","GET /gists/{gist_id}/commits","GET /gists/{gist_id}/forks","GET /installation/repositories","GET /issues","GET /licenses","GET /marketplace_listing/plans","GET /marketplace_listing/plans/{plan_id}/accounts","GET /marketplace_listing/stubbed/plans","GET /marketplace_listing/stubbed/plans/{plan_id}/accounts","GET /networks/{owner}/{repo}/events","GET /notifications","GET /organizations","GET /orgs/{org}/actions/cache/usage-by-repository","GET /orgs/{org}/actions/permissions/repositories","GET /orgs/{org}/actions/runners","GET /orgs/{org}/actions/secrets","GET /orgs/{org}/actions/secrets/{secret_name}/repositories","GET /orgs/{org}/actions/variables","GET /orgs/{org}/actions/variables/{name}/repositories","GET /orgs/{org}/blocks","GET /orgs/{org}/code-scanning/alerts","GET /orgs/{org}/codespaces","GET /orgs/{org}/codespaces/secrets","GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories","GET /orgs/{org}/copilot/billing/seats","GET /orgs/{org}/dependabot/alerts","GET /orgs/{org}/dependabot/secrets","GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories","GET /orgs/{org}/events","GET /orgs/{org}/failed_invitations","GET /orgs/{org}/hooks","GET /orgs/{org}/hooks/{hook_id}/deliveries","GET /orgs/{org}/installations","GET /orgs/{org}/invitations","GET /orgs/{org}/invitations/{invitation_id}/teams","GET /orgs/{org}/issues","GET /orgs/{org}/members","GET /orgs/{org}/members/{username}/codespaces","GET /orgs/{org}/migrations","GET /orgs/{org}/migrations/{migration_id}/repositories","GET /orgs/{org}/outside_collaborators","GET /orgs/{org}/packages","GET /orgs/{org}/packages/{package_type}/{package_name}/versions","GET /orgs/{org}/personal-access-token-requests","GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories","GET /orgs/{org}/personal-access-tokens","GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories","GET /orgs/{org}/projects","GET /orgs/{org}/public_members","GET /orgs/{org}/repos","GET /orgs/{org}/rulesets","GET /orgs/{org}/secret-scanning/alerts","GET /orgs/{org}/security-advisories","GET /orgs/{org}/teams","GET /orgs/{org}/teams/{team_slug}/discussions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions","GET /orgs/{org}/teams/{team_slug}/invitations","GET /orgs/{org}/teams/{team_slug}/members","GET /orgs/{org}/teams/{team_slug}/projects","GET /orgs/{org}/teams/{team_slug}/repos","GET /orgs/{org}/teams/{team_slug}/teams","GET /projects/columns/{column_id}/cards","GET /projects/{project_id}/collaborators","GET /projects/{project_id}/columns","GET /repos/{owner}/{repo}/actions/artifacts","GET /repos/{owner}/{repo}/actions/caches","GET /repos/{owner}/{repo}/actions/organization-secrets","GET /repos/{owner}/{repo}/actions/organization-variables","GET /repos/{owner}/{repo}/actions/runners","GET /repos/{owner}/{repo}/actions/runs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts","GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs","GET /repos/{owner}/{repo}/actions/secrets","GET /repos/{owner}/{repo}/actions/variables","GET /repos/{owner}/{repo}/actions/workflows","GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs","GET /repos/{owner}/{repo}/activity","GET /repos/{owner}/{repo}/assignees","GET /repos/{owner}/{repo}/branches","GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations","GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs","GET /repos/{owner}/{repo}/code-scanning/alerts","GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances","GET /repos/{owner}/{repo}/code-scanning/analyses","GET /repos/{owner}/{repo}/codespaces","GET /repos/{owner}/{repo}/codespaces/devcontainers","GET /repos/{owner}/{repo}/codespaces/secrets","GET /repos/{owner}/{repo}/collaborators","GET /repos/{owner}/{repo}/comments","GET /repos/{owner}/{repo}/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/commits","GET /repos/{owner}/{repo}/commits/{commit_sha}/comments","GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls","GET /repos/{owner}/{repo}/commits/{ref}/check-runs","GET /repos/{owner}/{repo}/commits/{ref}/check-suites","GET /repos/{owner}/{repo}/commits/{ref}/status","GET /repos/{owner}/{repo}/commits/{ref}/statuses","GET /repos/{owner}/{repo}/contributors","GET /repos/{owner}/{repo}/dependabot/alerts","GET /repos/{owner}/{repo}/dependabot/secrets","GET /repos/{owner}/{repo}/deployments","GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses","GET /repos/{owner}/{repo}/environments","GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies","GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps","GET /repos/{owner}/{repo}/events","GET /repos/{owner}/{repo}/forks","GET /repos/{owner}/{repo}/hooks","GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries","GET /repos/{owner}/{repo}/invitations","GET /repos/{owner}/{repo}/issues","GET /repos/{owner}/{repo}/issues/comments","GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/issues/events","GET /repos/{owner}/{repo}/issues/{issue_number}/comments","GET /repos/{owner}/{repo}/issues/{issue_number}/events","GET /repos/{owner}/{repo}/issues/{issue_number}/labels","GET /repos/{owner}/{repo}/issues/{issue_number}/reactions","GET /repos/{owner}/{repo}/issues/{issue_number}/timeline","GET /repos/{owner}/{repo}/keys","GET /repos/{owner}/{repo}/labels","GET /repos/{owner}/{repo}/milestones","GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels","GET /repos/{owner}/{repo}/notifications","GET /repos/{owner}/{repo}/pages/builds","GET /repos/{owner}/{repo}/projects","GET /repos/{owner}/{repo}/pulls","GET /repos/{owner}/{repo}/pulls/comments","GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/pulls/{pull_number}/comments","GET /repos/{owner}/{repo}/pulls/{pull_number}/commits","GET /repos/{owner}/{repo}/pulls/{pull_number}/files","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments","GET /repos/{owner}/{repo}/releases","GET /repos/{owner}/{repo}/releases/{release_id}/assets","GET /repos/{owner}/{repo}/releases/{release_id}/reactions","GET /repos/{owner}/{repo}/rules/branches/{branch}","GET /repos/{owner}/{repo}/rulesets","GET /repos/{owner}/{repo}/secret-scanning/alerts","GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations","GET /repos/{owner}/{repo}/security-advisories","GET /repos/{owner}/{repo}/stargazers","GET /repos/{owner}/{repo}/subscribers","GET /repos/{owner}/{repo}/tags","GET /repos/{owner}/{repo}/teams","GET /repos/{owner}/{repo}/topics","GET /repositories","GET /repositories/{repository_id}/environments/{environment_name}/secrets","GET /repositories/{repository_id}/environments/{environment_name}/variables","GET /search/code","GET /search/commits","GET /search/issues","GET /search/labels","GET /search/repositories","GET /search/topics","GET /search/users","GET /teams/{team_id}/discussions","GET /teams/{team_id}/discussions/{discussion_number}/comments","GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /teams/{team_id}/discussions/{discussion_number}/reactions","GET /teams/{team_id}/invitations","GET /teams/{team_id}/members","GET /teams/{team_id}/projects","GET /teams/{team_id}/repos","GET /teams/{team_id}/teams","GET /user/blocks","GET /user/codespaces","GET /user/codespaces/secrets","GET /user/emails","GET /user/followers","GET /user/following","GET /user/gpg_keys","GET /user/installations","GET /user/installations/{installation_id}/repositories","GET /user/issues","GET /user/keys","GET /user/marketplace_purchases","GET /user/marketplace_purchases/stubbed","GET /user/memberships/orgs","GET /user/migrations","GET /user/migrations/{migration_id}/repositories","GET /user/orgs","GET /user/packages","GET /user/packages/{package_type}/{package_name}/versions","GET /user/public_emails","GET /user/repos","GET /user/repository_invitations","GET /user/social_accounts","GET /user/ssh_signing_keys","GET /user/starred","GET /user/subscriptions","GET /user/teams","GET /users","GET /users/{username}/events","GET /users/{username}/events/orgs/{org}","GET /users/{username}/events/public","GET /users/{username}/followers","GET /users/{username}/following","GET /users/{username}/gists","GET /users/{username}/gpg_keys","GET /users/{username}/keys","GET /users/{username}/orgs","GET /users/{username}/packages","GET /users/{username}/projects","GET /users/{username}/received_events","GET /users/{username}/received_events/public","GET /users/{username}/repos","GET /users/{username}/social_accounts","GET /users/{username}/ssh_signing_keys","GET /users/{username}/starred","GET /users/{username}/subscriptions"];function isPaginatingEndpoint(e){if(typeof e==="string"){return l.includes(e)}else{return false}}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=a;0&&0},3044:e=>{"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:true})};var __copyProps=(e,s,a,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let l of i(s))if(!n.call(e,l)&&l!==a)t(e,l,{get:()=>s[l],enumerable:!(o=r(s,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:true}),e);var s={};__export(s,{legacyRestEndpointMethods:()=>legacyRestEndpointMethods,restEndpointMethods:()=>restEndpointMethods});e.exports=__toCommonJS(s);var a="10.4.0";var o={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repositories/{repository_id}/environments/{environment_name}/variables"],createOrUpdateEnvironmentSecret:["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVariable:["POST /orgs/{org}/actions/variables"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createRepoVariable:["POST /repos/{owner}/{repo}/actions/variables"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteEnvironmentSecret:["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],deleteEnvironmentVariable:["DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteRepoVariable:["DELETE /repos/{owner}/{repo}/actions/variables/{name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],forceCancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"],generateRunnerJitconfigForOrg:["POST /orgs/{org}/actions/runners/generate-jitconfig"],generateRunnerJitconfigForRepo:["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getCustomOidcSubClaimForRepo:["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"],getEnvironmentPublicKey:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"],getEnvironmentVariable:["GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getOrgVariable:["GET /orgs/{org}/actions/variables/{name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getRepoVariable:["GET /repos/{owner}/{repo}/actions/variables/{name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listEnvironmentSecrets:["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],listEnvironmentVariables:["GET /repositories/{repository_id}/environments/{environment_name}/variables"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listOrgVariables:["GET /orgs/{org}/actions/variables"],listRepoOrganizationSecrets:["GET /repos/{owner}/{repo}/actions/organization-secrets"],listRepoOrganizationVariables:["GET /repos/{owner}/{repo}/actions/organization-variables"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoVariables:["GET /repos/{owner}/{repo}/actions/variables"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedReposForOrgVariable:["GET /orgs/{org}/actions/variables/{name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],reviewCustomGatesForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setCustomOidcSubClaimForRepo:["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedReposForOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"],updateEnvironmentVariable:["PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}"],updateOrgVariable:["PATCH /orgs/{org}/actions/variables/{name}"],updateRepoVariable:["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsDone:["DELETE /notifications/threads/{thread_id}"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallationRequestsForAuthenticatedApp:["GET /app/installation-requests"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getCodeqlDatabase:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getDefaultSetup:["GET /repos/{owner}/{repo}/code-scanning/default-setup"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listCodeqlDatabases:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],updateDefaultSetup:["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],checkPermissionsForDevcontainer:["GET /repos/{owner}/{repo}/codespaces/permissions_check"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getCodespacesForUserInOrg:["GET /orgs/{org}/members/{username}/codespaces"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getOrgPublicKey:["GET /orgs/{org}/codespaces/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listOrgSecrets:["GET /orgs/{org}/codespaces/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],preFlightWithRepoForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/new"],publishForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/publish"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},copilot:{addCopilotSeatsForTeams:["POST /orgs/{org}/copilot/billing/selected_teams"],addCopilotSeatsForUsers:["POST /orgs/{org}/copilot/billing/selected_users"],cancelCopilotSeatAssignmentForTeams:["DELETE /orgs/{org}/copilot/billing/selected_teams"],cancelCopilotSeatAssignmentForUsers:["DELETE /orgs/{org}/copilot/billing/selected_users"],getCopilotOrganizationDetails:["GET /orgs/{org}/copilot/billing"],getCopilotSeatDetailsForUser:["GET /orgs/{org}/members/{username}/copilot"],listCopilotSeats:["GET /orgs/{org}/copilot/billing/seats"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getAlert:["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/dependabot/alerts"],listAlertsForOrg:["GET /orgs/{org}/dependabot/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/dependabot/alerts"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],updateAlert:["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"],exportSbom:["GET /repos/{owner}/{repo}/dependency-graph/sbom"]},emojis:{get:["GET /emojis"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],checkUserCanBeAssignedToIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getAllVersions:["GET /versions"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import"}],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors",{},{deprecated:"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors"}],getImportStatus:["GET /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status"}],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files",{},{deprecated:"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files"}],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}",{},{deprecated:"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author"}],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs",{},{deprecated:"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference"}],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import"}],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],updateImport:["PATCH /repos/{owner}/{repo}/import",{},{deprecated:"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import"}]},oidc:{getOidcCustomSubTemplateForOrg:["GET /orgs/{org}/actions/oidc/customization/sub"],updateOidcCustomSubTemplateForOrg:["PUT /orgs/{org}/actions/oidc/customization/sub"]},orgs:{addSecurityManagerTeam:["PUT /orgs/{org}/security-managers/teams/{team_slug}"],assignTeamToOrgRole:["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],assignUserToOrgRole:["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"],blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createCustomOrganizationRole:["POST /orgs/{org}/organization-roles"],createInvitation:["POST /orgs/{org}/invitations"],createOrUpdateCustomProperties:["PATCH /orgs/{org}/properties/schema"],createOrUpdateCustomPropertiesValuesForRepos:["PATCH /orgs/{org}/properties/values"],createOrUpdateCustomProperty:["PUT /orgs/{org}/properties/schema/{custom_property_name}"],createWebhook:["POST /orgs/{org}/hooks"],delete:["DELETE /orgs/{org}"],deleteCustomOrganizationRole:["DELETE /orgs/{org}/organization-roles/{role_id}"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],enableOrDisableSecurityProductOnAllOrgRepos:["POST /orgs/{org}/{security_product}/{enablement}"],get:["GET /orgs/{org}"],getAllCustomProperties:["GET /orgs/{org}/properties/schema"],getCustomProperty:["GET /orgs/{org}/properties/schema/{custom_property_name}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getOrgRole:["GET /orgs/{org}/organization-roles/{role_id}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listBlockedUsers:["GET /orgs/{org}/blocks"],listCustomPropertiesValuesForRepos:["GET /orgs/{org}/properties/values"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOrgRoleTeams:["GET /orgs/{org}/organization-roles/{role_id}/teams"],listOrgRoleUsers:["GET /orgs/{org}/organization-roles/{role_id}/users"],listOrgRoles:["GET /orgs/{org}/organization-roles"],listOrganizationFineGrainedPermissions:["GET /orgs/{org}/organization-fine-grained-permissions"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPatGrantRepositories:["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"],listPatGrantRequestRepositories:["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"],listPatGrantRequests:["GET /orgs/{org}/personal-access-token-requests"],listPatGrants:["GET /orgs/{org}/personal-access-tokens"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listSecurityManagerTeams:["GET /orgs/{org}/security-managers"],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],patchCustomOrganizationRole:["PATCH /orgs/{org}/organization-roles/{role_id}"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeCustomProperty:["DELETE /orgs/{org}/properties/schema/{custom_property_name}"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],removeSecurityManagerTeam:["DELETE /orgs/{org}/security-managers/teams/{team_slug}"],reviewPatGrantRequest:["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"],reviewPatGrantRequestsInBulk:["POST /orgs/{org}/personal-access-token-requests"],revokeAllOrgRolesTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"],revokeAllOrgRolesUser:["DELETE /orgs/{org}/organization-roles/users/{username}"],revokeOrgRoleTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],revokeOrgRoleUser:["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updatePatAccess:["POST /orgs/{org}/personal-access-tokens/{pat_id}"],updatePatAccesses:["POST /orgs/{org}/personal-access-tokens"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listDockerMigrationConflictingPackagesForAuthenticatedUser:["GET /user/docker/conflicts"],listDockerMigrationConflictingPackagesForOrganization:["GET /orgs/{org}/docker/conflicts"],listDockerMigrationConflictingPackagesForUser:["GET /users/{username}/docker/conflicts"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}"],createCard:["POST /projects/columns/{column_id}/cards"],createColumn:["POST /projects/{project_id}/columns"],createForAuthenticatedUser:["POST /user/projects"],createForOrg:["POST /orgs/{org}/projects"],createForRepo:["POST /repos/{owner}/{repo}/projects"],delete:["DELETE /projects/{project_id}"],deleteCard:["DELETE /projects/columns/cards/{card_id}"],deleteColumn:["DELETE /projects/columns/{column_id}"],get:["GET /projects/{project_id}"],getCard:["GET /projects/columns/cards/{card_id}"],getColumn:["GET /projects/columns/{column_id}"],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission"],listCards:["GET /projects/columns/{column_id}/cards"],listCollaborators:["GET /projects/{project_id}/collaborators"],listColumns:["GET /projects/{project_id}/columns"],listForOrg:["GET /orgs/{org}/projects"],listForRepo:["GET /repos/{owner}/{repo}/projects"],listForUser:["GET /users/{username}/projects"],moveCard:["POST /projects/columns/cards/{card_id}/moves"],moveColumn:["POST /projects/columns/{column_id}/moves"],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}"],update:["PATCH /projects/{project_id}"],updateCard:["PATCH /projects/columns/cards/{card_id}"],updateColumn:["PATCH /projects/columns/{column_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],cancelPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"],checkAutomatedSecurityFixes:["GET /repos/{owner}/{repo}/automated-security-fixes"],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentBranchPolicy:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],createDeploymentProtectionRule:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateCustomPropertiesValues:["PATCH /repos/{owner}/{repo}/properties/values"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createOrgRuleset:["POST /orgs/{org}/rulesets"],createPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createRepoRuleset:["POST /repos/{owner}/{repo}/rulesets"],createTagProtection:["POST /repos/{owner}/{repo}/tags/protection"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteDeploymentBranchPolicy:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deleteOrgRuleset:["DELETE /orgs/{org}/rulesets/{ruleset_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteRepoRuleset:["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],deleteTagProtection:["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableDeploymentProtectionRule:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],disablePrivateVulnerabilityReporting:["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enablePrivateVulnerabilityReporting:["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllDeploymentProtectionRules:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getBranchRules:["GET /repos/{owner}/{repo}/rules/branches/{branch}"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getCustomDeploymentProtectionRule:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],getCustomPropertiesValues:["GET /repos/{owner}/{repo}/properties/values"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentBranchPolicy:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getOrgRuleSuite:["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],getOrgRuleSuites:["GET /orgs/{org}/rulesets/rule-suites"],getOrgRuleset:["GET /orgs/{org}/rulesets/{ruleset_id}"],getOrgRulesets:["GET /orgs/{org}/rulesets"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesDeployment:["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getRepoRuleSuite:["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"],getRepoRuleSuites:["GET /repos/{owner}/{repo}/rulesets/rule-suites"],getRepoRuleset:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],getRepoRulesets:["GET /repos/{owner}/{repo}/rulesets"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listActivities:["GET /repos/{owner}/{repo}/activity"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listCustomDeploymentRuleIntegrations:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentBranchPolicies:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTagProtection:["GET /repos/{owner}/{repo}/tags/protection"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateDeploymentBranchPolicy:["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updateOrgRuleset:["PUT /orgs/{org}/rulesets/{ruleset_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateRepoRuleset:["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/secret-scanning/alerts"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]},securityAdvisories:{createFork:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"],createPrivateVulnerabilityReport:["POST /repos/{owner}/{repo}/security-advisories/reports"],createRepositoryAdvisory:["POST /repos/{owner}/{repo}/security-advisories"],createRepositoryAdvisoryCveRequest:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"],getGlobalAdvisory:["GET /advisories/{ghsa_id}"],getRepositoryAdvisory:["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"],listGlobalAdvisories:["GET /advisories"],listOrgRepositoryAdvisories:["GET /orgs/{org}/security-advisories"],listRepositoryAdvisories:["GET /repos/{owner}/{repo}/security-advisories"],updateRepositoryAdvisory:["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],addSocialAccountForAuthenticatedUser:["POST /user/social_accounts"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],createSshSigningKeyForAuthenticatedUser:["POST /user/ssh_signing_keys"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],deleteSocialAccountForAuthenticatedUser:["DELETE /user/social_accounts"],deleteSshSigningKeyForAuthenticatedUser:["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],getSshSigningKeyForAuthenticatedUser:["GET /user/ssh_signing_keys/{ssh_signing_key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],listSocialAccountsForAuthenticatedUser:["GET /user/social_accounts"],listSocialAccountsForUser:["GET /users/{username}/social_accounts"],listSshSigningKeysForAuthenticatedUser:["GET /user/ssh_signing_keys"],listSshSigningKeysForUser:["GET /users/{username}/ssh_signing_keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}};var l=o;var c=new Map;for(const[e,t]of Object.entries(l)){for(const[r,i]of Object.entries(t)){const[t,n,s]=i;const[a,o]=t.split(/ /);const l=Object.assign({method:a,url:o},n);if(!c.has(e)){c.set(e,new Map)}c.get(e).set(r,{scope:e,methodName:r,endpointDefaults:l,decorations:s})}}var p={has({scope:e},t){return c.get(e).has(t)},getOwnPropertyDescriptor(e,t){return{value:this.get(e,t),configurable:true,writable:true,enumerable:true}},defineProperty(e,t,r){Object.defineProperty(e.cache,t,r);return true},deleteProperty(e,t){delete e.cache[t];return true},ownKeys({scope:e}){return[...c.get(e).keys()]},set(e,t,r){return e.cache[t]=r},get({octokit:e,scope:t,cache:r},i){if(r[i]){return r[i]}const n=c.get(t).get(i);if(!n){return void 0}const{endpointDefaults:s,decorations:a}=n;if(a){r[i]=decorate(e,t,i,s,a)}else{r[i]=e.request.defaults(s)}return r[i]}};function endpointsToMethods(e){const t={};for(const r of c.keys()){t[r]=new Proxy({octokit:e,scope:r,cache:{}},p)}return t}function decorate(e,t,r,i,n){const s=e.request.defaults(i);function withDecorations(...i){let a=s.endpoint.merge(...i);if(n.mapToData){a=Object.assign({},a,{data:a[n.mapToData],[n.mapToData]:void 0});return s(a)}if(n.renamed){const[i,s]=n.renamed;e.log.warn(`octokit.${t}.${r}() has been renamed to octokit.${i}.${s}()`)}if(n.deprecated){e.log.warn(n.deprecated)}if(n.renamedParameters){const a=s.endpoint.merge(...i);for(const[i,s]of Object.entries(n.renamedParameters)){if(i in a){e.log.warn(`"${i}" parameter is deprecated for "octokit.${t}.${r}()". Use "${s}" instead`);if(!(s in a)){a[s]=a[i]}delete a[i]}}return s(a)}return s(...i)}return Object.assign(withDecorations,s)}function restEndpointMethods(e){const t=endpointsToMethods(e);return{rest:t}}restEndpointMethods.VERSION=a;function legacyRestEndpointMethods(e){const t=endpointsToMethods(e);return{...t,rest:t}}legacyRestEndpointMethods.VERSION=a;0&&0},537:(e,t,r)=>{"use strict";var i=Object.create;var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.getPrototypeOf;var l=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of a(t))if(!l.call(e,o)&&o!==r)n(e,o,{get:()=>t[o],enumerable:!(i=s(t,o))||i.enumerable})}return e};var __toESM=(e,t,r)=>(r=e!=null?i(o(e)):{},__copyProps(t||!e||!e.__esModule?n(r,"default",{value:e,enumerable:true}):r,e));var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:true}),e);var c={};__export(c,{RequestError:()=>m});e.exports=__toCommonJS(c);var p=r(8932);var d=__toESM(r(1223));var A=(0,d.default)((e=>console.warn(e)));var u=(0,d.default)((e=>console.warn(e)));var m=class extends Error{constructor(e,t,r){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=t;let i;if("headers"in r&&typeof r.headers!=="undefined"){i=r.headers}if("response"in r){this.response=r.response;i=r.response.headers}const n=Object.assign({},r.request);if(r.request.headers.authorization){n.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}n.url=n.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=n;Object.defineProperty(this,"code",{get(){A(new p.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return t}});Object.defineProperty(this,"headers",{get(){u(new p.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));return i||{}}})}};0&&0},6234:(e,t,r)=>{"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let l of s(t))if(!a.call(e,l)&&l!==r)i(e,l,{get:()=>t[l],enumerable:!(o=n(t,l))||o.enumerable})}return e};var __toCommonJS=e=>__copyProps(i({},"__esModule",{value:true}),e);var o={};__export(o,{request:()=>u});e.exports=__toCommonJS(o);var l=r(9440);var c=r(5030);var p="8.1.4";var d=r(3287);var A=r(537);function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){var t,r,i;const n=e.request&&e.request.log?e.request.log:console;const s=((t=e.request)==null?void 0:t.parseSuccessResponseBody)!==false;if((0,d.isPlainObject)(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let a={};let o;let l;let{fetch:c}=globalThis;if((r=e.request)==null?void 0:r.fetch){c=e.request.fetch}if(!c){throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing")}return c(e.url,{method:e.method,body:e.body,headers:e.headers,signal:(i=e.request)==null?void 0:i.signal,...e.body&&{duplex:"half"}}).then((async t=>{l=t.url;o=t.status;for(const e of t.headers){a[e[0]]=e[1]}if("deprecation"in a){const t=a.link&&a.link.match(/<([^>]+)>; rel="deprecation"/);const r=t&&t.pop();n.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${a.sunset}${r?`. See ${r}`:""}`)}if(o===204||o===205){return}if(e.method==="HEAD"){if(o<400){return}throw new A.RequestError(t.statusText,o,{response:{url:l,status:o,headers:a,data:void 0},request:e})}if(o===304){throw new A.RequestError("Not modified",o,{response:{url:l,status:o,headers:a,data:await getResponseData(t)},request:e})}if(o>=400){const r=await getResponseData(t);const i=new A.RequestError(toErrorMessage(r),o,{response:{url:l,status:o,headers:a,data:r},request:e});throw i}return s?await getResponseData(t):t.body})).then((e=>({status:o,url:l,headers:a,data:e}))).catch((t=>{if(t instanceof A.RequestError)throw t;else if(t.name==="AbortError")throw t;let r=t.message;if(t.name==="TypeError"&&"cause"in t){if(t.cause instanceof Error){r=t.cause.message}else if(typeof t.cause==="string"){r=t.cause}}throw new A.RequestError(r,500,{request:e})}))}async function getResponseData(e){const t=e.headers.get("content-type");if(/application\/json/.test(t)){return e.json()}if(!t||/^text\/|charset=utf-8$/.test(t)){return e.text()}return getBufferResponse(e)}function toErrorMessage(e){if(typeof e==="string")return e;if("message"in e){if(Array.isArray(e.errors)){return`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`}return e.message}return`Unknown error: ${JSON.stringify(e)}`}function withDefaults(e,t){const r=e.defaults(t);const newApi=function(e,t){const i=r.merge(e,t);if(!i.request||!i.request.hook){return fetchWrapper(r.parse(i))}const request2=(e,t)=>fetchWrapper(r.parse(r.merge(e,t)));Object.assign(request2,{endpoint:r,defaults:withDefaults.bind(null,r)});return i.request.hook(request2,i)};return Object.assign(newApi,{endpoint:r,defaults:withDefaults.bind(null,r)})}var u=withDefaults(l.endpoint,{headers:{"user-agent":`octokit-request.js/${p} ${(0,c.getUserAgent)()}`}});0&&0},7171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ContextAPI=void 0;const i=r(4118);const n=r(5135);const s=r(1877);const a="context";const o=new i.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,n.registerGlobal)(a,e,s.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...i){return this._getContextManager().with(e,t,r,...i)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,n.getGlobal)(a)||o}disable(){this._getContextManager().disable();(0,n.unregisterGlobal)(a,s.DiagAPI.instance())}}t.ContextAPI=ContextAPI},1877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagAPI=void 0;const i=r(7978);const n=r(9639);const s=r(8077);const a=r(5135);const o="diag";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,a.getGlobal)("diag");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:s.DiagLogLevel.INFO})=>{var i,o,l;if(t===e){const t=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");e.error((i=t.stack)!==null&&i!==void 0?i:t.message);return false}if(typeof r==="number"){r={logLevel:r}}const c=(0,a.getGlobal)("diag");const p=(0,n.createLogLevelDiagLogger)((o=r.logLevel)!==null&&o!==void 0?o:s.DiagLogLevel.INFO,t);if(c&&!r.suppressOverrideMessage){const e=(l=(new Error).stack)!==null&&l!==void 0?l:"";c.warn(`Current logger will be overwritten from ${e}`);p.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,a.registerGlobal)("diag",p,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,a.unregisterGlobal)(o,e)};e.createComponentLogger=e=>new i.DiagComponentLogger(e);e.verbose=_logProxy("verbose");e.debug=_logProxy("debug");e.info=_logProxy("info");e.warn=_logProxy("warn");e.error=_logProxy("error")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},7696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MetricsAPI=void 0;const i=r(2647);const n=r(5135);const s=r(1877);const a="metrics";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,n.registerGlobal)(a,e,s.DiagAPI.instance())}getMeterProvider(){return(0,n.getGlobal)(a)||i.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,n.unregisterGlobal)(a,s.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},9909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PropagationAPI=void 0;const i=r(5135);const n=r(2368);const s=r(865);const a=r(7682);const o=r(8136);const l=r(1877);const c="propagation";const p=new n.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=o.createBaggage;this.getBaggage=a.getBaggage;this.getActiveBaggage=a.getActiveBaggage;this.setBaggage=a.setBaggage;this.deleteBaggage=a.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,i.registerGlobal)(c,e,l.DiagAPI.instance())}inject(e,t,r=s.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=s.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,i.unregisterGlobal)(c,l.DiagAPI.instance())}_getGlobalPropagator(){return(0,i.getGlobal)(c)||p}}t.PropagationAPI=PropagationAPI},1539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceAPI=void 0;const i=r(5135);const n=r(2285);const s=r(9745);const a=r(3326);const o=r(1877);const l="trace";class TraceAPI{constructor(){this._proxyTracerProvider=new n.ProxyTracerProvider;this.wrapSpanContext=s.wrapSpanContext;this.isSpanContextValid=s.isSpanContextValid;this.deleteSpan=a.deleteSpan;this.getSpan=a.getSpan;this.getActiveSpan=a.getActiveSpan;this.getSpanContext=a.getSpanContext;this.setSpan=a.setSpan;this.setSpanContext=a.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,i.registerGlobal)(l,this._proxyTracerProvider,o.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,i.getGlobal)(l)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,i.unregisterGlobal)(l,o.DiagAPI.instance());this._proxyTracerProvider=new n.ProxyTracerProvider}}t.TraceAPI=TraceAPI},7682:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const i=r(7171);const n=r(8242);const s=(0,n.createContextKey)("OpenTelemetry Baggage Key");function getBaggage(e){return e.getValue(s)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(i.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(s,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(s)}t.deleteBaggage=deleteBaggage},4811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},3542:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},8136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const i=r(1877);const n=r(4811);const s=r(3542);const a=i.DiagAPI.instance();function createBaggage(e={}){return new n.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!=="string"){a.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=""}return{__TYPE__:s.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},7393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.context=void 0;const i=r(7171);t.context=i.ContextAPI.getInstance()},4118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopContextManager=void 0;const i=r(8242);class NoopContextManager{active(){return i.ROOT_CONTEXT}with(e,t,r,...i){return t.call(r,...i)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},8242:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const i=new BaseContext(t._currentContext);i._currentContext.set(e,r);return i};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},9721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.diag=void 0;const i=r(1877);t.diag=i.DiagAPI.instance()},7978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagComponentLogger=void 0;const i=r(5135);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return logProxy("debug",this._namespace,e)}error(...e){return logProxy("error",this._namespace,e)}info(...e){return logProxy("info",this._namespace,e)}warn(...e){return logProxy("warn",this._namespace,e)}verbose(...e){return logProxy("verbose",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const n=(0,i.getGlobal)("diag");if(!n){return}r.unshift(t);return n[e](...r)}},3041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!=="function"){r=console.log}if(typeof r==="function"){return r.apply(console,t)}}}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createLogLevelDiagLogger=void 0;const i=r(8077);function createLogLevelDiagLogger(e,t){if(ei.DiagLogLevel.ALL){e=i.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,i){const n=t[r];if(typeof n==="function"&&e>=i){return n.bind(t)}return function(){}}return{error:_filterFunc("error",i.DiagLogLevel.ERROR),warn:_filterFunc("warn",i.DiagLogLevel.WARN),info:_filterFunc("info",i.DiagLogLevel.INFO),debug:_filterFunc("debug",i.DiagLogLevel.DEBUG),verbose:_filterFunc("verbose",i.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},8077:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["ERROR"]=30]="ERROR";e[e["WARN"]=50]="WARN";e[e["INFO"]=60]="INFO";e[e["DEBUG"]=70]="DEBUG";e[e["VERBOSE"]=80]="VERBOSE";e[e["ALL"]=9999]="ALL"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},5163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.trace=t.propagation=t.metrics=t.diag=t.context=t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=t.isValidSpanId=t.isValidTraceId=t.isSpanContextValid=t.createTraceState=t.TraceFlags=t.SpanStatusCode=t.SpanKind=t.SamplingDecision=t.ProxyTracerProvider=t.ProxyTracer=t.defaultTextMapSetter=t.defaultTextMapGetter=t.ValueType=t.createNoopMeter=t.DiagLogLevel=t.DiagConsoleLogger=t.ROOT_CONTEXT=t.createContextKey=t.baggageEntryMetadataFromString=void 0;var i=r(8136);Object.defineProperty(t,"baggageEntryMetadataFromString",{enumerable:true,get:function(){return i.baggageEntryMetadataFromString}});var n=r(8242);Object.defineProperty(t,"createContextKey",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(t,"ROOT_CONTEXT",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var s=r(3041);Object.defineProperty(t,"DiagConsoleLogger",{enumerable:true,get:function(){return s.DiagConsoleLogger}});var a=r(8077);Object.defineProperty(t,"DiagLogLevel",{enumerable:true,get:function(){return a.DiagLogLevel}});var o=r(4837);Object.defineProperty(t,"createNoopMeter",{enumerable:true,get:function(){return o.createNoopMeter}});var l=r(9999);Object.defineProperty(t,"ValueType",{enumerable:true,get:function(){return l.ValueType}});var c=r(865);Object.defineProperty(t,"defaultTextMapGetter",{enumerable:true,get:function(){return c.defaultTextMapGetter}});Object.defineProperty(t,"defaultTextMapSetter",{enumerable:true,get:function(){return c.defaultTextMapSetter}});var p=r(3503);Object.defineProperty(t,"ProxyTracer",{enumerable:true,get:function(){return p.ProxyTracer}});var d=r(2285);Object.defineProperty(t,"ProxyTracerProvider",{enumerable:true,get:function(){return d.ProxyTracerProvider}});var A=r(3209);Object.defineProperty(t,"SamplingDecision",{enumerable:true,get:function(){return A.SamplingDecision}});var u=r(1424);Object.defineProperty(t,"SpanKind",{enumerable:true,get:function(){return u.SpanKind}});var m=r(8845);Object.defineProperty(t,"SpanStatusCode",{enumerable:true,get:function(){return m.SpanStatusCode}});var g=r(6905);Object.defineProperty(t,"TraceFlags",{enumerable:true,get:function(){return g.TraceFlags}});var h=r(2615);Object.defineProperty(t,"createTraceState",{enumerable:true,get:function(){return h.createTraceState}});var E=r(9745);Object.defineProperty(t,"isSpanContextValid",{enumerable:true,get:function(){return E.isSpanContextValid}});Object.defineProperty(t,"isValidTraceId",{enumerable:true,get:function(){return E.isValidTraceId}});Object.defineProperty(t,"isValidSpanId",{enumerable:true,get:function(){return E.isValidSpanId}});var y=r(1760);Object.defineProperty(t,"INVALID_SPANID",{enumerable:true,get:function(){return y.INVALID_SPANID}});Object.defineProperty(t,"INVALID_TRACEID",{enumerable:true,get:function(){return y.INVALID_TRACEID}});Object.defineProperty(t,"INVALID_SPAN_CONTEXT",{enumerable:true,get:function(){return y.INVALID_SPAN_CONTEXT}});const C=r(7393);Object.defineProperty(t,"context",{enumerable:true,get:function(){return C.context}});const b=r(9721);Object.defineProperty(t,"diag",{enumerable:true,get:function(){return b.diag}});const I=r(2601);Object.defineProperty(t,"metrics",{enumerable:true,get:function(){return I.metrics}});const B=r(7591);Object.defineProperty(t,"propagation",{enumerable:true,get:function(){return B.propagation}});const v=r(8989);Object.defineProperty(t,"trace",{enumerable:true,get:function(){return v.trace}});t["default"]={context:C.context,diag:b.diag,metrics:I.metrics,propagation:B.propagation,trace:v.trace}},5135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const i=r(9957);const n=r(8996);const s=r(1522);const a=n.VERSION.split(".")[0];const o=Symbol.for(`opentelemetry.js.api.${a}`);const l=i._globalThis;function registerGlobal(e,t,r,i=false){var s;const a=l[o]=(s=l[o])!==null&&s!==void 0?s:{version:n.VERSION};if(!i&&a[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(a.version!==n.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${n.VERSION}`);r.error(t.stack||t.message);return false}a[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${n.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const i=(t=l[o])===null||t===void 0?void 0:t.version;if(!i||!(0,s.isCompatible)(i)){return}return(r=l[o])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${n.VERSION}.`);const r=l[o];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},1522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const i=r(8996);const n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const i=e.match(n);if(!i){return()=>false}const s={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(s.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const i=e.match(n);if(!i){return _reject(e)}const a={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(a.prerelease!=null){return _reject(e)}if(s.major!==a.major){return _reject(e)}if(s.major===0){if(s.minor===a.minor&&s.patch<=a.patch){return _accept(e)}return _reject(e)}if(s.minor<=a.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(i.VERSION)},2601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.metrics=void 0;const i=r(7696);t.metrics=i.MetricsAPI.getInstance()},9999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ValueType=void 0;var r;(function(e){e[e["INT"]=0]="INT";e[e["DOUBLE"]=1]="DOUBLE"})(r=t.ValueType||(t.ValueType={}))},4837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},2647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const i=r(4837);class NoopMeterProvider{getMeter(e,t,r){return i.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},9957:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});n(r(7200),t)},9406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis==="object"?globalThis:global},7200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});n(r(9406),t)},7591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.propagation=void 0;const i=r(9909);t.propagation=i.PropagationAPI.getInstance()},2368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},8989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.trace=void 0;const i=r(1539);t.trace=i.TraceAPI.getInstance()},1462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NonRecordingSpan=void 0;const i=r(1760);class NonRecordingSpan{constructor(e=i.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},7606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTracer=void 0;const i=r(7171);const n=r(3326);const s=r(1462);const a=r(9745);const o=i.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=o.active()){const i=Boolean(t===null||t===void 0?void 0:t.root);if(i){return new s.NonRecordingSpan}const l=r&&(0,n.getSpanContext)(r);if(isSpanContext(l)&&(0,a.isSpanContextValid)(l)){return new s.NonRecordingSpan(l)}else{return new s.NonRecordingSpan}}startActiveSpan(e,t,r,i){let s;let a;let l;if(arguments.length<2){return}else if(arguments.length===2){l=t}else if(arguments.length===3){s=t;l=r}else{s=t;a=r;l=i}const c=a!==null&&a!==void 0?a:o.active();const p=this.startSpan(e,s,c);const d=(0,n.setSpan)(c,p);return o.with(d,l,undefined,p)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e==="object"&&typeof e["spanId"]==="string"&&typeof e["traceId"]==="string"&&typeof e["traceFlags"]==="number"}},3259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NoopTracerProvider=void 0;const i=r(7606);class NoopTracerProvider{getTracer(e,t,r){return new i.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},3503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracer=void 0;const i=r(7606);const n=new i.NoopTracer;class ProxyTracer{constructor(e,t,r,i){this._provider=e;this.name=t;this.version=r;this.options=i}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,i){const n=this._getTracer();return Reflect.apply(n.startActiveSpan,n,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return n}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},2285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProxyTracerProvider=void 0;const i=r(3503);const n=r(3259);const s=new n.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var n;return(n=this.getDelegateTracer(e,t,r))!==null&&n!==void 0?n:new i.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:s}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},3209:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e["NOT_RECORD"]=0]="NOT_RECORD";e[e["RECORD"]=1]="RECORD";e[e["RECORD_AND_SAMPLED"]=2]="RECORD_AND_SAMPLED"})(r=t.SamplingDecision||(t.SamplingDecision={}))},3326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const i=r(8242);const n=r(1462);const s=r(7171);const a=(0,i.createContextKey)("OpenTelemetry Context Key SPAN");function getSpan(e){return e.getValue(a)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(s.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(a,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(a)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new n.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},2110:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceStateImpl=void 0;const i=r(4864);const n=32;const s=512;const a=",";const o="=";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+o+this.get(t));return e}),[]).join(a)}_parse(e){if(e.length>s)return;this._internalState=e.split(a).reverse().reduce(((e,t)=>{const r=t.trim();const n=r.indexOf(o);if(n!==-1){const s=r.slice(0,n);const a=r.slice(n+1,t.length);if((0,i.validateKey)(s)&&(0,i.validateValue)(a)){e.set(s,a)}else{}}return e}),new Map);if(this._internalState.size>n){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,n))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},4864:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateValue=t.validateKey=void 0;const r="[_0-9a-z-*/]";const i=`[a-z]${r}{0,255}`;const n=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const s=new RegExp(`^(?:${i}|${n})$`);const a=/^[ -~]{0,255}[!-~]$/;const o=/,|=/;function validateKey(e){return s.test(e)}t.validateKey=validateKey;function validateValue(e){return a.test(e)&&!o.test(e)}t.validateValue=validateValue},2615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createTraceState=void 0;const i=r(2110);function createTraceState(e){return new i.TraceStateImpl(e)}t.createTraceState=createTraceState},1760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const i=r(6905);t.INVALID_SPANID="0000000000000000";t.INVALID_TRACEID="00000000000000000000000000000000";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:i.TraceFlags.NONE}},1424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SpanKind=void 0;var r;(function(e){e[e["INTERNAL"]=0]="INTERNAL";e[e["SERVER"]=1]="SERVER";e[e["CLIENT"]=2]="CLIENT";e[e["PRODUCER"]=3]="PRODUCER";e[e["CONSUMER"]=4]="CONSUMER"})(r=t.SpanKind||(t.SpanKind={}))},9745:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const i=r(1760);const n=r(1462);const s=/^([0-9a-f]{32})$/i;const a=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return s.test(e)&&e!==i.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return a.test(e)&&e!==i.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new n.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},8845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e["UNSET"]=0]="UNSET";e[e["OK"]=1]="OK";e[e["ERROR"]=2]="ERROR"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},6905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e["NONE"]=0]="NONE";e[e["SAMPLED"]=1]="SAMPLED"})(r=t.TraceFlags||(t.TraceFlags={}))},8996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.4.1"},4812:(e,t,r)=>{e.exports={parallel:r(8210),serial:r(445),serialOrdered:r(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,t,r)=>{var i=r(5295);e.exports=async;function async(e){var t=false;i((function(){t=true}));return function async_callback(r,n){if(t){e(r,n)}else{i((function nextTick_callback(){e(r,n)}))}}}},5295:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},9023:(e,t,r)=>{var i=r(2794),n=r(1700);e.exports=iterate;function iterate(e,t,r,i){var s=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[s]=runJob(t,s,e[s],(function(e,t){if(!(s in r.jobs)){return}delete r.jobs[s];if(e){n(r)}else{r.results[s]=t}i(e,r.results)}))}function runJob(e,t,r,n){var s;if(e.length==2){s=e(r,i(n))}else{s=e(r,t,i(n))}return s}},2474:e=>{e.exports=state;function state(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){i.keyedList.sort(r?t:function(r,i){return t(e[r],e[i])})}return i}},7942:(e,t,r)=>{var i=r(1700),n=r(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;i(this);n(e)(null,this.results)}},8210:(e,t,r)=>{var i=r(9023),n=r(2474),s=r(7942);e.exports=parallel;function parallel(e,t,r){var a=n(e);while(a.index<(a["keyedList"]||e).length){i(e,t,a,(function(e,t){if(e){r(e,t);return}if(Object.keys(a.jobs).length===0){r(null,a.results);return}}));a.index++}return s.bind(a,r)}},445:(e,t,r)=>{var i=r(3578);e.exports=serial;function serial(e,t,r){return i(e,t,null,r)}},3578:(e,t,r)=>{var i=r(9023),n=r(2474),s=r(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,r,a){var o=n(e,r);i(e,t,o,(function iteratorHandler(r,n){if(r){a(r,n);return}o.index++;if(o.index<(o["keyedList"]||e).length){i(e,t,o,iteratorHandler);return}a(null,o.results)}));return s.bind(o,a)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},9417:e=>{"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,s,a,o;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var p=l;if(l>=0&&c>0){if(e===t){return[l,c]}i=[];s=r.length;while(p>=0&&!o){if(p==l){i.push(p);l=r.indexOf(e,p+1)}else if(i.length==1){o=[i.pop(),c]}else{n=i.pop();if(n=0?l:c}if(i.length){o=[s,a]}}return o}},3682:(e,t,r)=>{var i=r(4670);var n=r(5549);var s=r(6819);var a=Function.bind;var o=a.bind(a);function bindApi(e,t,r){var i=o(s,null).apply(null,r?[t,r]:[t]);e.api={remove:i};e.remove=i;["before","error","after","wrap"].forEach((function(i){var s=r?[t,i,r]:[t,i];e[i]=e.api[i]=o(n,null).apply(null,s)}))}function HookSingular(){var e="h";var t={registry:{}};var r=i.bind(null,t,e);bindApi(r,t,e);return r}function HookCollection(){var e={registry:{}};var t=i.bind(null,e);bindApi(t,e);return t}var l=false;function Hook(){if(!l){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');l=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},5549:e=>{e.exports=addHook;function addHook(e,t,r,i){var n=i;if(!e.registry[r]){e.registry[r]=[]}if(t==="before"){i=function(e,t){return Promise.resolve().then(n.bind(null,t)).then(e.bind(null,t))}}if(t==="after"){i=function(e,t){var r;return Promise.resolve().then(e.bind(null,t)).then((function(e){r=e;return n(r,t)})).then((function(){return r}))}}if(t==="error"){i=function(e,t){return Promise.resolve().then(e.bind(null,t)).catch((function(e){return n(e,t)}))}}e.registry[r].push({hook:i,orig:n})}},4670:e=>{e.exports=register;function register(e,t,r,i){if(typeof r!=="function"){throw new Error("method for before hook must be a function")}if(!i){i={}}if(Array.isArray(t)){return t.reverse().reduce((function(t,r){return register.bind(null,e,r,t,i)}),r)()}return Promise.resolve().then((function(){if(!e.registry[t]){return r(i)}return e.registry[t].reduce((function(e,t){return t.hook.bind(null,e,i)}),r)()}))}},6819:e=>{e.exports=removeHook;function removeHook(e,t,r){if(!e.registry[t]){return}var i=e.registry[t].map((function(e){return e.orig})).indexOf(r);if(i===-1){return}e.registry[t].splice(i,1)}},3717:(e,t,r)=>{var i=r(6891);var n=r(9417);e.exports=expandTop;var s="\0SLASH"+Math.random()+"\0";var a="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var l="\0COMMA"+Math.random()+"\0";var c="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(s).split("\\{").join(a).split("\\}").join(o).split("\\,").join(l).split("\\.").join(c)}function unescapeBraces(e){return e.split(s).join("\\").split(a).join("{").split(o).join("}").split(l).join(",").split(c).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var s=r.body;var a=r.post;var o=i.split(",");o[o.length-1]+="{"+s+"}";var l=parseCommaParts(a);if(a.length){o[o.length-1]+=l.shift();o.push.apply(o,l)}t.push.apply(t,o);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var s=n("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body);var l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body);var c=a||l;var p=s.body.indexOf(",")>=0;if(!c&&!p){if(s.post.match(/,.*\}/)){e=s.pre+"{"+s.body+o+s.post;return expand(e)}return[e]}var d;if(c){d=s.body.split(/\.\./)}else{d=parseCommaParts(s.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){var A=s.post.length?expand(s.post,false):[""];return A.map((function(e){return s.pre+d[0]+e}))}}}var u=s.pre;var A=s.post.length?expand(s.post,false):[""];var m;if(c){var g=numeric(d[0]);var h=numeric(d[1]);var E=Math.max(d[0].length,d[1].length);var y=d.length==3?Math.abs(numeric(d[2])):1;var C=lte;var b=h0){var w=new Array(Q+1).join("0");if(B<0)v="-"+w+v.slice(1);else v=w+v}}}m.push(v)}}else{m=i(d,(function(e){return expand(e,false)}))}for(var x=0;x{var i=r(3837);var n=r(2781).Stream;var s=r(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}i.inherits(CombinedStream,n);CombinedStream.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof s)){var r=s.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){n.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};CombinedStream.prototype.end=function(){this._reset();this.emit("end")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},6891:e=>{e.exports=function(e,r){var i=[];for(var n=0;n{var i=r(2781).Stream;var n=r(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}n.inherits(DelayedStream,i);DelayedStream.create=function(e,t){var r=new this;t=t||{};for(var i in t){r[i]=t[i]}r.source=e;var n=e.emit;e.emit=function(){r._handleEmit(arguments);return n.apply(e,arguments)};e.on("error",(function(){}));if(r.pauseStream){e.pause()}return r};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=i.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},8932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class Deprecation extends Error{constructor(e){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="Deprecation"}}t.Deprecation=Deprecation},3287:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true}); /*! * is-plain-object * diff --git a/dist/index.js.map b/dist/index.js.map index 720ff680..01933c33 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","slice","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","trimEnd","toUpperCase","isGitHubHost","isGheHost","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties","getProperties","maxSegmentSize","constants","MAX_LENGTH","downloadProgress","controller","AbortController","abortSignal","signal","segmentStart","segmentTimeoutInMs","downloadToBuffer","abort","Buffer","isBuffer","writeFileSync","timeoutMs","promise","timeoutPromise","retry","isRetryableStatusCode","isServerErrorStatusCode","retryableStatusCodes","HttpCodes","BadGateway","ServiceUnavailable","GatewayTimeout","sleep","milliseconds","method","getStatusCode","maxAttempts","delay","onError","errorMessage","attempt","isRetryable","HttpClientError","exec_1","fs_1","getTarPath","gnuTar","systemTar","GNU","BSD","getTarArgs","tarPath","args","cacheFileName","tarFile","workingDirectory","getWorkingDirectory","BSD_TAR_ZSTD","getCommands","tarArgs","compressionArgs","getDecompressionProgram","getCompressionProgram","execCommands","commands","command","assign","MSYS","split","sourceDirectories","copy","segmentDownloadTimeoutMins","isFinite","v1","uuid","module","byteToHex","substr","bytesToUuid","buf","bth","nodeRNG","randomBytes","rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","b","node","clockseq","seedBytes","msecs","getTime","nsecs","dt","tl","tmh","rnds","random","ii","issue","issueCommand","os","utils_1","cmd","Command","EOL","CMD_STRING","cmdStr","first","val","escapeProperty","escapeData","s","toCommandValue","getIDToken","getState","saveState","group","endGroup","startGroup","notice","setFailed","setCommandEcho","setOutput","getBooleanInput","getMultilineInput","getInput","addPath","exportVariable","ExitCode","command_1","file_command_1","oidc_utils_1","convertedVal","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","required","trimWhitespace","inputs","filter","x","input","trueValue","falseValue","enabled","exitCode","Failure","toCommandProperties","fn","aud","OidcClient","summary_1","summary","summary_2","markdownSummary","path_utils_1","toPosixPath","toWin32Path","toPlatformPath","appendFileSync","encoding","convertedValue","core_1","allowRetry","maxRetry","allowRetries","maxRetries","getRequestToken","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","catch","id_token","audience","encodedAudience","pth","SUMMARY_DOCS_URL","SUMMARY_ENV_VAR","os_1","access","appendFile","writeFile","Summary","_buffer","_filePath","pathFromEnv","R_OK","W_OK","wrap","tag","content","attrs","htmlAttrs","entries","overwrite","writeFunc","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","allowedTag","addSeparator","addBreak","addQuote","cite","addLink","href","_summary","String","annotationProperties","title","line","startLine","endLine","col","startColumn","endColumn","_v","default","_v2","_v3","_v4","_nil","_version","_validate","_stringify","_parse","_interopRequireDefault","obj","_crypto","md5","bytes","isArray","from","_default","parse","arr","Uint8Array","rnds8Pool","poolPtr","randomFillSync","sha1","_rng","_md","v3","DNS","stringToBytes","str","unescape","charCodeAt","hashfunc","generateUUID","namespace","set","_sha","v5","_regex","validate","getExecOutput","string_decoder_1","tr","commandLine","commandArgs","argStringToArray","toolPath","concat","runner","ToolRunner","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","stdErrListener","stdOutListener","events","child","ioUtil","timers_1","EventEmitter","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","a","windowsVerbatimArguments","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","indexOf","substring","argline","_endsWith","upperToolPath","arg","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","char","some","quoteHit","_cloneExecOptions","failOnStdErr","outStream","errStream","_getSpawnOptions","argv0","isRooted","optionsNonNull","state","ExecState","exists","fileName","cp","spawn","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","emit","removeAllListeners","stdin","argString","inQuotes","escaped","append","c","charAt","_setResult","HandleTimeout","Context","payload","GITHUB_EVENT_PATH","readFileSync","eventName","GITHUB_EVENT_NAME","sha","GITHUB_SHA","ref","GITHUB_REF","workflow","GITHUB_WORKFLOW","action","GITHUB_ACTION","actor","GITHUB_ACTOR","job","GITHUB_JOB","runNumber","GITHUB_RUN_NUMBER","runId","GITHUB_RUN_ID","apiUrl","GITHUB_API_URL","serverUrl","GITHUB_SERVER_URL","graphqlUrl","GITHUB_GRAPHQL_URL","repo","number","pull_request","GITHUB_REPOSITORY","owner","repository","login","getOctokit","context","additionalPlugins","GitHubWithPlugins","GitHub","plugin","getOctokitOptions","getApiBaseUrl","getProxyFetch","getProxyAgentDispatcher","getProxyAgent","getAuthString","undici_1","auth","destinationUrl","hc","getAgent","getAgentDispatcher","httpDispatcher","proxyFetch","opts","fetch","dispatcher","defaults","Utils","plugin_rest_endpoint_methods_1","plugin_paginate_rest_1","agent","Octokit","restEndpointMethods","paginateRest","internal_globber_1","DefaultGlobber","getOptions","followSymbolicLinks","omitBrokenSymbolicLinks","__await","__asyncGenerator","g","q","resume","r","fulfill","f","shift","globOptionsHelper","patternHelper","internal_match_kind_1","internal_pattern_1","internal_search_state_1","searchPaths","getSearchPaths","itemPath","arguments","globGenerator_1","pattern","trailingSeparator","segments","Pattern","negate","stack","searchPath","lstat","unshift","SearchState","traversalChain","match","partialMatch","stats","stat","isDirectory","MatchKind","Directory","childLevel","childItems","readdir","File","lines","startsWith","realPath","realpath","__importDefault","safeTrimTrailingSeparator","normalizeSeparators","hasRoot","hasAbsoluteRoot","ensureAbsoluteRoot","dirname","assert_1","p","root","isUnc","Path","pathHelper","remaining","dir","basename","skipSlash","searchPathMap","foundAncestor","tempKey","parent","None","minimatch_1","internal_path_1","patternOrNegate","isImplicitPattern","homedir","getLiteral","fixupPattern","foundGlob","searchSegments","rootRegExp","regExpEscape","minimatchOptions","dot","nobrace","nocase","nocomment","noext","nonegate","minimatch","Minimatch","All","matchOne","globEscape","literalSegments","every","literal","closed","i2","c2","PersonalAccessTokenCredentialHandler","BasicCredentialHandler","username","password","prepareRequest","canHandleAuthentication","handleAuthentication","isHttps","HttpClientResponse","getProxyUrl","MediaTypes","Headers","http","https","pm","tunnel","proxyUrl","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","RetryableHttpVerbs","ExponentialBackoffCeiling","ExponentialBackoffTimeSlice","readBody","alloc","chunk","chunks","requestUrl","parsedUrl","protocol","userAgent","handlers","_ignoreSslError","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_keepAlive","_disposed","ignoreSslError","_socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","max","del","post","patch","put","head","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","ContentType","putJson","patchJson","_prepareRequest","maxTries","numTries","requestRaw","Unauthorized","authenticationHandler","handler","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","_agent","callbackForResult","requestRawWithCallback","onResult","byteLength","callbackCalled","handleResult","req","httpModule","msg","sock","pipe","_getAgent","useProxy","_getProxyAgentDispatcher","usingSsl","defaultPort","host","port","pathname","search","_mergeHeaders","lowercaseKeys","clientHeader","_proxyAgent","maxSockets","globalAgent","agentOptions","proxy","proxyAuth","tunnelAgent","overHttps","httpsOverHttps","httpsOverHttp","httpOverHttps","httpOverHttp","Agent","rejectUnauthorized","proxyAgent","_proxyAgentDispatcher","ProxyAgent","uri","pipelining","requestTls","retryNumber","ms","pow","NotFound","dateTimeDeserializer","valueOf","contents","deserializeDates","reduce","checkBypass","reqUrl","proxyVar","reqHost","isLoopbackAddress","noProxy","reqPort","upperReqHosts","upperNoProxyItem","hostLower","getCmdPath","tryGetExecutablePath","READONLY","UV_FS_O_EXLOCK","symlink","rmdir","rm","rename","readlink","mkdir","copyFile","chmod","O_RDONLY","fsPath","useStat","extensions","console","log","isFile","upperExt","extname","validExt","isUnixExecutable","originalFilePath","extension","directory","upperName","actualName","mode","gid","getgid","uid","getuid","findInPath","rmRF","mv","source","force","recursive","copySourceDirectory","readCopyOptions","destStat","newDest","sourceStat","cpDirRecursive","destExists","retryDelay","ok","tool","check","matches","directories","PATH","Boolean","sourceDir","destDir","currentDepth","files","srcFile","destFile","srcFileStat","isSymbolicLink","symlinkFull","_readLinuxVersionFile","_getOsVersion","_findMatch","versionSpec","stable","candidates","archFilter","platFilter","candidate","satisfies","find","arch","chk","platform_version","osVersion","plat","execSync","lsbContents","parts","lsbReleaseFile","osReleaseFile","RetryHelper","minSeconds","maxSeconds","floor","execute","seconds","getSleepAmount","evaluateVersions","isExplicitVersion","findFromManifest","getManifestFromRepo","findAllVersions","cacheFile","cacheDir","extractZip","extractXar","extract7z","downloadTool","HTTPError","mm","httpm","v4_1","retry_helper_1","httpStatusCode","IS_MAC","_getTempDirectory","_getGlobal","retryHelper","downloadToolAttempt","authorization","statusMessage","responseMessageFactory","readStream","succeeded","_7zPath","_createExtractFolder","originalCwd","chdir","logLevel","escapedScript","__dirname","escapedFile","escapedTarget","powershellPath","flags","isGnuTar","destArg","fileArg","xarPath","_unique","extractZipWin","extractZipNix","escapedDest","pwshPath","pwshCommand","powershellCommand","unzipPath","destPath","_createToolPath","itemName","readdirSync","_completeToolPath","sourceFile","targetFile","destFolder","toolName","localVersions","cachePath","_getCacheDirectory","versions","children","fullPath","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","manifest","folderPath","markerPath","valid","sort","gt","potential","satisfied","cacheDirectory","defaultValue","global","Set","listenersMap","WeakMap","abortedMap","AbortSignal","onabort","aborted","has","none","addEventListener","_type","listener","removeEventListener","index","splice","dispatchEvent","_event","forEach","AbortError","parentSignals","_signal","parentSignal","timer","unref","AzureKeyCredential","_key","newKey","isDefined","thing","isObjectWithProperties","property","objectHasProperty","AzureNamedKeyCredential","_name","newName","isNamedKeyCredential","credential","AzureSASCredential","signature","_signature","newSignature","isSASCredential","isTokenCredential","castCredential","getToken","signRequest","tslib","xml2js","coreUtil","logger$1","coreAuth","abortController","FormData","node_fetch","coreTracing","_interopDefaultLegacy","_interopNamespace","freeze","xml2js__namespace","os__namespace","http__namespace","https__namespace","tunnel__namespace","FormData__default","node_fetch__default","getHeaderKey","headerName","isHttpHeadersLike","object","castObject","rawHeaders","clone","contains","remove","headersArray","headerValues","headerNames","toJson","HttpHeaders","_headersMap","headerValue","preserveCase","headerKey","resultPreservingCasing","encodeString","encodeByteArray","bufferValue","decodeString","Constants","coreHttpVersion","HTTP","HTTPS","HTTP_PROXY","HTTPS_PROXY","NO_PROXY","ALL_PROXY","HttpConstants","HttpVerbs","PUT","GET","DELETE","POST","MERGE","HEAD","PATCH","StatusCodes","TooManyRequests","HeaderConstants","AUTHORIZATION","AUTHORIZATION_SCHEME","RETRY_AFTER","USER_AGENT","XML_ATTRKEY","XML_CHARKEY","validUuidRegex","encodeUri","stripResponse","strippedResponse","body","bodyAsText","status","stripRequest","strippedRequest","isValidUuid","generateUuid","executePromisesSequentially","promiseFactories","kickstart","promiseFactory","promiseToCallback","cb","promiseToServiceCallback","nextTick","parsedBody","prepareXMLRootList","elementName","xmlNamespaceKey","xmlNamespace","applyMixins","targetCtorParam","sourceCtors","castTargetCtorParam","sourceCtor","getOwnPropertyNames","validateISODuration","isDuration","replaceAll","searchValue","replaceValue","isPrimitiveType","getEnvironmentValue","isObject","Serializer","modelMappers","isXML","validateConstraints","mapper","objectName","failValidation","constraintName","constraintValue","constraints","valueAsNumber","ExclusiveMaximum","ExclusiveMinimum","InclusiveMaximum","InclusiveMinimum","MaxItems","MaxLength","MinItems","MinLength","MultipleOf","UniqueItems","valueAsArray","ar","serialize","updatedOptions","rootName","includeRoot","xmlCharKey","mapperType","serializedName","isConstant","nullable","serializeBasicTypes","enumMapper","serializeEnumType","allowedValues","serializeDateTypes","serializeByteArrayType","serializeBase64UrlType","serializeSequenceType","serializeDictionaryType","serializeCompositeType","deserialize","responseBody","xmlIsWrapped","deserializeCompositeType","castResponseBody","parseFloat","unixTimeToDate","base64UrlToByteArray","deserializeSequenceType","deserializeDictionaryType","ch","len","bufferToBase64Url","splitSerializeName","prop","classes","partialclass","subwords","dateToUnixTime","typeName","objectType","ArrayBuffer","isView","Blob","isPresent","returnValue","toISOString","toUTCString","serializer","isXml","elementType","tempArray","serializedValue","xmlnsKey","xmlNamespacePrefix","valueType","tempDictionary","getXmlObjectValue","resolveAdditionalProperties","additionalProperties","className","modelMapper","resolveReferencedMapper","resolveModelProperties","modelProps","modelProperties","getPolymorphicDiscriminatorRecursively","getPolymorphicMapper","propertyMapper","readOnly","propName","parentObject","xmlName","xmlElementName","pathName","childObject","propertyObjectName","toSerialize","polymorphicDiscriminator","clientName","xmlIsAttribute","additionalPropertiesMapper","propNames","clientPropName","isAdditionalProperty","pn","isSpecialXmlProperty","propertyName","instance","handledPropertyNames","headerCollectionPrefix","dictionary","xmlIsMsText","wrapped","elementList","propertyInstance","arrayInstance","responsePropName","polymorphicPropertyName","discriminatorName","discriminatorValue","uberParent","indexDiscriminator","polymorphicMapper","discriminators","getPolymorphicDiscriminatorSafely","serializeObject","castToSerialize","array","strEnum","MapperType","isWebResourceLike","validateRequestProperties","prepare","WebResource","query","streamResponseBody","withCredentials","onUploadProgress","onDownloadProgress","proxySettings","decompressResponse","streamResponseStatusCodes","formData","requestId","pathTemplate","validMethods","pathParameters","pathParamName","pathParam","stringifiedPathParameters","skipUrlEncoding","queryParameters","queryParams","queryParamName","queryParam","disableClientRequestId","bodyIsStream","serializationMapper","mappers","disableJsonStringifyOnBody","spanOptions","tracingContext","operationSpec","shouldDeserialize","operationResponseGetter","URLQuery","_rawQuery","any","parameterName","parameterValue","caseParameterValue","newValue","parameterStrings","parameterValueElement","currentState","currentCharacter","URLBuilder","setScheme","scheme","_scheme","getScheme","setHost","_host","getHost","setPort","_port","getPort","setPath","_path","schemeIndex","schemeStart","lastIndexOf","appendPath","currentPath","getPath","setQuery","_query","setQueryParameter","queryParameterName","queryParameterValue","getQueryParameterValue","getQuery","startState","tokenizer","URLTokenizer","current","tokenPath","URLToken","isAlphaNumericCharacter","character","characterCode","_text","_textLength","_currentState","_currentIndex","_currentToken","hasCurrentCharacter","nextScheme","nextSchemeOrHost","nextHost","nextPort","nextPath","nextQuery","readRemaining","getCurrentCharacter","nextCharacter","peekCharacters","charactersToPeek","endIndex","readWhile","condition","readWhileLetterOrDigit","readUntilCharacter","terminatingCharacters","schemeOrHost","createProxyAgent","isValidPort","tunnelOptions","isRequestHttps","isUrlHttps","isProxyHttps","createTunnel","urlScheme","RedactedString","defaultAllowedHeaderNames","defaultAllowedQueryParameters","Sanitizer","allowedHeaderNames","allowedQueryParameters","sanitize","seen","sanitizeHeaders","sanitizeUrl","sanitizeQuery","add","sanitizeObject","allowedKeys","accessor","sanitized","urlBuilder","queryString","custom","inspect","errorSanitizer","RestError","REQUEST_SEND_ERROR","PARSE_ERROR","logger","createClientLogger","getCachedAgent","agentCache","httpsAgent","httpAgent","ReportTransform","Transform","progressCallback","_transform","_encoding","callback","isReadableStream","isStreamComplete","aborter","once","parseHeaders","httpHeaders","NodeFetchHttpClient","proxyAgentMap","Map","keepAliveAgents","sendRequest","httpRequest","abortController$1","abortListener","event","requestForm","appendFormValue","formKey","formValue","j","contentType","getBoundary","uploadReportStream","platformSpecificRequestInit","requestInit","redirect","operationResponse","streaming","readableStreamBody","downloadReportStream","processRequest","fetchError","uploadStreamDone","downloadStreamDone","getOrCreateAgent","proxyAgents","init","compress","_operationResponse","HttpPipelineLogLevel","operationOptionsToRequestOptionsBase","tracingOptions","additionalOptions","__rest","BaseRequestPolicy","_nextPolicy","_options","shouldLog","RequestPolicyOptions","_logger","OFF","minimumLogLevel","xml2jsDefaultOptionsV2","explicitCharkey","normalize","normalizeTags","attrkey","explicitArray","ignoreAttrs","mergeAttrs","explicitRoot","validator","xmlns","explicitChildren","preserveChildrenOrder","childkey","charsAsChildren","includeWhiteChars","async","strict","attrNameProcessors","attrValueProcessors","tagNameProcessors","valueProcessors","xmldec","standalone","doctype","renderOpts","pretty","indent","newline","headless","emptyTag","cdata","xml2jsParserSettings","xml2jsBuilderSettings","stringifyXML","charkey","builder","Builder","buildObject","parseXML","xmlParser","Parser","parseString","deserializationPolicy","deserializationContentTypes","parsingOptions","nextPolicy","DeserializationPolicy","defaultJsonContentTypes","defaultXmlContentTypes","DefaultDeserializationOptions","expectedContentTypes","json","xml","requestPolicyOptions","jsonContentTypes","xmlContentTypes","deserializeResponseBody","getOperationResponse","parsedResponse","responses","shouldDeserializeResponse","responseSpec","shouldReturnResponse","handleErrorResponse","bodyMapper","valueToDeserialize","Sequence","innerError","restError","httpMethod","headersMapper","parsedHeaders","isOperationSpecEmpty","expectedStatusCodes","isSuccessByStatus","isExpectedStatusCode","isError","errorResponseSpec","initialErrorMessage","defaultBodyMapper","defaultHeadersMapper","parsedError","internalError","defaultError","errorHandler","errCode","contentComponents","component","DefaultKeepAliveOptions","enable","keepAlivePolicy","keepAliveOptions","KeepAlivePolicy","allowedRedirect","DefaultRedirectOptions","handleRedirects","redirectPolicy","maximumRetries","RedirectPolicy","handleRedirect","policy","currentRetries","locationHeader","DEFAULT_CLIENT_RETRY_COUNT","DEFAULT_CLIENT_RETRY_INTERVAL","DEFAULT_CLIENT_MAX_RETRY_INTERVAL","DEFAULT_CLIENT_MIN_RETRY_INTERVAL","isNumber","shouldRetry","retryLimit","predicate","retryData","retryCount","updateRetryData","retryInterval","incrementDelta","boundedRandDelta","minRetryInterval","maxRetryInterval","exponentialRetryPolicy","ExponentialRetryPolicy","RetryMode","DefaultRetryOptions","retryDelayInMs","maxRetryDelayInMs","retry$1","requestError","shouldPolicyRetry","responseParam","isAborted","logPolicy","loggingOptions","LogPolicy","sanitizer","logRequest","logResponse","getPathStringFromParameter","parameter","getPathStringFromParameterPath","parameterPath","getStreamResponseStatusCodes","Stream","getDefaultUserAgentKey","getPlatformSpecificData","runtimeInfo","osInfo","release","getRuntimeInfo","msRestRuntime","getUserAgentString","telemetryInfo","keySeparator","valueSeparator","getDefaultUserAgentHeaderName","getDefaultUserAgentValue","platformSpecificData","userAgentPolicy","userAgentData","UserAgentPolicy","addUserAgentHeader","QueryCollectionFormat","DEFAULT_CYCLER_OPTIONS","forcedRefreshWindowInMs","retryIntervalInMs","refreshWindowInMs","beginRefresh","getAccessToken","tryGetAccessToken","finalToken","createTokenCycler","scopes","tokenCyclerOptions","refreshWorker","cycler","isRefreshing","shouldRefresh","expiresOnTimestamp","mustRefresh","refresh","getTokenOptions","_token","reason","tokenOptions","bearerTokenAuthenticationPolicy","BearerTokenAuthenticationPolicy","webResource","disableResponseDecompressionPolicy","DisableResponseDecompressionPolicy","generateClientRequestIdPolicy","requestIdHeaderName","GenerateClientRequestIdPolicy","_requestIdHeaderName","cachedHttpClient","getCachedDefaultHttpClient","ndJsonPolicy","NdJsonPolicy","globalNoProxyList","noProxyListLoaded","globalBypassedMap","loadEnvironmentProxyValue","httpsProxy","allProxy","httpProxy","isBypassed","noProxyList","bypassedMap","isBypassedFlag","loadNoProxy","getDefaultProxySettings","urlWithoutAuth","extractAuthFromUrl","schema","proxyPolicy","ProxyPolicy","customNoProxyList","atIndex","authStart","colonIndex","hasPassword","rpRegistrationPolicy","retryTimeout","RPRegistrationPolicy","_retryTimeout","registerIfNeeded","rpName","checkRPNotRegisteredError","urlPrefix","extractSubscriptionUrl","registerRP","registrationStatus","getRequestEssentials","originalRequest","reuseUrlToo","reqOptions","matchRes","provider","postUrl","getUrl","getRegistrationStatus","registrationState","signingPolicy","authenticationProvider","SigningPolicy","nextRequest","systemErrorRetryPolicy","SystemErrorRetryPolicy","_response","nestedErr","DEFAULT_CLIENT_MAX_RETRY_COUNT","throttlingRetryPolicy","ThrottlingRetryPolicy","StandardAbortMessage","_handleResponse","numberOfRetries","_defaultResponseHandler","httpResponse","retryAfterHeader","parseRetryAfterHeader","abortErrorMsg","retryAfterInSeconds","parseDateRetryAfterHeader","date","diff","createSpan","createSpanFunction","packagePrefix","tracingPolicy","TracingPolicy","span","tryCreateSpan","tryProcessResponse","tryProcessError","kind","SpanKind","CLIENT","isRecording","namespaceFromContext","getValue","for","setAttribute","setAttributes","spanContext","traceParentHeader","getTraceParentHeader","isSpanContextValid","traceState","setStatus","SpanStatusCode","ERROR","serviceRequestId","OK","ServiceClient","credentials","_withCredentials","_httpClient","_requestPolicyOptions","httpPipelineLogger","requestPolicyFactories","authPolicyFactory","wrappedPolicyFactory","bearerTokenPolicyFactory","serviceClient","serviceClientOptions","createOptions","credentialScopes","getCredentialScopes","baseUri","createDefaultRequestPolicyFactories","newRequestPolicyFactories","_requestPolicyFactories","httpPipeline","sendOperationRequest","operationArguments","serializerOptions","urlParameters","urlParameter","urlParameterValue","getOperationArgumentValueFromParameter","skipEncoding","queryParameter","collectionFormat","Multi","Ssv","Tsv","requestContentType","requestBody","headerParameters","headerParameter","customHeaders","customHeaderName","serializeRequestBody","rawResponse","sendRequestError","details","flattenResponse","requestBodyParameterPathString","isStream","getXmlValueWithNamespace","mediaType","formDataParameters","formDataParameter","formDataParameterValue","formDataParameterPropertyName","getValueOrFunctionResult","defaultValueCreator","factories","generateClientRequestIdHeader","clientRequestIdHeaderName","userAgentHeaderName","userAgentHeaderValue","rpRegistrationRetryTimeout","noRetryPolicy","isNode","createPipelineFromOptions","pipelineOptions","sendStreamingJson","userAgentValue","userAgentOptions","userAgentPrefix","userAgentInfo","defaultUserAgentInfo","redirectOptions","proxyOptions","deserializationOptions","getOperationArgumentValueFromParameterPath","parameterMapper","propertySearchResult","getPropertyFromParameterPath","propertyFound","useDefaultValue","propertyValue","parameterPathString","propertyPath","propertyPathString","parameterPathPart","addOperationResponse","blobBody","isPageableResponse","arrayResponse","TokenRefreshBufferMs","ExpiringAccessTokenCache","tokenRefreshBufferMs","cachedToken","setCachedToken","accessToken","getCachedToken","AccessTokenRefresher","requiredMillisecondsBeforeNewRefresh","lastCalled","isReady","DEFAULT_AUTHORIZATION_SCHEME","BasicAuthenticationCredentials","userName","authorizationScheme","encodedCredentials","ApiKeyCredentials","inHeader","inQuery","TopicCredentials","topicKey","DefaultHttpClient","CombinedStream","parseUrl","mime","asynckit","populate","inherits","_overheadLength","_valueLength","_valuesToMeasure","option","LINE_BREAK","DEFAULT_CONTENT_TYPE","field","filename","bind","_error","_multiPartHeader","footer","_multiPartFooter","_trackLength","valueLength","knownLength","readable","_lengthRetriever","Infinity","pause","contentDisposition","_getContentDisposition","_getContentType","filepath","_httpMessage","lookup","lastPart","_streams","_lastBoundary","getHeaders","userHeaders","formHeaders","setBoundary","boundary","_boundary","_generateBoundary","getBuffer","dataBuffer","getLengthSync","hasKnownLength","getLength","parallel","submit","params","setHeader","onResponse","responce","removeListener","dst","POLL_INTERVAL_IN_MS","terminalStates","deserializeState","serializedState","setStateError","stateProxy","isOperationError","setError","appendReadableErrorMessage","currentMessage","innerMessage","simplifyError","curErr","innererror","processOperationStatus","processResult","getError","setErrorAsResult","setSucceeded","postfix","errStr","setCanceled","setResult","buildResult","initOperation","getOperationStatus","withOperationLocation","operationLocation","resourceLocation","metadata","config","verbose","initState","pollOperationHelper","poll","getResourceLocation","pollOperation","getOperationLocation","getPollingInterval","updateState","setDelay","intervalInMs","location","isUpdated","getOperationLocationPollingUrl","azureAsyncOperation","getLocationHeader","getOperationLocationHeader","getAzureAsyncOperationHeader","findResourceLocation","requestMethod","requestPath","resourceLocationConfig","inferLroMode","pollingUrl","normalizedRequestMethod","toLocaleUpperCase","transformStatus","toLocaleLowerCase","toOperationStatus","getStatus","getProvisioningState","provisioningState","parseRetryAfter","retryAfter","calculatePollingIntervalFromDate","getErrorFromResponse","flatResponse","retryAfterDate","timeNow","retryAfterTime","getStatusFromInitialResponse","helper","initHttpOperation","lro","sendInitialRequest","pollHttpOperation","inputState","inputOptions","sendPollRequest","createStateProxy$1","setRunning","getResult","isCanceled","isFailed","isRunning","isSucceeded","buildCreatePoller","getStatusFromPollResponse","resolveOnUnsuccessful","withOperationLocationCallback","restoreFrom","called","resultPromise","handleProgressEvents","h","cancelErrMsg","currentPollIntervalInMs","poller","getOperationState","isStopped","stopPolling","delete","pollUntilDone","pollOptions","inputAbortSignal","finally","pollIntervalInMs","createHttpPoller","createStateProxy","isStarted","isCancelled","isCompleted","GenericPollOperation","lroResourceLocationConfig","setPollerConfig","pollerConfig","fireProgress","cancel","PollerStoppedError","PollerCancelledError","Poller","operation","stopped","pollProgressCallbacks","startPolling","pollOnce","processUpdatedState","cancelOnce","pollOncePromise","clearPollOncePromise","cancelOperation","cancelPromise","LroEngine","resumeFrom","getPagedAsyncIterator","pagedResult","iter","getItemAsyncIterator","byPage","settings","continuationToken","maxPageSize","getPageAsyncIterator","pageLink","getItemAsyncIterator_1","e_2","pages","firstVal","toElements","__asyncDelegator","pages_1","pages_1_1","page","pages_2","pages_2_1","e_2_1","getPageAsyncIterator_1","getPage","firstPageLink","nextPageLink","api","getSpan","trace","setSpan","setSpanContext","getSpanContext","getTracer","isTracingDisabled","azureTracingDisabledValue","AZURE_TRACING_DISABLED","operationName","operationOptions","tracer","INTERNAL","spanName","wrapSpanContext","INVALID_SPAN_CONTEXT","startSpan","newSpanOptions","attributes","newTracingOptions","active","newOperationOptions","VERSION","extractSpanContextFromTraceParentHeader","traceId","spanId","traceOptions","traceFlags","missingFields","hexFlags","_a$1","createAbortablePromise","buildPromise","cleanupBeforeAbort","rejectOnAbort","removeListeners","onAbort","timeInMs","getRandomIntegerInclusive","ceil","hasName","hasMessage","getErrorMessage","stringified","computeSha256Hmac","stringToSign","decodedKey","createHmac","computeSha256Hash","randomNumber","uuidFunction","globalThis","randomUUID","util__default","format","debugEnvVariable","DEBUG","enabledString","enabledNamespaces","skippedNamespaces","debuggers","debugObj","createDebugger","disable","namespaces","wildcard","namespaceList","ns","skipped","enabledNamespace","newDebugger","extend","registeredLoggers","logLevelFromEnv","AZURE_LOG_LEVEL","azureLogLevel","AzureLogger","AZURE_LOG_LEVELS","isAzureLogLevel","setLogLevel","shouldEnable","getLogLevel","levelMap","clientRootLogger","patchLogMethod","createLogger","coreHttp","coreLro","coreHttp__namespace","fs__namespace","util__namespace","BlobServiceProperties","blobAnalyticsLogging","hourMetrics","minuteMetrics","cors","defaultServiceVersion","deleteRetentionPolicy","staticWebsite","Logging","deleteProperty","read","retentionPolicy","RetentionPolicy","days","Metrics","includeAPIs","CorsRule","allowedOrigins","allowedMethods","allowedHeaders","exposedHeaders","maxAgeInSeconds","StaticWebsite","indexDocument","errorDocument404Path","defaultIndexDocumentPath","StorageError","BlobServiceStatistics","geoReplication","GeoReplication","lastSyncOn","ListContainersSegmentResponse","serviceEndpoint","prefix","marker","containerItems","ContainerItem","deleted","ContainerProperties","lastModified","etag","leaseStatus","leaseState","leaseDuration","publicAccess","hasImmutabilityPolicy","hasLegalHold","defaultEncryptionScope","preventEncryptionScopeOverride","deletedOn","remainingRetentionDays","isImmutableStorageWithVersioningEnabled","KeyInfo","startsOn","expiresOn","UserDelegationKey","signedObjectId","signedTenantId","signedStartsOn","signedExpiresOn","signedService","signedVersion","FilterBlobSegment","where","blobs","FilterBlobItem","containerName","tags","BlobTags","blobTagSet","BlobTag","SignedIdentifier","id","accessPolicy","AccessPolicy","permissions","ListBlobsFlatSegmentResponse","BlobFlatListSegment","blobItems","BlobItemInternal","snapshot","versionId","isCurrentVersion","blobTags","objectReplicationMetadata","hasVersionsOnly","BlobName","encoded","BlobPropertiesInternal","createdOn","contentEncoding","contentLanguage","contentMD5","cacheControl","blobSequenceNumber","blobType","copyId","copyStatus","copySource","copyProgress","copyCompletedOn","copyStatusDescription","serverEncrypted","incrementalCopy","destinationSnapshot","accessTier","accessTierInferred","archiveStatus","customerProvidedKeySha256","encryptionScope","accessTierChangedOn","tagCount","isSealed","rehydratePriority","lastAccessedOn","immutabilityPolicyExpiresOn","immutabilityPolicyMode","legalHold","ListBlobsHierarchySegmentResponse","BlobHierarchyListSegment","blobPrefixes","BlobPrefix","BlockLookupList","committed","uncommitted","latest","BlockList","committedBlocks","uncommittedBlocks","Block","PageList","pageRange","clearRange","PageRange","ClearRange","QueryRequest","queryType","expression","inputSerialization","outputSerialization","QuerySerialization","QueryFormat","delimitedTextConfiguration","jsonTextConfiguration","arrowConfiguration","parquetTextConfiguration","DelimitedTextConfiguration","columnSeparator","fieldQuote","recordSeparator","escapeChar","headersPresent","JsonTextConfiguration","ArrowConfiguration","ArrowField","precision","scale","ServiceSetPropertiesHeaders","clientRequestId","errorCode","ServiceSetPropertiesExceptionHeaders","ServiceGetPropertiesHeaders","ServiceGetPropertiesExceptionHeaders","ServiceGetStatisticsHeaders","ServiceGetStatisticsExceptionHeaders","ServiceListContainersSegmentHeaders","ServiceListContainersSegmentExceptionHeaders","ServiceGetUserDelegationKeyHeaders","ServiceGetUserDelegationKeyExceptionHeaders","ServiceGetAccountInfoHeaders","skuName","accountKind","isHierarchicalNamespaceEnabled","ServiceGetAccountInfoExceptionHeaders","ServiceSubmitBatchHeaders","ServiceSubmitBatchExceptionHeaders","ServiceFilterBlobsHeaders","ServiceFilterBlobsExceptionHeaders","ContainerCreateHeaders","ContainerCreateExceptionHeaders","ContainerGetPropertiesHeaders","blobPublicAccess","denyEncryptionScopeOverride","ContainerGetPropertiesExceptionHeaders","ContainerDeleteHeaders","ContainerDeleteExceptionHeaders","ContainerSetMetadataHeaders","ContainerSetMetadataExceptionHeaders","ContainerGetAccessPolicyHeaders","ContainerGetAccessPolicyExceptionHeaders","ContainerSetAccessPolicyHeaders","ContainerSetAccessPolicyExceptionHeaders","ContainerRestoreHeaders","ContainerRestoreExceptionHeaders","ContainerRenameHeaders","ContainerRenameExceptionHeaders","ContainerSubmitBatchHeaders","ContainerSubmitBatchExceptionHeaders","ContainerFilterBlobsHeaders","ContainerFilterBlobsExceptionHeaders","ContainerAcquireLeaseHeaders","leaseId","ContainerAcquireLeaseExceptionHeaders","ContainerReleaseLeaseHeaders","ContainerReleaseLeaseExceptionHeaders","ContainerRenewLeaseHeaders","ContainerRenewLeaseExceptionHeaders","ContainerBreakLeaseHeaders","leaseTime","ContainerBreakLeaseExceptionHeaders","ContainerChangeLeaseHeaders","ContainerChangeLeaseExceptionHeaders","ContainerListBlobFlatSegmentHeaders","ContainerListBlobFlatSegmentExceptionHeaders","ContainerListBlobHierarchySegmentHeaders","ContainerListBlobHierarchySegmentExceptionHeaders","ContainerGetAccountInfoHeaders","ContainerGetAccountInfoExceptionHeaders","BlobDownloadHeaders","objectReplicationPolicyId","objectReplicationRules","contentRange","acceptRanges","blobCommittedBlockCount","isServerEncrypted","encryptionKeySha256","blobContentMD5","lastAccessed","contentCrc64","BlobDownloadExceptionHeaders","BlobGetPropertiesHeaders","isIncrementalCopy","BlobGetPropertiesExceptionHeaders","BlobDeleteHeaders","BlobDeleteExceptionHeaders","BlobUndeleteHeaders","BlobUndeleteExceptionHeaders","BlobSetExpiryHeaders","BlobSetExpiryExceptionHeaders","BlobSetHttpHeadersHeaders","BlobSetHttpHeadersExceptionHeaders","BlobSetImmutabilityPolicyHeaders","immutabilityPolicyExpiry","BlobSetImmutabilityPolicyExceptionHeaders","BlobDeleteImmutabilityPolicyHeaders","BlobDeleteImmutabilityPolicyExceptionHeaders","BlobSetLegalHoldHeaders","BlobSetLegalHoldExceptionHeaders","BlobSetMetadataHeaders","BlobSetMetadataExceptionHeaders","BlobAcquireLeaseHeaders","BlobAcquireLeaseExceptionHeaders","BlobReleaseLeaseHeaders","BlobReleaseLeaseExceptionHeaders","BlobRenewLeaseHeaders","BlobRenewLeaseExceptionHeaders","BlobChangeLeaseHeaders","BlobChangeLeaseExceptionHeaders","BlobBreakLeaseHeaders","BlobBreakLeaseExceptionHeaders","BlobCreateSnapshotHeaders","BlobCreateSnapshotExceptionHeaders","BlobStartCopyFromURLHeaders","BlobStartCopyFromURLExceptionHeaders","BlobCopyFromURLHeaders","xMsContentCrc64","BlobCopyFromURLExceptionHeaders","BlobAbortCopyFromURLHeaders","BlobAbortCopyFromURLExceptionHeaders","BlobSetTierHeaders","BlobSetTierExceptionHeaders","BlobGetAccountInfoHeaders","BlobGetAccountInfoExceptionHeaders","BlobQueryHeaders","copyCompletionTime","BlobQueryExceptionHeaders","BlobGetTagsHeaders","BlobGetTagsExceptionHeaders","BlobSetTagsHeaders","BlobSetTagsExceptionHeaders","PageBlobCreateHeaders","PageBlobCreateExceptionHeaders","PageBlobUploadPagesHeaders","PageBlobUploadPagesExceptionHeaders","PageBlobClearPagesHeaders","PageBlobClearPagesExceptionHeaders","PageBlobUploadPagesFromURLHeaders","PageBlobUploadPagesFromURLExceptionHeaders","PageBlobGetPageRangesHeaders","blobContentLength","PageBlobGetPageRangesExceptionHeaders","PageBlobGetPageRangesDiffHeaders","PageBlobGetPageRangesDiffExceptionHeaders","PageBlobResizeHeaders","PageBlobResizeExceptionHeaders","PageBlobUpdateSequenceNumberHeaders","PageBlobUpdateSequenceNumberExceptionHeaders","PageBlobCopyIncrementalHeaders","PageBlobCopyIncrementalExceptionHeaders","AppendBlobCreateHeaders","AppendBlobCreateExceptionHeaders","AppendBlobAppendBlockHeaders","blobAppendOffset","AppendBlobAppendBlockExceptionHeaders","AppendBlobAppendBlockFromUrlHeaders","AppendBlobAppendBlockFromUrlExceptionHeaders","AppendBlobSealHeaders","AppendBlobSealExceptionHeaders","BlockBlobUploadHeaders","BlockBlobUploadExceptionHeaders","BlockBlobPutBlobFromUrlHeaders","BlockBlobPutBlobFromUrlExceptionHeaders","BlockBlobStageBlockHeaders","BlockBlobStageBlockExceptionHeaders","BlockBlobStageBlockFromURLHeaders","BlockBlobStageBlockFromURLExceptionHeaders","BlockBlobCommitBlockListHeaders","BlockBlobCommitBlockListExceptionHeaders","BlockBlobGetBlockListHeaders","BlockBlobGetBlockListExceptionHeaders","Mappers","__proto__","blobServiceProperties","accept","restype","comp","timeoutInSeconds","accept1","comp1","comp2","include","Csv","keyInfo","comp3","restype1","comp4","multipartContentType","comp5","restype2","ifModifiedSince","ifUnmodifiedSince","comp6","comp7","containerAcl","comp8","deletedContainerName","deletedContainerVersion","comp9","sourceContainerName","sourceLeaseId","comp10","duration","proposedLeaseId","action1","leaseId1","action2","action3","breakPeriod","action4","proposedLeaseId1","include1","range","rangeGetContentMD5","rangeGetContentCRC64","encryptionKey","encryptionAlgorithm","ifMatch","ifNoneMatch","ifTags","deleteSnapshots","blobDeleteType","comp11","expiryOptions","blobCacheControl","blobContentType","blobContentEncoding","blobContentLanguage","blobContentDisposition","comp12","comp13","comp14","tier","sourceIfModifiedSince","sourceIfUnmodifiedSince","sourceIfMatch","sourceIfNoneMatch","sourceIfTags","blobTagsString","sealBlob","legalHold1","xMsRequiresSync","sourceContentMD5","copySourceAuthorization","copySourceTags","comp15","copyActionAbortConstant","comp16","tier1","queryRequest","comp17","comp18","transactionalContentMD5","transactionalContentCrc64","contentType1","body1","accept2","comp19","pageWrite","ifSequenceNumberLessThanOrEqualTo","ifSequenceNumberLessThan","ifSequenceNumberEqualTo","pageWrite1","sourceUrl","sourceRange","sourceContentCrc64","range1","comp20","prevsnapshot","prevSnapshotUrl","sequenceNumberAction","comp21","blobType1","comp22","maxSize","appendPosition","sourceRange1","comp23","blobType2","copySourceBlobProperties","comp24","blockId","blocks","comp25","listType","Service","setProperties","setPropertiesOperationSpec","getPropertiesOperationSpec$2","getStatistics","getStatisticsOperationSpec","listContainersSegment","listContainersSegmentOperationSpec","getUserDelegationKey","getUserDelegationKeyOperationSpec","getAccountInfo","getAccountInfoOperationSpec$2","submitBatch","submitBatchOperationSpec$1","filterBlobs","filterBlobsOperationSpec$1","xmlSerializer$5","Container","createOperationSpec$2","getPropertiesOperationSpec$1","deleteOperationSpec$1","setMetadata","setMetadataOperationSpec$1","getAccessPolicy","getAccessPolicyOperationSpec","setAccessPolicy","setAccessPolicyOperationSpec","restore","restoreOperationSpec","renameOperationSpec","submitBatchOperationSpec","filterBlobsOperationSpec","acquireLease","acquireLeaseOperationSpec$1","releaseLease","releaseLeaseOperationSpec$1","renewLease","renewLeaseOperationSpec$1","breakLease","breakLeaseOperationSpec$1","changeLease","changeLeaseOperationSpec$1","listBlobFlatSegment","listBlobFlatSegmentOperationSpec","listBlobHierarchySegment","listBlobHierarchySegmentOperationSpec","getAccountInfoOperationSpec$1","xmlSerializer$4","Blob$1","download","downloadOperationSpec","getPropertiesOperationSpec","deleteOperationSpec","undelete","undeleteOperationSpec","setExpiry","setExpiryOperationSpec","setHttpHeaders","setHttpHeadersOperationSpec","setImmutabilityPolicy","setImmutabilityPolicyOperationSpec","deleteImmutabilityPolicy","deleteImmutabilityPolicyOperationSpec","setLegalHold","setLegalHoldOperationSpec","setMetadataOperationSpec","acquireLeaseOperationSpec","releaseLeaseOperationSpec","renewLeaseOperationSpec","changeLeaseOperationSpec","breakLeaseOperationSpec","createSnapshot","createSnapshotOperationSpec","startCopyFromURL","startCopyFromURLOperationSpec","copyFromURL","copyFromURLOperationSpec","abortCopyFromURL","abortCopyFromURLOperationSpec","setTier","setTierOperationSpec","getAccountInfoOperationSpec","queryOperationSpec","getTags","getTagsOperationSpec","setTags","setTagsOperationSpec","xmlSerializer$3","PageBlob","createOperationSpec$1","uploadPages","uploadPagesOperationSpec","clearPages","clearPagesOperationSpec","uploadPagesFromURL","uploadPagesFromURLOperationSpec","getPageRanges","getPageRangesOperationSpec","getPageRangesDiff","getPageRangesDiffOperationSpec","resize","resizeOperationSpec","updateSequenceNumber","updateSequenceNumberOperationSpec","copyIncremental","copyIncrementalOperationSpec","xmlSerializer$2","serializer$2","AppendBlob","createOperationSpec","appendBlock","appendBlockOperationSpec","appendBlockFromUrl","appendBlockFromUrlOperationSpec","seal","sealOperationSpec","xmlSerializer$1","serializer$1","BlockBlob","upload","uploadOperationSpec","putBlobFromUrl","putBlobFromUrlOperationSpec","stageBlock","stageBlockOperationSpec","stageBlockFromURL","stageBlockFromURLOperationSpec","commitBlockList","commitBlockListOperationSpec","getBlockList","getBlockListOperationSpec","xmlSerializer","SDK_VERSION","SERVICE_VERSION","BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES","BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES","BLOCK_BLOB_MAX_BLOCKS","DEFAULT_BLOCK_BUFFER_SIZE_BYTES","DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES","DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS","REQUEST_TIMEOUT","StorageOAuthScopes","URLConstants","Parameters","FORCE_BROWSER_NO_CACHE","SIGNATURE","SNAPSHOT","VERSIONID","TIMEOUT","HTTPURLConnection","HTTP_ACCEPTED","HTTP_CONFLICT","HTTP_NOT_FOUND","HTTP_PRECON_FAILED","HTTP_RANGE_NOT_SATISFIABLE","CONTENT_ENCODING","CONTENT_ID","CONTENT_LANGUAGE","CONTENT_LENGTH","CONTENT_MD5","CONTENT_TRANSFER_ENCODING","CONTENT_TYPE","COOKIE","DATE","IF_MATCH","IF_MODIFIED_SINCE","IF_NONE_MATCH","IF_UNMODIFIED_SINCE","PREFIX_FOR_STORAGE","RANGE","X_MS_CLIENT_REQUEST_ID","X_MS_COPY_SOURCE","X_MS_DATE","X_MS_ERROR_CODE","X_MS_VERSION","ETagNone","ETagAny","SIZE_1_MB","BATCH_MAX_REQUEST","BATCH_MAX_PAYLOAD_IN_BYTES","HTTP_LINE_ENDING","HTTP_VERSION_1_1","EncryptionAlgorithmAES25","DevelopmentConnectionString","StorageBlobLoggingAllowedHeaderNames","StorageBlobLoggingAllowedQueryParameters","BlobUsesCustomerSpecifiedEncryptionMsg","BlobDoesNotUseCustomerSpecifiedEncryption","PathStylePorts","escapeURLPath","urlParsed","escape","getProxyUriFromDevConnString","connectionString","proxyUri","matchCredentials","getValueInConnString","argument","elements","extractConnectionStringParts","blobEndpoint","defaultEndpointsProtocol","accountName","accountKey","endpointSuffix","accountSas","getAccountNameFromUrl","appendToURLPath","normalizedUrl","setURLParameter","getURLParameter","setURLHost","getURLPath","getURLScheme","getURLPathAndQuery","pathString","RangeError","getURLQueries","querySubStrings","indexOfEqual","lastIndexOfEqual","queries","querySubString","splitResults","appendToURLQuery","queryParts","truncatedISO8061Date","withMilliseconds","dateString","base64encode","btoa","generateBlockID","blockIDPrefix","blockIndex","maxSourceStringLength","maxBlockIndexLength","maxAllowedBlockIDPrefixLength","padStart","abortError","abortHandler","resolveHandler","currentString","targetLength","padString","repeat","iEqual","str1","str2","isIpEndpointStyle","toBlobTagsString","tagPairs","toBlobTags","toTags","blobTag","toQuerySerialization","textConfiguration","escapeCharacter","hasHeaders","parseObjectReplicationRecord","objectReplicationRecord","orProperties","ids","policyPrefix","rule","ruleId","replicationStatus","policyIndex","findIndex","policyId","rules","attachCredential","httpAuthorizationToString","httpAuthorization","BlobNameToString","decodeURIComponent","ConvertInternalResponseOfListBlobFlat","internalResponse","blobItemInteral","blobItem","ConvertInternalResponseOfListBlobHierarchy","blobPrefixInternal","blobPrefix","ExtractPageRangeInfoItems","getPageRangesSegment","pageRangeIndex","clearRangeIndex","isClear","EscapePath","blobName","StorageBrowserPolicy","StorageBrowserPolicyFactory","StorageRetryPolicyType","DEFAULT_RETRY_OPTIONS","retryPolicyType","EXPONENTIAL","secondaryHost","RETRY_ABORT_ERROR","StorageRetryPolicy","attemptSendRequest","secondaryHas404","newRequest","isPrimaryRetry","retriableErrors","retriableError","delayTimeInMs","FIXED","StorageRetryPolicyFactory","CredentialPolicy","AnonymousCredentialPolicy","Credential","AnonymousCredential","TelemetryPolicy","telemetry","TelemetryPolicyFactory","telemetryString","libInfo","_defaultHttpClient","DefaultScope","getChallenge","challenge","parseChallenge","bearerChallenge","challengeParts","keyValuePairs","keyValue","storageBearerTokenChallengeAuthenticationPolicy","StorageBearerTokenChallengeAuthenticationPolicy","getTokenInternal","challengeInfo","challengeScopes","resource_id","parsedAuthUri","authorization_uri","pathSegments","tenantId","getTokenForChallenge","tokenForChallenge","isPipelineLike","castPipeline","toServiceClientOptions","Pipeline","newPipeline","telemetryPolicy","StorageSharedKeyCredentialPolicy","factory","getHeaderValueToSign","getCanonicalizedHeadersString","getCanonicalizedResourceString","computeHMACSHA256","localeCompare","canonicalizedHeadersStringToSign","trimRight","trimLeft","canonicalizedResourceString","lowercaseQueries","queryKeys","lowercaseKey","StorageSharedKeyCredential","packageName","packageVersion","StorageClientContext","defaultUserAgent","endpoint","StorageClient","storageClientContext","convertTracingToRequestOptionsBase","BlobSASPermissions","deleteVersion","move","permanentDelete","blobSASPermissions","permissionLike","ContainerSASPermissions","list","filterByTags","containerSASPermissions","UserDelegationKeyCredential","userDelegationKey","ipRangeToString","ipRange","SASProtocol","SASQueryParameters","permissionsOrOptions","services","resourceTypes","identifier","preauthorizedAgentObjectId","correlationId","ipRangeInner","signedOid","param","tryAppendQueryParameter","generateBlobSASQueryParameters","blobSASSignatureValues","sharedKeyCredentialOrUserDelegationKey","sharedKeyCredential","userDelegationKeyCredential","generateBlobSASQueryParameters20201206","generateBlobSASQueryParametersUDK20201206","generateBlobSASQueryParameters20181109","generateBlobSASQueryParametersUDK20200210","generateBlobSASQueryParametersUDK20181109","generateBlobSASQueryParameters20150405","SASSignatureValuesSanityCheckAndAutofill","verifiedPermissions","getCanonicalName","timestamp","snapshotTime","BlobLeaseClient","clientContext","_url","_isContainer","_containerOrBlobOperation","_leaseId","conditions","tagConditions","modifiedAccessConditions","RetriableReadableStream","Readable","getter","highWaterMark","sourceDataHandler","doInjectErrorOnce","sourceErrorOrEndHandler","removeSourceEventHandlers","maxRetryRequests","newSource","setSourceEventHandlers","_read","_destroy","BlobDownloadResponse","originalResponse","blobDownloadStream","objectReplicationDestinationPolicyId","objectReplicationSourceProperties","contentAsBlob","AVRO_SYNC_MARKER_SIZE","AVRO_INIT_BYTES","AVRO_CODEC_KEY","AVRO_SCHEMA_KEY","AvroParser","readFixedBytes","readByte","readZigZagLong","zigZagEncoded","significanceInBit","byte","haveMoreByte","significanceInFloat","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","readLong","readInt","readNull","readBoolean","readFloat","u8arr","view","DataView","byteOffset","getFloat32","readDouble","getFloat64","readBytes","readString","utf8decoder","TextDecoder","decode","readMapPair","readItemMethod","readMap","readPairMethod","pairs","readArray","dict","pair","AvroComplex","AvroPrimitive","AvroType","fromSchema","fromStringSchema","fromArraySchema","fromObjectSchema","NULL","BOOLEAN","INT","LONG","FLOAT","DOUBLE","BYTES","STRING","AvroPrimitiveType","AvroUnionType","RECORD","aliases","fields","AvroRecordType","ENUM","symbols","AvroEnumType","MAP","AvroMapType","ARRAY","primitive","_primitive","_symbols","types","_types","typeIndex","itemType","_itemType","_fields","record","arraysEqual","AvroReader","dataStream","headerStream","currentBlockOffset","indexWithinCurrentBlock","_dataStream","_headerStream","_initialized","_blockOffset","_objectIndex","_initialBlockOffset","blockOffset","objectIndex","initialize","_metadata","codec","_syncMarker","position","_itemsRemainingInBlock","hasNext","parseObjects","parseObjects_1","AvroReadable","ABORT_ERROR","AvroReadableFromStream","_readable","_position","toUint8Array","cleanUp","readableCallback","rejectCallback","callbackChunk","BlobQuickQueryStream","avroPaused","avroReader","avroIter","readInternal","avroNext","$schema","bytesScanned","totalBytes","fatal","description","isFatal","BlobQueryResponse","BlockBlobTier","PremiumPageBlobTier","toAccessTier","ensureCpkIfSpecified","cpk","StorageBlobAudience","rangeResponseFromModel","BlobBeginCopyFromUrlPoller","blobClient","startCopyFromURLOptions","makeBlobBeginCopyFromURLPollOperation","prevCopyProgress","rangeToString","iRange","BatchStates","Batch","completed","operations","Good","emitter","addOperation","parallelExecute","nextOperation","BuffersStream","buffers","byteOffsetInCurrentBuffer","bufferIndex","pushedBytesLength","buffersLength","readableHighWaterMark","outBuffers","remainingDataInAllBuffers","remainingCapacityInThisBuffer","maxBufferLength","PooledBuffer","capacity","totalLength","_size","bufferNum","allocUnsafe","fill","targetOffset","sourceOffset","totalCopiedNum","target","copiedNum","getReadableStream","BufferScheduler","bufferSize","maxBuffers","outgoingHandler","isStreamEnd","executingOutgoingHandlers","numBuffers","unresolvedDataArray","unresolvedLength","incoming","outgoing","appendUnresolvedData","resolveData","triggerOutgoingHandlers","shiftBufferFromUnresolvedDataArray","triggerOutgoingHandler","bufferLength","reuseBuffer","streamToBuffer","pos","chunkLength","streamToBuffer2","readStreamToLocalFile","rs","ws","fsStat","fsCreateReadStream","BlobClient","urlOrConnectionString","credentialOrPipelineOrContainerName","blobNameOrOptions","extractedCreds","_containerName","getBlobAndContainerNamesFromUrl","blobContext","_snapshot","_versionId","withSnapshot","withVersion","getAppendBlobClient","AppendBlobClient","getBlockBlobClient","getPageBlobClient","PageBlobClient","customerProvidedKey","leaseAccessConditions","rangeGetContentCrc64","cpkInfo","wrappedRes","updatedDownloadOptions","deleteIfExists","setHTTPHeaders","blobHTTPHeaders","blobHttpHeaders","wrappedResponse","getBlobLeaseClient","proposeLeaseId","beginCopyFromURL","syncCopyFromURL","sourceConditions","sourceModifiedAccessConditions","sourceAuthorization","immutabilityPolicy","expiriesOn","policyMode","setAccessTier","param1","param2","param3","param4","transferProgress","batch","off","chunkEnd","maxRetryRequestsPerBlock","do","downloadToFile","pathComponents","generateSasUrl","sas","modifiedAccessCondition","legalHoldEnabled","appendBlobContext","createIfNotExists","appendPositionAccessConditions","appendBlockFromURL","sourceURL","blockBlobContext","_blobContext","inputTextConfiguration","outputTextConfiguration","syncUploadFromURL","uploadData","uploadSeekableInternal","browserBlob","uploadBrowserData","browserData","bodyFactory","maxSingleShotSize","numBlocks","blockList","blockID","uploadStream","maxConcurrency","blockNum","scheduler","pageBlobContext","sequenceNumberAccessConditions","destOffset","listPageRangesSegment","listPageRangeItemSegments","listPageRangeItemSegments_1","getPageRangeItemSegmentsResponse","listPageRangeItems","listPageRangeItems_1","listPageRanges","prevSnapshot","listPageRangesDiffSegment","prevSnapshotOrUrl","listPageRangeDiffItemSegments","listPageRangeDiffItemSegments_1","listPageRangeDiffItems","listPageRangeDiffItems_1","listPageRangesDiff","getPageRangesDiffForManagedDisks","sequenceNumber","startCopyIncremental","getBodyAsText","batchResponse","responseLength","utf8ByteLength","HTTP_HEADER_DELIMITER","SPACE_DELIMITER","NOT_FOUND","BatchResponseParser","subRequests","responseBatchBoundary","perResponsePrefix","batchResponseEnding","parseBatchResponse","responseBodyAsText","subResponses","subResponseCount","deserializedSubResponses","subResponsesSucceededCount","subResponsesFailedCount","subResponse","deserializedSubResponse","responseLines","subRespHeaderStartFound","subRespHeaderEndFound","subRespFailed","contentId","responseLine","tokens","isInteger","_request","MutexLockStatus","Mutex","lock","UNLOCKED","LOCKED","onUnlockEvent","unlock","emitUnlockEvent","setImmediate","BlobBatch","batchRequest","InnerBatchRequest","getMultiPartContentType","getMultipartContentType","getHttpRequestBody","getSubRequests","addSubRequestInternal","subRequest","assembleSubRequestFunc","preAddSubRequest","postAddSubRequest","setBatchType","batchType","deleteBlob","urlOrBlobClient","credentialOrOptions","createPipeline","setBlobAccessTier","credentialOrTier","tierOrOptions","operationCount","tempGuid","subRequestPrefix","batchRequestEnding","isAnonymousCreds","policyFactoryLength","BatchHeaderFilterPolicyFactory","BatchRequestAssemblePolicyFactory","appendSubRequestToBody","BatchRequestAssemblePolicy","dummyResponse","BatchHeaderFilterPolicy","xMsHeaderName","BlobBatchClient","credentialOrPipeline","serviceOrContainerContext","createBatch","deleteBlobs","urlsOrBlobClients","setBlobsAccessTier","batchRequestBody","rawBatchResponse","batchResponseParser","responseSummary","ContainerClient","getContainerNameFromUrl","containerContext","getBlobClient","signedIdentifiers","acl","uploadBlockBlob","blockBlobClient","listSegments","listSegments_1","listBlobsFlatSegmentResponse","listItems_1","listBlobsFlat","includeCopy","includeDeleted","includeMetadata","includeSnapshots","includeVersions","includeUncommitedBlobs","includeTags","includeDeletedWithVersions","includeImmutabilityPolicy","includeLegalHold","listHierarchySegments","listHierarchySegments_1","listBlobsHierarchySegmentResponse","listItemsByHierarchy","listItemsByHierarchy_1","blob","listBlobsByHierarchy","findBlobsByTagsSegment","tagFilterSqlExpression","tagValue","findBlobsByTagsSegments","findBlobsByTagsSegments_1","findBlobsByTagsItems","findBlobsByTagsItems_1","e_3","e_3_1","findBlobsByTags","listSegmentOptions","getBlobBatchClient","AccountSASPermissions","accountSASPermissions","AccountSASResourceTypes","service","container","accountSASResourceTypes","AccountSASServices","queue","table","accountSASServices","generateAccountSASQueryParameters","accountSASSignatureValues","parsedPermissions","parsedServices","parsedResourceTypes","BlobServiceClient","serviceContext","fromConnectionString","getContainerClient","createContainer","containerClient","containerCreateResponse","deleteContainer","undeleteContainer","destinationContainerName","containerUndeleteResponse","renameContainer","containerRenameResponse","sourceCondition","listContainersSegmentResponse","listContainers","includeSystem","generateAccountSasUrl","KnownEncryptionAlgorithmType","BuildKit","buildx_1","builder_1","config_1","buildx","Config","Buildx","buildkit","getVersionWithinImage","nodeName","Exec","containerNamePrefix","bkitimage","bkitversion","versionSatisfies","builderName","builderInfo","nodes","bkversion","driver","context_1","resolveFromString","resolveFromFile","configFile","tmpName","tmpdir","tmpDir","Bake","inputs_1","util_1","parseDefinitions","sources","targets","overrides","load","workdir","remoteDef","Util","isValidRef","override","printCmd","getCommand","hasLocalExporter","def","Inputs","hasExporterType","exporters","hasTarExporter","hasDockerExporter","parseInspect","parsingType","currentNode","currentGCPolicy","rest","lkey","gcPolicy","lastActivity","platforms","labels","keepDuration","keepBytes","path_1","docker_1","_versionOnce","_standalone","static","configDir","BUILDX_CONFIG","Docker","certsDir","isStandalone","isAvailable","printInspect","parseVersion","printVersion","ver","resolveCertsDriverOpts","cert","driverOpts","cacert","cacertpath","certpath","keypath","sync_1","github_1","parseKvp","kvp","delimiterIndex","getBuildImageIDFilePath","getBuildMetadataFilePath","resolveBuildImageID","iidFile","resolveBuildMetadata","metadataFile","resolveDigest","metadataJSON","resolveBuildSecretString","resolveBuildSecret","resolveBuildSecretFile","resolveBuildSecretEnv","_value","secretFile","getProvenanceInput","workflowRunURL","resolveProvenanceAttrs","relaxColumnCount","skipEmptyLines","records","columns","hasGitAuthTokenSecret","secrets","Install","tc","cache_1","git_1","ghaNoCache","getDownloadVersion","getRelease","tag_name","vspec","installCache","Cache","htcName","htcVersion","baseCacheDir","cacheFoundPath","downloadURL","htcDownloadPath","cacheSavePath","save","build","gitContext","outputDir","buildCmd","buildCommand","buildBinPath","installStandalone","binPath","binDir","mkdirSync","binName","buildxPath","copyFileSync","chmodSync","installPlugin","pluginsDir","pluginPath","buildxStandaloneFound","buildxPluginFound","buildStandalone","GIT_AUTH_TOKEN","arm_version","variables","ext","versionOrRef","baseURL","Git","remoteSha","trimSuffix","hash","repoKey","releasesURL","resp","cache","ghaCacheKey","copyToCache","htcPath","tmp","github","mkdtempSync","ensureDirExists","RUNNER_TEMP","_tmpDir","tmpNameSync","gitRef","serverURL","provenanceBuilderID","DOCKER_CONFIG","printInfo","ctx","fullCommit","isInsideWorkTree","out","repoMatch","octokit","apiURL","repoName","repos","listCommits","per_page","rsha","remoteURL","rurl","isHeadDetached","getDetachedRef","shortCommit","refMatch","branchMatch","prMatch","jwt_decode_1","repoData","actionsRuntimeToken","jwtDecode","printActionsRuntimeTokenACs","jwt","ac","permission","Permission","Scope","run","isPost","main","Toolkit","install_1","bake_1","buildkit_1","buildxInstall","bake","githubToken","crypto_1","getInputList","getList","relaxQuotes","comment","quote","ignoreComma","pat","asyncForEach","isValidURL","urlStr","refStr","script","escapedParams","lstatSync","_","trimPrefix","suffix","Yallist","MAX","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","lc","stale","maxAge","noDisposeOnSet","updateAgeOnGet","reset","mL","allowStale","mA","lengthCalculator","lC","hit","itemCount","rforEach","thisp","walker","tail","prev","forEachStep","toArray","dump","isStale","dumpLru","Entry","peek","l","expiresAt","prune","self","doUse","unshiftNode","removeNode","ANY","Comparator","parseOptions","loose","operator","re","t","COMPARATORLOOSE","COMPARATOR","SemVer","er","cmp","intersects","includePrerelease","safeRe","raw","parseRange","isNullSet","isAny","comps","memoOpts","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","memoKey","cached","hr","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","parseComparator","replaceGTE0","rangeMap","comparators","thisComparators","isSatisfiable","rangeComparators","thisComparator","rangeComparator","testSet","LRU","remainingComparators","testComparator","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","M","pr","ret","replaceCaret","CARETLOOSE","CARET","z","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","anyX","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","tb","prerelease","allowed","major","minor","compareIdentifiers","LOOSE","FULL","num","compare","other","compareMain","comparePre","compareBuild","inc","identifierBase","base","eq","neq","gte","lt","lte","op","coerce","rtl","COERCE","COERCERTL","lastIndex","versionA","versionB","compareLoose","version1","version2","v2","comparison","v1Higher","highVersion","lowVersion","highHasPre","lowHasPre","throwErrors","parsed","rcompare","rsort","internalRe","identifiers","toComparators","maxSatisfying","minSatisfying","minVersion","validRange","outside","gtr","ltr","simplifyRange","subset","SEMVER_SPEC_VERSION","RELEASE_TYPES","rcompareIdentifiers","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","NODE_DEBUG","numeric","anum","bnum","looseOption","emptyOpts","R","LETTERDASHNUMBER","safeRegexReplacements","makeSafeRegex","createToken","isGlobal","safe","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","LONETILDE","LONECARET","r1","r2","maxSV","rangeObj","minSV","minver","setMin","comparator","compver","hilo","gtfn","ltefn","ltfn","ecomp","high","low","included","ranges","simplified","original","sub","dom","sawNonNull","OUTER","simpleSub","simpleDom","isSub","simpleSubset","minimumVersionWithPreRelease","minimumVersion","eqSet","higherGT","lowerLT","gtltComp","higher","lower","hasDomLT","hasDomGT","needDomLTPre","needDomGTPre","Node","pushNode","forEachReverse","getReverse","mapReverse","initial","acc","reduceReverse","toArrayReverse","sliceReverse","deleteCount","insert","inserted","WritableStream","StreamSearch","PartStream","HeaderParser","DASH","B_ONEDASH","B_CRLF","EMPTY_FN","Dicer","cfg","headerFirst","_bparser","_headerFirst","_dashes","_parts","_finished","_realFinish","_isPreamble","_justMatched","_firstWrite","_inHeader","_part","_cb","_ignoreData","_partOpts","partHwm","_pause","_hparser","ev","_write","_events","preamble","_ignore","isMatch","_oninfo","shouldWriteMore","trailer","_unpause","part","getLimit","B_DCRLF","RE_CRLF","RE_HDR","nread","maxed","npairs","maxHeaderPairs","maxHeaderSize","finished","ss","_finish","_parseHeader","maxMatches","posColon","ReadableStream","SBMH","needle","needleLength","_occ","_lookbehind_size","_needle","_bufpos","_lookbehind","chlen","_sbmh_feed","lastNeedleChar","_sbmh_lookup_char","_sbmh_memcmp","bytesToCutOff","subarray","MultipartParser","UrlencodedParser","parseParams","Busboy","streamOptions","autoDestroy","_done","_parser","getParserByHeaders","defCharset","fileHwm","isPartAFile","limits","parsedConType","preservePath","detect","decodeText","RE_BOUNDARY","RE_FIELD","RE_CHARSET","RE_FILENAME","RE_NAME","Multipart","boy","fieldName","fileOpts","checkFinished","nends","fieldSizeLimit","filesLimit","fieldsLimit","partsLimit","headerPairsLimit","headerSizeLimit","nfiles","nfields","curFile","curField","_needDrain","_nparts","_boy","parserCfg","parser","onPart","skipPart","hitPartsLimit","contype","fieldname","charset","nsize","onData","onEnd","hitFilesLimit","FileStream","extralen","truncated","bytesRead","hitFieldsLimit","_readableState","sync","Decoder","UrlEncoded","fieldNameSizeLimit","decoder","_state","_checkingBytes","_bytesKey","_bytesVal","_val","_keyTrunc","_valTrunc","_hitLimit","idxeq","idxamp","keyTrunc","RE_PLUS","HEX","fromCharCode","utf8Decoder","textDecoders","textEncoding","destEncoding","defaultLimit","RE_ENCODED","encodedReplacer","inquote","escaping","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","except","__toCommonJS","dist_src_exports","createTokenAuth","REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","isApp","isInstallation","isUserToServer","tokenType","withAuthorizationPrefix","hook","route","parameters","merge","createTokenAuth2","import_universal_user_agent","import_before_after_hook","import_request","import_graphql","import_auth_token","noop","consoleWarn","warn","consoleError","userAgentTrail","getUserAgent","OctokitWithDefaults","plugins","newPlugins","currentPlugins","NewOctokit","Collection","requestDefaults","DEFAULTS","previews","timeZone","graphql","withCustomRequest","authStrategy","otherOptions","octokitOptions","classConstructor","newObj","import_is_plain_object","mergeDeep","isPlainObject","removeUndefinedProperties","mergedOptions","preview","addQueryParameters","separator","names","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","omit","keysToOmit","encodeReserved","encodeURI","encodeUnreserved","encodeValue","isKeyOperator","getValues","modifier","value2","template","expand","operators","variable","urlVariableNames","omittedParameters","remainingParameters","isBinaryRequest","previewsFromAcceptHeader","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS2","endpoint2","GraphqlResponseError","graphql2","import_request3","import_request2","_buildMessageForResponseErrors","errors","request2","captureStackTrace","NON_VARIABLE_OPTIONS","FORBIDDEN_VARIABLE_OPTIONS","GHES_V3_SUFFIX_REGEX","parsedOptions","newApi","customRequest","composePaginateRest","isPaginatingEndpoint","paginatingEndpoints","normalizePaginatedListResponse","responseNeedsNormalization","incompleteResults","incomplete_results","repositorySelection","repository_selection","total_count","namespaceKey","normalizedResponse","link","paginate","mapFn","gather","results","iterator2","earlyExit","legacyRestEndpointMethods","Endpoints","actions","addCustomLabelsToSelfHostedRunnerForOrg","addCustomLabelsToSelfHostedRunnerForRepo","addSelectedRepoToOrgSecret","addSelectedRepoToOrgVariable","approveWorkflowRun","cancelWorkflowRun","createEnvironmentVariable","createOrUpdateEnvironmentSecret","createOrUpdateOrgSecret","createOrUpdateRepoSecret","createOrgVariable","createRegistrationTokenForOrg","createRegistrationTokenForRepo","createRemoveTokenForOrg","createRemoveTokenForRepo","createRepoVariable","createWorkflowDispatch","deleteActionsCacheById","deleteActionsCacheByKey","deleteArtifact","deleteEnvironmentSecret","deleteEnvironmentVariable","deleteOrgSecret","deleteOrgVariable","deleteRepoSecret","deleteRepoVariable","deleteSelfHostedRunnerFromOrg","deleteSelfHostedRunnerFromRepo","deleteWorkflowRun","deleteWorkflowRunLogs","disableSelectedRepositoryGithubActionsOrganization","disableWorkflow","downloadArtifact","downloadJobLogsForWorkflowRun","downloadWorkflowRunAttemptLogs","downloadWorkflowRunLogs","enableSelectedRepositoryGithubActionsOrganization","enableWorkflow","forceCancelWorkflowRun","generateRunnerJitconfigForOrg","generateRunnerJitconfigForRepo","getActionsCacheList","getActionsCacheUsage","getActionsCacheUsageByRepoForOrg","getActionsCacheUsageForOrg","getAllowedActionsOrganization","getAllowedActionsRepository","getArtifact","getCustomOidcSubClaimForRepo","getEnvironmentPublicKey","getEnvironmentSecret","getEnvironmentVariable","getGithubActionsDefaultWorkflowPermissionsOrganization","getGithubActionsDefaultWorkflowPermissionsRepository","getGithubActionsPermissionsOrganization","getGithubActionsPermissionsRepository","getJobForWorkflowRun","getOrgPublicKey","getOrgSecret","getOrgVariable","getPendingDeploymentsForRun","getRepoPermissions","renamed","getRepoPublicKey","getRepoSecret","getRepoVariable","getReviewsForRun","getSelfHostedRunnerForOrg","getSelfHostedRunnerForRepo","getWorkflow","getWorkflowAccessToRepository","getWorkflowRun","getWorkflowRunAttempt","getWorkflowRunUsage","getWorkflowUsage","listArtifactsForRepo","listEnvironmentSecrets","listEnvironmentVariables","listJobsForWorkflowRun","listJobsForWorkflowRunAttempt","listLabelsForSelfHostedRunnerForOrg","listLabelsForSelfHostedRunnerForRepo","listOrgSecrets","listOrgVariables","listRepoOrganizationSecrets","listRepoOrganizationVariables","listRepoSecrets","listRepoVariables","listRepoWorkflows","listRunnerApplicationsForOrg","listRunnerApplicationsForRepo","listSelectedReposForOrgSecret","listSelectedReposForOrgVariable","listSelectedRepositoriesEnabledGithubActionsOrganization","listSelfHostedRunnersForOrg","listSelfHostedRunnersForRepo","listWorkflowRunArtifacts","listWorkflowRuns","listWorkflowRunsForRepo","reRunJobForWorkflowRun","reRunWorkflow","reRunWorkflowFailedJobs","removeAllCustomLabelsFromSelfHostedRunnerForOrg","removeAllCustomLabelsFromSelfHostedRunnerForRepo","removeCustomLabelFromSelfHostedRunnerForOrg","removeCustomLabelFromSelfHostedRunnerForRepo","removeSelectedRepoFromOrgSecret","removeSelectedRepoFromOrgVariable","reviewCustomGatesForRun","reviewPendingDeploymentsForRun","setAllowedActionsOrganization","setAllowedActionsRepository","setCustomLabelsForSelfHostedRunnerForOrg","setCustomLabelsForSelfHostedRunnerForRepo","setCustomOidcSubClaimForRepo","setGithubActionsDefaultWorkflowPermissionsOrganization","setGithubActionsDefaultWorkflowPermissionsRepository","setGithubActionsPermissionsOrganization","setGithubActionsPermissionsRepository","setSelectedReposForOrgSecret","setSelectedReposForOrgVariable","setSelectedRepositoriesEnabledGithubActionsOrganization","setWorkflowAccessToRepository","updateEnvironmentVariable","updateOrgVariable","updateRepoVariable","activity","checkRepoIsStarredByAuthenticatedUser","deleteRepoSubscription","deleteThreadSubscription","getFeeds","getRepoSubscription","getThread","getThreadSubscriptionForAuthenticatedUser","listEventsForAuthenticatedUser","listNotificationsForAuthenticatedUser","listOrgEventsForAuthenticatedUser","listPublicEvents","listPublicEventsForRepoNetwork","listPublicEventsForUser","listPublicOrgEvents","listReceivedEventsForUser","listReceivedPublicEventsForUser","listRepoEvents","listRepoNotificationsForAuthenticatedUser","listReposStarredByAuthenticatedUser","listReposStarredByUser","listReposWatchedByUser","listStargazersForRepo","listWatchedReposForAuthenticatedUser","listWatchersForRepo","markNotificationsAsRead","markRepoNotificationsAsRead","markThreadAsDone","markThreadAsRead","setRepoSubscription","setThreadSubscription","starRepoForAuthenticatedUser","unstarRepoForAuthenticatedUser","apps","addRepoToInstallation","addRepoToInstallationForAuthenticatedUser","checkToken","createFromManifest","createInstallationAccessToken","deleteAuthorization","deleteInstallation","deleteToken","getAuthenticated","getBySlug","getInstallation","getOrgInstallation","getRepoInstallation","getSubscriptionPlanForAccount","getSubscriptionPlanForAccountStubbed","getUserInstallation","getWebhookConfigForApp","getWebhookDelivery","listAccountsForPlan","listAccountsForPlanStubbed","listInstallationReposForAuthenticatedUser","listInstallationRequestsForAuthenticatedApp","listInstallations","listInstallationsForAuthenticatedUser","listPlans","listPlansStubbed","listReposAccessibleToInstallation","listSubscriptionsForAuthenticatedUser","listSubscriptionsForAuthenticatedUserStubbed","listWebhookDeliveries","redeliverWebhookDelivery","removeRepoFromInstallation","removeRepoFromInstallationForAuthenticatedUser","resetToken","revokeInstallationAccessToken","scopeToken","suspendInstallation","unsuspendInstallation","updateWebhookConfigForApp","billing","getGithubActionsBillingOrg","getGithubActionsBillingUser","getGithubPackagesBillingOrg","getGithubPackagesBillingUser","getSharedStorageBillingOrg","getSharedStorageBillingUser","checks","createSuite","getSuite","listAnnotations","listForRef","listForSuite","listSuitesForRef","rerequestRun","rerequestSuite","setSuitesPreferences","codeScanning","deleteAnalysis","getAlert","renamedParameters","alert_id","getAnalysis","getCodeqlDatabase","getDefaultSetup","getSarif","listAlertInstances","listAlertsForOrg","listAlertsForRepo","listAlertsInstances","listCodeqlDatabases","listRecentAnalyses","updateAlert","updateDefaultSetup","uploadSarif","codesOfConduct","getAllCodesOfConduct","getConductCode","codespaces","addRepositoryForSecretForAuthenticatedUser","checkPermissionsForDevcontainer","codespaceMachinesForAuthenticatedUser","createForAuthenticatedUser","createOrUpdateSecretForAuthenticatedUser","createWithPrForAuthenticatedUser","createWithRepoForAuthenticatedUser","deleteForAuthenticatedUser","deleteFromOrganization","deleteSecretForAuthenticatedUser","exportForAuthenticatedUser","getCodespacesForUserInOrg","getExportDetailsForAuthenticatedUser","getForAuthenticatedUser","getPublicKeyForAuthenticatedUser","getSecretForAuthenticatedUser","listDevcontainersInRepositoryForAuthenticatedUser","listForAuthenticatedUser","listInOrganization","org_id","listInRepositoryForAuthenticatedUser","listRepositoriesForSecretForAuthenticatedUser","listSecretsForAuthenticatedUser","preFlightWithRepoForAuthenticatedUser","publishForAuthenticatedUser","removeRepositoryForSecretForAuthenticatedUser","repoMachinesForAuthenticatedUser","setRepositoriesForSecretForAuthenticatedUser","startForAuthenticatedUser","stopForAuthenticatedUser","stopInOrganization","updateForAuthenticatedUser","copilot","addCopilotSeatsForTeams","addCopilotSeatsForUsers","cancelCopilotSeatAssignmentForTeams","cancelCopilotSeatAssignmentForUsers","getCopilotOrganizationDetails","getCopilotSeatDetailsForUser","listCopilotSeats","dependabot","listAlertsForEnterprise","dependencyGraph","createRepositorySnapshot","diffRange","exportSbom","emojis","gists","checkIsStarred","createComment","deleteComment","fork","getComment","getRevision","listComments","listForUser","listForks","listPublic","listStarred","star","unstar","updateComment","git","createBlob","createCommit","createRef","createTag","createTree","deleteRef","getBlob","getCommit","getRef","getTag","getTree","listMatchingRefs","updateRef","gitignore","getAllTemplates","getTemplate","interactions","getRestrictionsForAuthenticatedUser","getRestrictionsForOrg","getRestrictionsForRepo","getRestrictionsForYourPublicRepos","removeRestrictionsForAuthenticatedUser","removeRestrictionsForOrg","removeRestrictionsForRepo","removeRestrictionsForYourPublicRepos","setRestrictionsForAuthenticatedUser","setRestrictionsForOrg","setRestrictionsForRepo","setRestrictionsForYourPublicRepos","issues","addAssignees","addLabels","checkUserCanBeAssigned","checkUserCanBeAssignedToIssue","createLabel","createMilestone","deleteLabel","deleteMilestone","getEvent","getLabel","getMilestone","listAssignees","listCommentsForRepo","listEvents","listEventsForRepo","listEventsForTimeline","listForOrg","listForRepo","listLabelsForMilestone","listLabelsForRepo","listLabelsOnIssue","listMilestones","removeAllLabels","removeAssignees","removeLabel","setLabels","updateLabel","updateMilestone","licenses","getAllCommonlyUsed","getForRepo","markdown","render","renderRaw","meta","getAllVersions","getOctocat","getZen","migrations","cancelImport","deprecated","deleteArchiveForAuthenticatedUser","deleteArchiveForOrg","downloadArchiveForOrg","getArchiveForAuthenticatedUser","getCommitAuthors","getImportStatus","getLargeFiles","getStatusForAuthenticatedUser","getStatusForOrg","listReposForAuthenticatedUser","listReposForOrg","listReposForUser","mapCommitAuthor","setLfsPreference","startForOrg","startImport","unlockRepoForAuthenticatedUser","unlockRepoForOrg","updateImport","oidc","getOidcCustomSubTemplateForOrg","updateOidcCustomSubTemplateForOrg","orgs","addSecurityManagerTeam","assignTeamToOrgRole","assignUserToOrgRole","blockUser","cancelInvitation","checkBlockedUser","checkMembershipForUser","checkPublicMembershipForUser","convertMemberToOutsideCollaborator","createCustomOrganizationRole","createInvitation","createOrUpdateCustomProperties","createOrUpdateCustomPropertiesValuesForRepos","createOrUpdateCustomProperty","createWebhook","deleteCustomOrganizationRole","deleteWebhook","enableOrDisableSecurityProductOnAllOrgRepos","getAllCustomProperties","getCustomProperty","getMembershipForAuthenticatedUser","getMembershipForUser","getOrgRole","getWebhook","getWebhookConfigForOrg","listAppInstallations","listBlockedUsers","listCustomPropertiesValuesForRepos","listFailedInvitations","listInvitationTeams","listMembers","listMembershipsForAuthenticatedUser","listOrgRoleTeams","listOrgRoleUsers","listOrgRoles","listOrganizationFineGrainedPermissions","listOutsideCollaborators","listPatGrantRepositories","listPatGrantRequestRepositories","listPatGrantRequests","listPatGrants","listPendingInvitations","listPublicMembers","listSecurityManagerTeams","listWebhooks","patchCustomOrganizationRole","pingWebhook","removeCustomProperty","removeMember","removeMembershipForUser","removeOutsideCollaborator","removePublicMembershipForAuthenticatedUser","removeSecurityManagerTeam","reviewPatGrantRequest","reviewPatGrantRequestsInBulk","revokeAllOrgRolesTeam","revokeAllOrgRolesUser","revokeOrgRoleTeam","revokeOrgRoleUser","setMembershipForUser","setPublicMembershipForAuthenticatedUser","unblockUser","updateMembershipForAuthenticatedUser","updatePatAccess","updatePatAccesses","updateWebhook","updateWebhookConfigForOrg","packages","deletePackageForAuthenticatedUser","deletePackageForOrg","deletePackageForUser","deletePackageVersionForAuthenticatedUser","deletePackageVersionForOrg","deletePackageVersionForUser","getAllPackageVersionsForAPackageOwnedByAnOrg","getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser","getAllPackageVersionsForPackageOwnedByAuthenticatedUser","getAllPackageVersionsForPackageOwnedByOrg","getAllPackageVersionsForPackageOwnedByUser","getPackageForAuthenticatedUser","getPackageForOrganization","getPackageForUser","getPackageVersionForAuthenticatedUser","getPackageVersionForOrganization","getPackageVersionForUser","listDockerMigrationConflictingPackagesForAuthenticatedUser","listDockerMigrationConflictingPackagesForOrganization","listDockerMigrationConflictingPackagesForUser","listPackagesForAuthenticatedUser","listPackagesForOrganization","listPackagesForUser","restorePackageForAuthenticatedUser","restorePackageForOrg","restorePackageForUser","restorePackageVersionForAuthenticatedUser","restorePackageVersionForOrg","restorePackageVersionForUser","projects","addCollaborator","createCard","createColumn","createForOrg","createForRepo","deleteCard","deleteColumn","getCard","getColumn","getPermissionForUser","listCards","listCollaborators","listColumns","moveCard","moveColumn","removeCollaborator","updateCard","updateColumn","pulls","checkIfMerged","createReplyForReviewComment","createReview","createReviewComment","deletePendingReview","deleteReviewComment","dismissReview","getReview","getReviewComment","listCommentsForReview","listFiles","listRequestedReviewers","listReviewComments","listReviewCommentsForRepo","listReviews","removeRequestedReviewers","requestReviewers","submitReview","updateBranch","updateReview","updateReviewComment","rateLimit","reactions","createForCommitComment","createForIssue","createForIssueComment","createForPullRequestReviewComment","createForRelease","createForTeamDiscussionCommentInOrg","createForTeamDiscussionInOrg","deleteForCommitComment","deleteForIssue","deleteForIssueComment","deleteForPullRequestComment","deleteForRelease","deleteForTeamDiscussion","deleteForTeamDiscussionComment","listForCommitComment","listForIssue","listForIssueComment","listForPullRequestReviewComment","listForRelease","listForTeamDiscussionCommentInOrg","listForTeamDiscussionInOrg","acceptInvitation","acceptInvitationForAuthenticatedUser","addAppAccessRestrictions","mapToData","addStatusCheckContexts","addTeamAccessRestrictions","addUserAccessRestrictions","cancelPagesDeployment","checkAutomatedSecurityFixes","checkCollaborator","checkVulnerabilityAlerts","codeownersErrors","compareCommits","compareCommitsWithBasehead","createAutolink","createCommitComment","createCommitSignatureProtection","createCommitStatus","createDeployKey","createDeployment","createDeploymentBranchPolicy","createDeploymentProtectionRule","createDeploymentStatus","createDispatchEvent","createFork","createInOrg","createOrUpdateCustomPropertiesValues","createOrUpdateEnvironment","createOrUpdateFileContents","createOrgRuleset","createPagesDeployment","createPagesSite","createRelease","createRepoRuleset","createTagProtection","createUsingTemplate","declineInvitation","declineInvitationForAuthenticatedUser","deleteAccessRestrictions","deleteAdminBranchProtection","deleteAnEnvironment","deleteAutolink","deleteBranchProtection","deleteCommitComment","deleteCommitSignatureProtection","deleteDeployKey","deleteDeployment","deleteDeploymentBranchPolicy","deleteFile","deleteInvitation","deleteOrgRuleset","deletePagesSite","deletePullRequestReviewProtection","deleteRelease","deleteReleaseAsset","deleteRepoRuleset","deleteTagProtection","disableAutomatedSecurityFixes","disableDeploymentProtectionRule","disablePrivateVulnerabilityReporting","disableVulnerabilityAlerts","downloadArchive","downloadTarballArchive","downloadZipballArchive","enableAutomatedSecurityFixes","enablePrivateVulnerabilityReporting","enableVulnerabilityAlerts","generateReleaseNotes","getAccessRestrictions","getAdminBranchProtection","getAllDeploymentProtectionRules","getAllEnvironments","getAllStatusCheckContexts","getAllTopics","getAppsWithAccessToProtectedBranch","getAutolink","getBranch","getBranchProtection","getBranchRules","getClones","getCodeFrequencyStats","getCollaboratorPermissionLevel","getCombinedStatusForRef","getCommitActivityStats","getCommitComment","getCommitSignatureProtection","getCommunityProfileMetrics","getContent","getContributorsStats","getCustomDeploymentProtectionRule","getCustomPropertiesValues","getDeployKey","getDeployment","getDeploymentBranchPolicy","getDeploymentStatus","getEnvironment","getLatestPagesBuild","getLatestRelease","getOrgRuleSuite","getOrgRuleSuites","getOrgRuleset","getOrgRulesets","getPages","getPagesBuild","getPagesDeployment","getPagesHealthCheck","getParticipationStats","getPullRequestReviewProtection","getPunchCardStats","getReadme","getReadmeInDirectory","getReleaseAsset","getReleaseByTag","getRepoRuleSuite","getRepoRuleSuites","getRepoRuleset","getRepoRulesets","getStatusChecksProtection","getTeamsWithAccessToProtectedBranch","getTopPaths","getTopReferrers","getUsersWithAccessToProtectedBranch","getViews","getWebhookConfigForRepo","listActivities","listAutolinks","listBranches","listBranchesForHeadCommit","listCommentsForCommit","listCommitCommentsForRepo","listCommitStatusesForRef","listContributors","listCustomDeploymentRuleIntegrations","listDeployKeys","listDeploymentBranchPolicies","listDeploymentStatuses","listDeployments","listInvitations","listInvitationsForAuthenticatedUser","listLanguages","listPagesBuilds","listPullRequestsAssociatedWithCommit","listReleaseAssets","listReleases","listTagProtection","listTags","listTeams","mergeUpstream","removeAppAccessRestrictions","removeStatusCheckContexts","removeStatusCheckProtection","removeTeamAccessRestrictions","removeUserAccessRestrictions","renameBranch","replaceAllTopics","requestPagesBuild","setAdminBranchProtection","setAppAccessRestrictions","setStatusCheckContexts","setTeamAccessRestrictions","setUserAccessRestrictions","testPushWebhook","transfer","updateBranchProtection","updateCommitComment","updateDeploymentBranchPolicy","updateInformationAboutPagesSite","updateInvitation","updateOrgRuleset","updatePullRequestReviewProtection","updateRelease","updateReleaseAsset","updateRepoRuleset","updateStatusCheckPotection","updateStatusCheckProtection","updateWebhookConfigForRepo","uploadReleaseAsset","commits","issuesAndPullRequests","topics","users","secretScanning","listLocationsForAlert","securityAdvisories","createPrivateVulnerabilityReport","createRepositoryAdvisory","createRepositoryAdvisoryCveRequest","getGlobalAdvisory","getRepositoryAdvisory","listGlobalAdvisories","listOrgRepositoryAdvisories","listRepositoryAdvisories","updateRepositoryAdvisory","teams","addOrUpdateMembershipForUserInOrg","addOrUpdateProjectPermissionsInOrg","addOrUpdateRepoPermissionsInOrg","checkPermissionsForProjectInOrg","checkPermissionsForRepoInOrg","createDiscussionCommentInOrg","createDiscussionInOrg","deleteDiscussionCommentInOrg","deleteDiscussionInOrg","deleteInOrg","getByName","getDiscussionCommentInOrg","getDiscussionInOrg","getMembershipForUserInOrg","listChildInOrg","listDiscussionCommentsInOrg","listDiscussionsInOrg","listMembersInOrg","listPendingInvitationsInOrg","listProjectsInOrg","listReposInOrg","removeMembershipForUserInOrg","removeProjectInOrg","removeRepoInOrg","updateDiscussionCommentInOrg","updateDiscussionInOrg","updateInOrg","addEmailForAuthenticated","addEmailForAuthenticatedUser","addSocialAccountForAuthenticatedUser","block","checkBlocked","checkFollowingForUser","checkPersonIsFollowedByAuthenticated","createGpgKeyForAuthenticated","createGpgKeyForAuthenticatedUser","createPublicSshKeyForAuthenticated","createPublicSshKeyForAuthenticatedUser","createSshSigningKeyForAuthenticatedUser","deleteEmailForAuthenticated","deleteEmailForAuthenticatedUser","deleteGpgKeyForAuthenticated","deleteGpgKeyForAuthenticatedUser","deletePublicSshKeyForAuthenticated","deletePublicSshKeyForAuthenticatedUser","deleteSocialAccountForAuthenticatedUser","deleteSshSigningKeyForAuthenticatedUser","follow","getByUsername","getContextForUser","getGpgKeyForAuthenticated","getGpgKeyForAuthenticatedUser","getPublicSshKeyForAuthenticated","getPublicSshKeyForAuthenticatedUser","getSshSigningKeyForAuthenticatedUser","listBlockedByAuthenticated","listBlockedByAuthenticatedUser","listEmailsForAuthenticated","listEmailsForAuthenticatedUser","listFollowedByAuthenticated","listFollowedByAuthenticatedUser","listFollowersForAuthenticatedUser","listFollowersForUser","listFollowingForUser","listGpgKeysForAuthenticated","listGpgKeysForAuthenticatedUser","listGpgKeysForUser","listPublicEmailsForAuthenticated","listPublicEmailsForAuthenticatedUser","listPublicKeysForUser","listPublicSshKeysForAuthenticated","listPublicSshKeysForAuthenticatedUser","listSocialAccountsForAuthenticatedUser","listSocialAccountsForUser","listSshSigningKeysForAuthenticatedUser","listSshSigningKeysForUser","setPrimaryEmailVisibilityForAuthenticated","setPrimaryEmailVisibilityForAuthenticatedUser","unblock","unfollow","updateAuthenticated","endpoints_default","endpointMethodsMap","endpoints","methodName","decorations","endpointDefaults","descriptor","ownKeys","decorate","endpointsToMethods","newMethods","Proxy","requestWithDefaults","withDecorations","newScope","newMethodName","options2","alias","__create","__getProtoOf","getPrototypeOf","__toESM","isNodeMode","RequestError","import_deprecation","import_once","logOnceCode","deprecation","logOnceHeaders","requestCopy","Deprecation","import_endpoint","import_request_error","getBufferResponse","arrayBuffer","fetchWrapper","parseSuccessResponseBody","duplex","keyAndValue","deprecationLink","sunset","statusText","getResponseData","toErrorMessage","cause","oldEndpoint","endpointOptions","route2","parameters2","ContextAPI","NoopContextManager_1","global_utils_1","diag_1","API_NAME","NOOP_CONTEXT_MANAGER","NoopContextManager","getInstance","_instance","setGlobalContextManager","contextManager","registerGlobal","DiagAPI","_getContextManager","with","getGlobal","unregisterGlobal","ComponentLogger_1","logLevelLogger_1","types_1","_logProxy","funcName","setLogger","optionsOrLogLevel","DiagLogLevel","INFO","oldLogger","newLogger","createLogLevelDiagLogger","suppressOverrideMessage","createComponentLogger","DiagComponentLogger","MetricsAPI","NoopMeterProvider_1","setGlobalMeterProvider","getMeterProvider","NOOP_METER_PROVIDER","getMeter","PropagationAPI","NoopTextMapPropagator_1","TextMapPropagator_1","context_helpers_1","NOOP_TEXT_MAP_PROPAGATOR","NoopTextMapPropagator","createBaggage","getBaggage","getActiveBaggage","setBaggage","deleteBaggage","setGlobalPropagator","propagator","inject","carrier","setter","defaultTextMapSetter","_getGlobalPropagator","extract","defaultTextMapGetter","TraceAPI","ProxyTracerProvider_1","spancontext_utils_1","context_utils_1","_proxyTracerProvider","ProxyTracerProvider","deleteSpan","getActiveSpan","setGlobalTracerProvider","success","setDelegate","getTracerProvider","context_2","BAGGAGE_KEY","createContextKey","baggage","setValue","deleteValue","BaggageImpl","_entries","getEntry","entry","getAllEntries","setEntry","newBaggage","removeEntry","removeEntries","baggageEntryMetadataSymbol","baggageEntryMetadataFromString","baggage_impl_1","symbol_1","diag","__TYPE__","ROOT_CONTEXT","_context","BaseContext","parentContext","_currentContext","props","_namespace","logProxy","DiagConsoleLogger","consoleMap","_consoleFunc","theFunc","maxLevel","NONE","ALL","_filterFunc","theLevel","WARN","VERBOSE","propagation","metrics","INVALID_TRACEID","INVALID_SPANID","isValidSpanId","isValidTraceId","createTraceState","TraceFlags","SamplingDecision","ProxyTracer","ValueType","createNoopMeter","consoleLogger_1","NoopMeter_1","Metric_1","ProxyTracer_1","SamplingResult_1","span_kind_1","status_1","trace_flags_1","utils_2","invalid_span_constants_1","context_api_1","diag_api_1","metrics_api_1","propagation_api_1","trace_api_1","platform_1","version_1","semver_1","GLOBAL_OPENTELEMETRY_API_KEY","_global","_globalThis","allowOverride","globalVersion","isCompatible","_makeCompatibilityCheck","ownVersion","acceptedVersions","rejectedVersions","myVersionMatch","ownVersionParsed","isExactmatch","_reject","_accept","globalVersionMatch","globalVersionParsed","metrics_1","NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC","NOOP_OBSERVABLE_GAUGE_METRIC","NOOP_OBSERVABLE_COUNTER_METRIC","NOOP_UP_DOWN_COUNTER_METRIC","NOOP_HISTOGRAM_METRIC","NOOP_COUNTER_METRIC","NOOP_METER","NoopObservableUpDownCounterMetric","NoopObservableGaugeMetric","NoopObservableCounterMetric","NoopObservableMetric","NoopHistogramMetric","NoopUpDownCounterMetric","NoopCounterMetric","NoopMetric","NoopMeter","createHistogram","createCounter","createUpDownCounter","createObservableGauge","createObservableCounter","createObservableUpDownCounter","addBatchObservableCallback","_callback","_observables","removeBatchObservableCallback","_attributes","addCallback","removeCallback","NoopMeterProvider","__exportStar","propagation_1","_carrier","trace_1","NonRecordingSpan","_spanContext","addEvent","_status","updateName","_endTime","recordException","_exception","_time","NoopTracer","NonRecordingSpan_1","contextApi","parentFromContext","isSpanContext","startActiveSpan","arg2","arg3","arg4","contextWithSpanSet","NoopTracerProvider","NoopTracer_1","NOOP_TRACER","_provider","_getTracer","_fn","Reflect","_delegate","getDelegateTracer","NoopTracerProvider_1","NOOP_TRACER_PROVIDER","getDelegate","delegate","SPAN_KEY","TraceStateImpl","tracestate_validators_1","MAX_TRACE_STATE_ITEMS","MAX_TRACE_STATE_LEN","LIST_MEMBERS_SEPARATOR","LIST_MEMBER_KEY_VALUE_SPLITTER","rawTraceState","_internalState","_clone","unset","_keys","agg","listMember","validateKey","validateValue","VALID_KEY_CHAR_RANGE","VALID_KEY","VALID_VENDOR_KEY","VALID_KEY_REGEX","VALID_VALUE_BASE_REGEX","INVALID_VALUE_COMMA_EQUAL_REGEX","tracestate_impl_1","VALID_TRACEID_REGEX","VALID_SPANID_REGEX","serial","serialOrdered","jobs","defer","isAsync","async_callback","nextTick_callback","iterate","runJob","sortMethod","isNamedList","keyedList","terminator","ascending","descending","iteratorHandler","balanced","maybeMatch","pre","reg","begs","beg","left","right","ai","bi","register","addHook","removeHook","Function","bindable","bindApi","removeHookRef","HookSingular","singularHookName","singularHookState","registry","singularHook","HookCollection","collectionHookDeprecationMessageDisplayed","Hook","Singular","orig","result_","registered","concatMap","expandTop","escSlash","escOpen","escClose","escComma","escPeriod","escapeBraces","unescapeBraces","parseCommaParts","postParts","identity","embrace","isPadded","el","y","isTop","expansions","isNumericSequence","isAlphaSequence","isSequence","isOptions","N","incr","abs","pad","need","expansion","DelayedStream","dataSize","maxDataSize","pauseStreams","_released","_currentStream","_insideLoop","_pendingNext","combinedStream","isStreamLike","newStream","pauseStream","_checkDataSize","_handleErrors","_getNext","_realGetNext","_pipeNext","getStream","_emitError","_reset","_updateDataSize","xs","_maxDataSizeExceeded","_bufferedEvents","delayedStream","realEmit","_handleEmit","setEncoding","_checkIfMaxDataSizeExceeded","ctor","prot","loader","dumper","Type","Schema","FAILSAFE_SCHEMA","JSON_SCHEMA","CORE_SCHEMA","DEFAULT_SCHEMA","loadAll","YAMLException","binary","float","null","bool","int","omap","seq","safeLoad","safeLoadAll","safeDump","isNothing","subject","sequence","sourceKeys","string","cycle","isNegativeZero","NEGATIVE_INFINITY","common","_toString","_hasOwnProperty","CHAR_BOM","CHAR_TAB","CHAR_LINE_FEED","CHAR_CARRIAGE_RETURN","CHAR_SPACE","CHAR_EXCLAMATION","CHAR_DOUBLE_QUOTE","CHAR_SHARP","CHAR_PERCENT","CHAR_AMPERSAND","CHAR_SINGLE_QUOTE","CHAR_ASTERISK","CHAR_COMMA","CHAR_MINUS","CHAR_COLON","CHAR_EQUALS","CHAR_GREATER_THAN","CHAR_QUESTION","CHAR_COMMERCIAL_AT","CHAR_LEFT_SQUARE_BRACKET","CHAR_RIGHT_SQUARE_BRACKET","CHAR_GRAVE_ACCENT","CHAR_LEFT_CURLY_BRACKET","CHAR_VERTICAL_LINE","CHAR_RIGHT_CURLY_BRACKET","ESCAPE_SEQUENCES","DEPRECATED_BOOLEANS_SYNTAX","DEPRECATED_BASE60_SYNTAX","compileStyleMap","style","compiledTypeMap","styleAliases","encodeHex","handle","QUOTING_TYPE_SINGLE","QUOTING_TYPE_DOUBLE","State","noArrayIndent","skipInvalid","flowLevel","styleMap","sortKeys","lineWidth","noRefs","noCompatMode","condenseFlow","quotingType","forceQuotes","replacer","implicitTypes","compiledImplicit","explicitTypes","compiledExplicit","duplicates","usedDuplicates","indentString","spaces","ind","generateNextLine","testImplicitResolving","isWhitespace","isPrintable","isNsCharOrWhitespace","isPlainSafe","inblock","cIsNsCharOrWhitespace","cIsNsChar","isPlainSafeFirst","isPlainSafeLast","codePointAt","second","needIndentIndicator","leadingSpaceRe","STYLE_PLAIN","STYLE_SINGLE","STYLE_LITERAL","STYLE_FOLDED","STYLE_DOUBLE","chooseScalarStyle","singleLineOnly","indentPerLevel","testAmbiguousType","prevChar","hasLineBreak","hasFoldableLine","shouldTrackWidth","previousLineBreak","plain","writeScalar","iskey","testAmbiguity","blockHeader","dropEndingNewline","foldString","escapeString","indentIndicator","clip","keep","chomp","lineRe","nextLF","foldLine","prevMoreIndented","moreIndented","breakRe","curr","escapeSeq","writeFlowSequence","_result","_tag","writeNode","writeBlockSequence","compact","writeFlowMapping","objectKeyList","objectKey","objectValue","pairBuffer","writeBlockMapping","explicitPair","detectType","explicit","typeList","instanceOf","multi","representName","represent","defaultStyle","isblockseq","tagStr","objectOrArray","duplicateIndex","duplicate","getDuplicateReferences","objects","duplicatesIndexes","inspectNode","formatError","exception","mark","column","snippet","makeSnippet","CONTEXT_FLOW_IN","CONTEXT_FLOW_OUT","CONTEXT_BLOCK_IN","CONTEXT_BLOCK_OUT","CHOMPING_CLIP","CHOMPING_STRIP","CHOMPING_KEEP","PATTERN_NON_PRINTABLE","PATTERN_NON_ASCII_LINE_BREAKS","PATTERN_FLOW_INDICATORS","PATTERN_TAG_HANDLE","PATTERN_TAG_URI","_class","is_EOL","is_WHITE_SPACE","is_WS_OR_EOL","is_FLOW_INDICATOR","fromHexCode","escapedHexLen","fromDecimalCode","simpleEscapeSequence","charFromCodepoint","simpleEscapeCheck","simpleEscapeMap","onWarning","legacy","typeMap","lineStart","lineIndent","firstTabInLine","documents","generateError","throwError","throwWarning","directiveHandlers","YAML","handleYamlDirective","checkLineBreaks","TAG","handleTagDirective","tagMap","captureSegment","checkJson","_length","_character","mergeMappings","destination","overridableKeys","quantity","storeMappingPair","keyTag","keyNode","valueNode","startLineStart","startPos","readLineBreak","skipSeparationSpace","allowComments","checkIndent","lineBreaks","testDocumentSeparator","writeFoldedLines","readPlainScalar","nodeIndent","withinFlowCollection","preceding","following","captureStart","captureEnd","hasPendingContent","_line","_lineStart","_lineIndent","_kind","readSingleQuotedScalar","readDoubleQuotedScalar","hexLength","hexResult","readFlowCollection","readNext","_pos","_anchor","anchor","isPair","isExplicitPair","isMapping","anchorMap","composeNode","readBlockScalar","folding","chomping","didReadContent","detectedIndent","textIndent","emptyLines","atMoreIndented","readBlockSequence","detected","readBlockMapping","flowIndent","allowCompact","_keyLine","_keyLineStart","_keyPos","atExplicitKey","readTagProperty","isVerbatim","isNamed","tagHandle","tagName","readAnchorProperty","readAlias","parentIndent","nodeContext","allowToSeek","allowBlockStyles","allowBlockScalars","allowBlockCollections","indentStatus","atNewLine","hasContent","typeQuantity","blockIndent","construct","readDocument","documentStart","directiveName","directiveArgs","hasDirectives","loadDocuments","nullpos","compileList","currentType","newIndex","previousType","previousIndex","compileMap","scalar","mapping","fallback","collectType","definition","implicit","loadKind","getLine","lineEnd","maxLineLength","maxHalfLength","maxLength","linesBefore","linesAfter","lineStarts","lineEnds","foundLineNo","lineNoLength","TYPE_CONSTRUCTOR_OPTIONS","YAML_NODE_KINDS","compileStyleAliases","BASE64_MAP","resolveYamlBinary","idx","bitlen","constructYamlBinary","tailbits","bits","representYamlBinary","isBinary","resolveYamlBoolean","constructYamlBoolean","isBoolean","lowercase","uppercase","camelcase","YAML_FLOAT_PATTERN","resolveYamlFloat","constructYamlFloat","sign","POSITIVE_INFINITY","NaN","SCIENTIFIC_WITHOUT_DOT","representYamlFloat","isFloat","isHexCode","isOctCode","isDecCode","resolveYamlInteger","hasDigits","constructYamlInteger","octal","decimal","hexadecimal","resolveYamlMerge","resolveYamlNull","constructYamlNull","isNull","canonical","empty","resolveYamlOmap","objectKeys","pairKey","pairHasKey","constructYamlOmap","resolveYamlPairs","constructYamlPairs","resolveYamlSet","constructYamlSet","YAML_DATE_REGEXP","YAML_TIMESTAMP_REGEXP","resolveYamlTimestamp","constructYamlTimestamp","year","month","day","hour","minute","fraction","delta","tz_hour","tz_minute","UTC","setTime","representYamlTimestamp","db","EXTRACT_TYPE_REGEXP","TEXT_TYPE_REGEXP","charsets","populateMaps","exts","preference","forEachMimeType","GLOBSTAR","plTypes","qmark","twoStarDot","twoStarNoDot","reSpecials","charSet","slashSplit","makeRe","braceExpand","assertValidPattern","allowWindowsEscape","regexp","partial","make","parseNegate","globSet","globParts","si","negateOffset","MAX_PATTERN_LENGTH","SUBPARSE","noglobstar","hasMagic","patternListStack","negativeLists","stateChar","inClass","reClassStart","classStart","patternStart","clearStateChar","reStart","pl","reEnd","cs","sp","$1","$2","addPatternStart","nl","nlBefore","nlFirst","nlLast","nlAfter","openParensBefore","cleanAfter","dollar","newRe","globUnescape","regExp","_glob","_src","twoStar","ex","nonull","matchBase","flipNegate","fi","pi","fl","fr","swallowee","_interopDefault","Url","whatwgUrl","zlib","BUFFER","TYPE","blobParts","ab","relativeStart","relativeEnd","slicedBuffer","defineProperties","toStringTag","FetchError","systemError","errno","convert","INTERNALS","PassThrough","Body","_this","_ref","_ref$size","_ref$timeout","isURLSearchParams","isBlob","disturbed","bodyUsed","consumeBody","ct","_this2","textConverted","_this3","convertBody","mixIn","proto","_this4","accum","accumBytes","resTimeout","getAll","p1","p2","extractContentType","getTotalBytes","_lengthRetrievers","writeToStream","invalidTokenRegex","invalidHeaderCharRegex","validateName","_pairs$i","createHeadersIterator","HeadersIteratorPrototype","_INTERNAL","exportNodeCompatibleHeaders","hostHeaderKey","createHeadersLenient","INTERNALS$1","STATUS_CODES","Response","counter","redirected","INTERNALS$2","parse_url","format_url","parseURL","streamDestructionSupported","isRequest","isAbortSignal","Request","parsedURL","inputBody","getNodeRequestOptions","contentLengthValue","URL$1","PassThrough$1","isDomainOrSubdomain","isSameProtocol","send","destroyStream","abortAndFinalize","finalize","reqTimeout","fixResponseChunkedTransferBadEnding","addListener","hadError","hasDataListener","listenerCount","isRedirect","locationURL","requestOpts","response_options","codings","zlibOptions","flush","Z_SYNC_FLUSH","finishFlush","createGunzip","createInflate","createInflateRaw","createBrotliDecompress","errorCallback","wrappy","onceStrict","onceError","sax","opt","SAXParser","SAXStream","createStream","MAX_BUFFER_LENGTH","EVENTS","clearBuffers","bufferCheckPosition","lowercasetags","looseCase","closedRoot","sawRoot","noscript","S","BEGIN","strictEntities","ENTITIES","XML_ENTITIES","attribList","rootNS","trackPosition","F","newf","checkBufferLength","maxAllowed","maxActual","closeText","emitNode","flushBuffers","streamWraps","me","onend","onerror","_decoder","SD","CDATA","DOCTYPE","XML_NAMESPACE","XMLNS_NAMESPACE","nameStart","nameBody","entityStart","entityBody","isQuote","isAttribEnd","notMatch","STATE","BEGIN_WHITESPACE","TEXT","TEXT_ENTITY","OPEN_WAKA","SGML_DECL","SGML_DECL_QUOTED","DOCTYPE_QUOTED","DOCTYPE_DTD","DOCTYPE_DTD_QUOTED","COMMENT_STARTING","COMMENT","COMMENT_ENDING","COMMENT_ENDED","CDATA_ENDING","CDATA_ENDING_2","PROC_INST","PROC_INST_BODY","PROC_INST_ENDING","OPEN_TAG","OPEN_TAG_SLASH","ATTRIB","ATTRIB_NAME","ATTRIB_NAME_SAW_WHITE","ATTRIB_VALUE","ATTRIB_VALUE_QUOTED","ATTRIB_VALUE_CLOSED","ATTRIB_VALUE_UNQUOTED","ATTRIB_VALUE_ENTITY_Q","ATTRIB_VALUE_ENTITY_U","CLOSE_TAG","CLOSE_TAG_SAW_WHITE","SCRIPT","SCRIPT_ENDING","amp","quot","apos","AElig","Aacute","Acirc","Agrave","Aring","Atilde","Auml","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","Iacute","Icirc","Igrave","Iuml","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","aelig","agrave","aring","atilde","auml","ccedil","eacute","ecirc","egrave","eth","euml","iacute","icirc","igrave","iuml","ntilde","oacute","ocirc","ograve","oslash","otilde","ouml","szlig","thorn","uacute","ucirc","ugrave","uuml","yacute","yuml","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","ordf","laquo","not","shy","macr","deg","plusmn","sup1","sup2","sup3","acute","micro","para","middot","cedil","ordm","raquo","frac14","frac12","frac34","iquest","times","divide","OElig","oelig","Scaron","scaron","Yuml","fnof","circ","tilde","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","bull","hellip","permil","prime","Prime","lsaquo","rsaquo","oline","frasl","euro","image","weierp","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","exist","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","infin","ang","and","or","cap","cup","there4","sim","cong","asymp","ne","equiv","le","ge","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","rang","loz","spades","clubs","hearts","diams","nodeType","textNode","textopts","strictFail","newTag","qname","attribute","qualName","local","attrib","attribName","attribValue","qn","openTag","selfClosing","nv","isSelfClosing","closeTag","closeTo","parseEntity","entity","entityLC","numStr","fromCodePoint","beginWhiteSpace","startTagPosition","starti","sgmlDecl","procInstName","procInstBody","returnState","stringFromCharCode","MAX_SIZE","codeUnits","highSurrogate","lowSurrogate","codePoint","tok","makeSafeRe","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","RANDOM_CHARS","TEMPLATE_PATTERN","DEFAULT_TRIES","CREATE_FLAGS","O_CREAT","O_EXCL","O_RDWR","IS_WIN32","EBADF","ENOENT","DIR_MODE","FILE_MODE","EXIT","_removeObjects","FN_RMDIR_SYNC","rmdirSync","_gracefulCleanup","rimraf","dirPath","FN_RIMRAF_SYNC","rmSync","_parseArguments","_assertAndSanitizeOptions","tries","_getUniqueName","_generateTmpName","_tmpNameCreated","_fileCreated","discardDescriptor","_discardCallback","possibleErr","_prepareTmpFileRemoveCallback","discardOrDetachDescriptor","detachDescriptor","fileSync","_dirCreated","_prepareTmpDirRemoveCallback","dirSync","_removeFileAsync","fdPath","_handler","_isENOENT","_removeFileSync","rethrownException","_isEBADF","unlinkSync","removeCallbackSync","_prepareRemoveCallback","removeFunction","unsafeCleanup","removeFunctionSync","fileOrDirName","cleanupCallbackSync","_cleanupCallback","toRemove","_garbageCollector","_randomChars","howMany","rnd","pseudoRandomBytes","_isBlank","_isUndefined","actualOptions","pid","_getTmpDir","_assertIsRelative","_resolvePath","isAbsolute","resolvedPath","_isExpectedError","setGracefulCleanup","punycode","mappingTable","PROCESSING_OPTIONS","TRANSITIONAL","NONTRANSITIONAL","findStatus","mid","regexAstralSymbols","countSymbols","mapChars","domain_name","useSTD3","processing_option","hasError","processed","combiningMarksRegex","validateLabel","toUnicode","processing","validation","toASCII","verifyDnsLength","total","domain","__extends","__assign","__decorate","__param","__esDecorate","__runInitializers","__propKey","__setFunctionName","__metadata","__generator","__read","__spread","__spreadArrays","__spreadArray","__makeTemplateObject","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","__disposeResources","define","amd","createExporter","previous","exporter","extendStatics","__","getOwnPropertySymbols","propertyIsEnumerable","decorators","paramIndex","decorator","descriptorIn","contextIn","initializers","extraInitializers","addInitializer","useValue","metadataKey","metadataValue","sent","trys","ops","throw","il","jl","pack","cooked","receiver","asyncDispose","_SuppressedError","SuppressedError","suppressed","fail","rec","net","tls","assert","TunnelingAgent","createSocket","createSecureSocket","defaultMaxSockets","requests","sockets","onFree","localAddress","toOptions","pending","onSocket","removeSocket","addRequest","mergeOptions","onCloseOrRemove","placeholder","connectOptions","connectReq","useChunkedEncodingByDefault","onUpgrade","onConnect","upgrade","hostHeader","getHeader","tlsOptions","servername","secureSocket","connect","keyLen","Client","Dispatcher","Pool","BalancedPool","InvalidArgumentError","buildConnector","MockClient","MockAgent","MockPool","mockErrors","RetryHandler","getGlobalDispatcher","setGlobalDispatcher","DecoratorHandler","RedirectHandler","createRedirectInterceptor","hasCrypto","makeDispatcher","parseOrigin","origin","nodeMajor","nodeMinor","fetchImpl","FileReader","setGlobalOrigin","getGlobalOrigin","CacheStorage","kConstruct","caches","deleteCookie","getCookies","getSetCookies","setCookie","parseMIMEType","serializeAMimeType","WebSocket","kClients","kRunning","kClose","kDestroy","kDispatch","kInterceptors","DispatcherBase","WeakRef","FinalizationRegistry","kOnConnect","kOnDisconnect","kOnConnectionError","kMaxRedirections","kOnDrain","kFactory","kFinalizer","kOptions","defaultFactory","connections","maxRedirections","interceptors","deepClone","deref","dispatch","closePromises","destroyPromises","addAbortListener","RequestAbortedError","kListener","kSignal","addSignal","removeSignal","AsyncResource","SocketError","ConnectHandler","opaque","responseHeaders","onHeaders","parseRawHeaders","runInAsyncScope","queueMicrotask","connectHandler","Duplex","InvalidReturnValueError","kResume","PipelineRequest","PipelineResponse","endEmitted","PipelineHandler","onInfo","nop","readableObjectMode","objectMode","destroyed","ended","onComplete","trailers","pipelineHandler","getResolveErrorBodyCallback","RequestHandler","throwOnError","StreamHandler","needDrain","writableNeedDrain","_writableState","UpgradeHandler","strictEqual","upgradeHandler","NotSupportedError","ReadableStreamFrom","toUSVString","kConsume","kReading","kBody","kAbort","kContentType","BodyReadable","dataEmitted","errorEmitted","readableLength","consumePush","consume","isDisturbed","getReader","locked","limit","throwIfAborted","signalListenerCleanup","isLocked","isUnusable","consumeFinish","consumeStart","consumeEnd","ResponseStatusCodeError","BalancedPoolMissingUpstreamError","PoolBase","kNeedDrain","kAddClient","kRemoveClient","kGetDispatcher","kUrl","kGreatestCommonDivisor","kCurrentWeight","kIndex","kWeight","kMaxWeightPerServer","kErrorPenalty","getGreatestCommonDivisor","upstreams","maxWeightPerServer","errorPenalty","upstream","addUpstream","_updateBalancedPoolStats","upstreamOrigin","pool","removeUpstream","allClientsBusy","maxWeightIndex","urlEquals","fieldValues","getFieldValues","kEnumerableProperty","kHeadersList","webidl","cloneResponse","kState","kHeaders","kGuard","kRealm","fetching","urlIsHttpHttpsScheme","createDeferredPromise","readAllBytes","relevantRequestResponseList","illegalConstructor","brandCheck","argumentLengthCheck","converters","RequestInfo","CacheQueryOptions","matchAll","ignoreMethod","requestResponse","requestResponses","queryCache","responseList","responseObject","headersList","responseArrayPromise","addAll","responsePromises","requestList","fetchControllers","initiator","responsePromise","processResponse","fieldValue","processResponseEndOfBody","DOMException","cacheJobPromise","errorData","batchCacheOperations","innerRequest","innerResponse","clonedResponse","bodyReadPromise","reader","requestObject","backupCache","addedItems","resultList","requestQuery","targetStorage","storage","cachedRequest","cachedResponse","requestMatchesCachedItem","queryURL","cachedURL","ignoreSearch","ignoreVary","requestValue","queryValue","cacheQueryOptionConverters","converter","boolean","dictionaryConverter","MultiCacheQueryOptions","DOMString","interfaceConverter","sequenceConverter","cacheName","cacheList","URLSerializer","isValidHeaderName","A","B","excludeFragment","serializedA","serializedB","timers","RequestContentLengthMismatchError","ResponseContentLengthMismatchError","HeadersTimeoutError","HeadersOverflowError","InformationalError","BodyTimeoutError","HTTPParserError","ResponseExceededMaxSizeError","ClientDestroyedError","kReset","kServerName","kClient","kBusy","kParser","kConnect","kBlocking","kResuming","kPending","kSize","kWriting","kQueue","kConnected","kConnecting","kNoRef","kKeepAliveDefaultTimeout","kHostHeader","kPendingIdx","kRunningIdx","kError","kPipelining","kSocket","kKeepAliveTimeoutValue","kMaxHeadersSize","kKeepAliveMaxTimeout","kKeepAliveTimeoutThreshold","kHeadersTimeout","kBodyTimeout","kStrictContentLength","kConnector","kMaxRequests","kCounter","kLocalAddress","kMaxResponseSize","kHTTPConnVersion","kHost","kHTTP2Session","kHTTP2SessionState","kHTTP2BuildRequest","kHTTP2CopyHeaders","kHTTP1BuildRequest","http2","HTTP2_HEADER_AUTHORITY","HTTP2_HEADER_METHOD","HTTP2_HEADER_PATH","HTTP2_HEADER_SCHEME","HTTP2_HEADER_CONTENT_LENGTH","HTTP2_HEADER_EXPECT","HTTP2_HEADER_STATUS","h2ExperimentalWarned","FastBuffer","species","kClosedResolve","channels","diagnosticsChannel","sendHeaders","channel","beforeConnect","connectError","connected","hasSubscribers","headersTimeout","requestTimeout","connectTimeout","bodyTimeout","idleTimeout","keepAliveTimeout","maxKeepAliveTimeout","keepAliveMaxTimeout","keepAliveTimeoutThreshold","socketPath","strictContentLength","maxCachedSessions","maxRequestsPerClient","maxResponseSize","autoSelectFamily","autoSelectFamilyAttemptTimeout","allowH2","maxConcurrentStreams","isIP","nodeHasAutoSelectFamily","openStreams","bodyLength","isIterable","errorRequest","onHttp2SessionError","onHttp2FrameError","onHttp2SessionEnd","onHTTP2GoAway","EMPTY_BUF","lazyllhttp","llhttpWasmData","JEST_WORKER_ID","WebAssembly","compile","instantiate","wasm_on_url","at","wasm_on_status","currentParser","ptr","currentBufferPtr","currentBufferRef","onStatus","wasm_on_message_begin","onMessageBegin","wasm_on_header_field","onHeaderField","wasm_on_header_value","onHeaderValue","wasm_on_headers_complete","shouldKeepAlive","onHeadersComplete","wasm_on_body","onBody","wasm_on_message_complete","onMessageComplete","llhttpInstance","llhttpPromise","currentBufferSize","TIMEOUT_HEADERS","TIMEOUT_BODY","TIMEOUT_IDLE","llhttp","llhttp_alloc","RESPONSE","timeoutValue","timeoutType","headersSize","headersMaxSize","paused","connection","onParserTimeout","llhttp_resume","readMore","free","malloc","memory","llhttp_execute","llhttp_get_error_pos","PAUSED_UPGRADE","PAUSED","llhttp_get_error_reason","llhttp_free","trackHeader","onSocketError","onSocketReadable","onSocketEnd","onSocketClose","getSocketInfo","parseKeepAliveTimeout","ip","publish","connectParams","connector","isH2","alpnProtocol","emitWarning","session","createConnection","peerMaxConcurrentStreams","emitDrain","_resume","idempotent","isAsyncIterable","shouldSendContentLength","writeH2","blocking","expectsPayload","onRequestSent","cork","uncork","onBodySent","isBlobLike","writeIterable","writeBlob","expectContinue","reqHeaders","h2State","endStream","shouldEndStream","writeBodyH2","realHeaders","streams","h2stream","onPipeData","writer","AsyncWriter","onDrain","onFinished","waitForDrain","bytesWritten","CompatWeakRef","CompatFinalizer","finalizer","NODE_V8_COVERAGE","maxAttributeValueSize","maxNameValuePairSize","parseSetCookie","getHeadersList","cookie","piece","DeleteCookieAttributes","expires","cookies","Cookie","nullableConverter","USVString","isCTLExcludingHtab","collectASequenceOfCodePointsFast","nameValuePair","unparsedAttributes","parseUnparsedAttributes","cookieAttributeList","cookieAv","attributeName","attributeValue","attributeNameLowercase","expiryTime","charCode","deltaSeconds","cookieDomain","cookiePath","secure","httpOnly","enforcement","attributeValueLowercase","sameSite","unparsed","validateCookieName","validateCookieValue","validateCookiePath","validateCookieDomain","toIMFDate","months","dayName","getUTCDay","getUTCDate","getUTCMonth","getUTCFullYear","getUTCHours","getUTCMinutes","getUTCSeconds","validateCookieMaxAge","kHeadersListNode","symbol","ConnectTimeoutError","SessionCache","WeakSessionCache","_maxCachedSessions","_sessionCache","_sessionRegistry","sessionKey","SimpleSessionCache","oldestKey","sessionCache","httpSocket","getServerName","ALPNProtocols","keepAliveInitialDelay","setKeepAlive","cancelTimeout","setupTimeout","onConnectTimeout","setNoDelay","s1","s2","timeoutId","clearImmediate","UndiciError","ClientClosedError","RequestRetryError","tokenRegExp","headerCharRegex","invalidPathRegex","kHandler","extractBody","bodySent","rState","endHandler","isFormDataLike","buildURL","processHeader","bodyStream","validateHandler","onFinally","addHeader","processHeaderValue","skipAppend","kKeepAlive","kBodyUsed","kQueued","kFree","kClosed","kDestroyed","kOnDestroyed","kProxy","kRetryHandlerDefaultRetry","IncomingMessage","nodeUtil","getHostname","isDestroyed","isReadableAborted","KEEPALIVE_TIMEOUT_EXPR","hasContentLength","contentDispositionIdx","readableDidRead","isErrored","isReadable","localPort","remoteAddress","remotePort","remoteFamily","convertIterableToBuffer","iterable","pull","enqueue","desiredSize","hasToWellFormed","toWellFormed","parseRangeHeader","safeHTTPMethods","kOnClosed","kInterceptedDispatch","newInterceptors","interceptor","onClosed","callbacks","onDestroyed","isReadableStreamLike","readableStreamClose","fullyReadBody","structuredClone","NativeFile","isUint8Array","isArrayBuffer","UndiciFile","textEncoder","TextEncoder","textDecoder","keepalive","encode","URLSearchParams","normalizeLinefeeds","rn","hasUnknownSizeValue","safelyExtractBody","cloneBody","out1","out2","tee","out2Clone","finalClone","bodyMixinMethods","methods","specConsumeBody","mimeType","bodyMimeType","utf8DecodeBytes","parseJSONFromBytes","responseFormData","busboy","base64chunk","busboyResolve","streamingDecoder","ignoreBOM","mixinBody","convertBytesToJSValue","bodyUnusable","errorSteps","successSteps","MessageChannel","receiveMessageOnPort","corsSafeListedMethods","corsSafeListedMethodsSet","nullBodyStatus","redirectStatus","redirectStatusSet","badPorts","badPortsSet","referrerPolicy","referrerPolicySet","requestRedirect","safeMethods","safeMethodsSet","requestMode","requestCredentials","requestCache","requestBodyHeader","requestDuplex","forbiddenMethods","forbiddenMethodsSet","subresource","subresourceSet","atob","port1","port2","postMessage","isomorphicDecode","encoder","HTTP_TOKEN_CODEPOINTS","HTTP_WHITESPACE_REGEX","HTTP_QUOTED_STRING_TOKENS","dataURLProcessor","dataURL","mimeTypeLength","removeASCIIWhitespace","encodedBody","stringPercentDecode","stringBody","forgivingBase64","mimeTypeRecord","hashLength","collectASequenceOfCodePoints","percentDecode","nextTwoBytes","bytePoint","removeHTTPWhitespace","subtype","typeLowercase","subtypeLowercase","essence","collectAnHTTPQuotedString","extractValue","positionStart","quoteOrBackslash","serialization","isHTTPWhiteSpace","leading","trailing","lead","trail","isASCIIWhitespace","fileBits","FilePropertyBag","substep","processBlobParts","FileLike","blobLike","BlobPart","V","isAnyArrayBuffer","BufferSource","endings","convertLineEndingsNative","isTypedArray","nativeLineEnding","isFileLike","makeIterator","form","conversionFailed","makeEntry","callbackFn","globalOrigin","newOrigin","isValidHeaderValue","kHeadersMap","kHeadersSortedMap","isHTTPWhiteSpaceCharCode","headerValueNormalize","potentialValue","appendHeader","invalidArgument","HeadersList","lowercaseName","HeadersInit","ByteString","getSetCookie","makeNetworkError","makeAppropriateNetworkError","filterResponse","makeResponse","makeRequest","bytesMatch","makePolicyContainer","clonePolicyContainer","requestBadPort","TAOCheck","appendRequestOriginHeader","responseLocationURL","requestCurrentURL","setRequestReferrerPolicyOnRedirect","tryUpgradeRequestToAPotentiallyTrustworthyURL","createOpaqueTimingInfo","appendFetchMetadata","corsCheck","crossOriginResourcePolicyCheck","determineRequestsReferrer","coarsenedSharedCurrentTime","sameOrigin","isErrorLike","isomorphicEncode","urlIsLocal","urlHasHttpsScheme","EE","TransformStream","GET_OR_HEAD","resolveObjectURL","Fetch","setMaxListeners","terminate","serializedAbortReason","abortFetch","globalObject","serviceWorkers","relevantRealm","locallyAborted","handleFetchDone","finalizeAndReportTiming","initiatorType","urlList","originalURL","timingInfo","cacheState","timingAllowPassed","endTime","markResourceTiming","performance","processRequestBodyChunkLength","processRequestEndOfBody","processResponseConsumeBody","useParallelQueue","taskDestination","crossOriginIsolatedCapability","currenTime","fetchParams","window","policyContainer","priority","mainFetch","localURLsOnly","referrer","currentURL","responseTainting","schemeFetch","httpFetch","timingAllowFailed","rangeRequested","integrity","processBodyError","fetchFinale","processBody","redirectCount","blobURLEntry","blobURLEntryObject","bodyWithType","dataURLStruct","finalizeResponse","processResponseDone","identityTransformAlgorithm","transformStream","transform","pipeThrough","nullOrBytes","failure","actualResponse","httpNetworkOrCacheFetch","httpRedirectFetch","redirectEndTime","postRedirectStartTime","redirectStartTime","isAuthenticationFetch","isNewConnectionFetch","httpFetchParams","httpCache","revalidatingFlag","includeCredentials","contentLengthHeaderValue","esbuildDetection","preventNoCacheCacheControlHeaderModification","forwardResponse","httpNetworkFetch","requestIncludesCredentials","forceNewConnection","newConnection","processBodyChunk","processEndOfBody","pullAlgorithm","cancelAlgorithm","onAborted","isFailure","encodedBodySize","decodedBodySize","isMockActive","decoders","willFollow","coding","fillHeaders","isValidHTTPToken","normalizeMethod","normalizeMethodRecord","getMaxListeners","getEventListeners","defaultMaxListeners","kAbortController","requestFinalizer","RequestInit","settingsObject","fallbackMode","unsafeRequest","reloadNavigation","historyNavigation","initHasKey","parsedReferrer","acRef","initBody","extractedBody","inputOrInitBody","useCORSPreflightFlag","finalBody","identityTransform","isReloadNavigation","isHistoryNavigation","clonedRequest","cloneRequest","clonedRequestObject","reservedClient","replacesClientId","useCredentials","cryptoGraphicsNonceMetadata","parserMetadata","userActivation","taintedOrigin","BodyInit","isValidReasonPhrase","serializeJavascriptValueToJSONString","ResponseInit","initializeResponse","clonedResponseObject","newResponse","makeFilteredResponse","XMLHttpRequestBodyInit","isDataView","referrerPolicyTokens","responseURL","requestFragment","isTokenCharCode","characters","policyHeader","serializedOrigin","finalServiceWorkerStartTime","finalNetworkResponseStartTime","finalNetworkRequestStartTime","finalConnectionTimingInfo","referrerSource","referrerURL","stripURLForReferrer","referrerOrigin","areSameOrigin","isNonPotentiallyTrustWorthy","isURLPotentiallyTrustworthy","originOnly","isOriginPotentiallyTrustworthy","originAsURL","metadataList","parsedMetadata","parseMetadata","algo","strongest","algorithm","expectedValue","actualValue","actualBase64URL","parseHashWithOptions","supportedHashes","getHashes","parsedToken","groups","rej","OPTIONS","esIteratorPrototype","iteratorResult","MAXIMUM_ARGUMENT_LENGTH","hasOwn","plural","I","ConvertToInt","bitLength","signedness","upperBound","lowerBound","enforceRange","IntegerPart","clamp","is","recordConverter","keyConverter","valueConverter","O","isProxy","typedKey","typedValue","hasDefault","legacyNullToEmptyString","allowShared","isSharedArrayBuffer","TypedArray","T","getEncoding","staticPropertyDescriptors","readOperation","fireAProgressEvent","kResult","kEvents","kAborted","EventTarget","loadend","loadstart","readAsArrayBuffer","readAsBinaryString","readAsText","readAsDataURL","readyState","EMPTY","LOADING","DONE","onloadend","onloadstart","onprogress","onload","ProgressEvent","Event","eventInitDict","ProgressEventInit","lengthComputable","loaded","kLastProgressEventFired","encodingName","chunkPromise","isFirstChunk","packageData","bubbles","cancelable","combineByteSequences","binaryString","ioQueue","BOMEncoding","BOMSniffing","sliced","sequences","globalDispatcher","redirectableStatusCodes","BodyAsyncIterable","history","pipeTo","parseLocation","cleanRequestHeaders","shouldRemoveHeader","removeContent","unknownOrigin","calculateRetryAfterHeader","dispatchOpts","retryFn","maxTimeout","minTimeout","timeoutFactor","errorCodes","statusCodes","retryOpts","currentTimeout","rawTrailers","onRetry","defaultMaxRedirections","Intercept","redirectHandler","SPECIAL_HEADERS","HEADER_STATE","MINOR","MAJOR","CONNECTION_TOKEN_CHARS","HEADER_CHARS","TOKEN","STRICT_TOKEN","URL_CHAR","STRICT_URL_CHAR","USERINFO_CHARS","MARK","ALPHANUM","NUM","HEX_MAP","NUM_MAP","ALPHA","FINISH","H_METHOD_MAP","METHOD_MAP","METHODS_RTSP","METHODS_ICE","METHODS_HTTP","METHODS","LENIENT_FLAGS","FLAGS","CONNECT","TRACE","COPY","LOCK","MKCOL","MOVE","PROPFIND","PROPPATCH","SEARCH","UNLOCK","BIND","REBIND","UNBIND","ACL","REPORT","MKACTIVITY","CHECKOUT","NOTIFY","SUBSCRIBE","UNSUBSCRIBE","PURGE","MKCALENDAR","LINK","UNLINK","PRI","SOURCE","DESCRIBE","ANNOUNCE","SETUP","PLAY","PAUSE","TEARDOWN","GET_PARAMETER","SET_PARAMETER","REDIRECT","FLUSH","enumToMap","C","D","E","CONNECTION","TRANSFER_ENCODING","UPGRADE","kAgent","kMockAgentSet","kMockAgentGet","kDispatches","kIsMockActive","kNetConnect","kGetNetConnect","matchValue","buildMockOptions","Pluralizer","PendingInterceptorsFormatter","FakeWeakRef","deactivate","activate","enableNetConnect","matcher","disableNetConnect","mockOptions","keyMatcher","nonExplicitRef","nonExplicitDispatcher","pendingInterceptors","mockAgentClients","flatMap","assertNoPendingInterceptors","pendingInterceptorsFormatter","pluralizer","pluralize","noun","buildMockDispatch","kMockAgent","kOriginalClose","kOrigin","kOriginalDispatch","MockInterceptor","Symbols","intercept","MockNotMatchedError","buildKey","addMockDispatch","kDispatchKey","kDefaultHeaders","kDefaultTrailers","kContentLength","kMockDispatch","MockScope","mockDispatch","waitInMs","persist","repeatTimes","mockDispatches","createMockScopeDispatchData","responseOptions","responseData","validateReplyParameters","reply","replyData","wrappedDefaultsCallback","resolvedData","newMockDispatch","dispatchData","replyWithError","defaultReplyHeaders","defaultReplyTrailers","replyContentLength","isPromise","lowerCaseEntries","fromEntries","getHeaderByName","buildHeadersFromArray","matchHeaders","matchHeaderName","matchHeaderValue","safeUrl","qp","matchKey","pathMatch","methodMatch","bodyMatch","headersMatch","getMockDispatch","basePath","matchedMockDispatches","consumed","baseData","timesInvoked","deleteMockDispatch","generateKeyValues","getStatusText","getResponse","handleReply","_data","optsHeaders","newData","responseTrailers","originalDispatch","netConnect","checkNetConnect","Console","disableColors","_enc","inspectOptions","colors","CI","withPrettyHeaders","Method","Origin","Persistent","Invocations","Remaining","singulars","pronoun","was","plurals","singular","one","kMask","FixedCircularBuffer","bottom","top","isEmpty","isFull","nextItem","FixedQueue","PoolStats","kStats","running","kPool","queued","kConnections","kProxyHeaders","kRequestTls","kProxyTls","kConnectEndpoint","defaultProtocolPort","buildProxyOptions","clientFactory","proxyTls","resolvedUrl","requestedHost","buildHeaders","throwIfProxyAuthIsSent","headersPair","existProxyAuth","fastNow","fastNowTimeout","fastTimers","onTimeout","refreshTimeout","Timeout","states","kReadyState","kSentClose","kByteParser","kReceivedClose","fireEvent","failWebsocketConnection","CloseEvent","socketError","establishWebSocketConnection","protocols","onEstablish","requestURL","permessageDeflate","secWSAccept","secExtension","secProtocol","onSocketData","address","wasClean","closingInfo","CLOSED","websocket","CLOSING","CONNECTING","OPEN","opcodes","CONTINUATION","BINARY","CLOSE","PING","PONG","maxUnsigned16Bit","parserStates","PAYLOADLENGTH_16","PAYLOADLENGTH_64","READ_DATA","MessagePort","MessageEvent","eventInit","MessageEventInit","lastEventId","ports","isFrozen","initMessageEvent","CloseEventInit","ErrorEvent","ErrorEventInit","lineno","colno","WebsocketFrameSend","frameData","maskKey","createFrame","opcode","payloadLength","writeUInt16BE","writeUIntBE","Writable","kResponse","isValidStatusCode","websocketMessageReceived","ping","pong","ByteParser","fragments","fin","originalOpcode","fragmented","closeInfo","parseCloseBody","closeFrame","frame","readUInt16BE","upper","readUInt32BE","fullMessage","onlyCode","kWebSocketURL","kController","kBinaryType","isEstablished","isClosing","isClosed","eventConstructor","dataForEvent","isValidSubprotocol","experimentalWarned","bufferedAmount","urlRecord","onConnectionEstablished","reasonByteLength","WebSocketSendData","onopen","onclose","onmessage","binaryType","onParserDrain","WebSocketInit","navigator","unsafeStringify","v35","_native","conversions","evenRound","createNumberConversion","typeOpts","unsigned","moduloVal","moduloBitLength","moduloBound","treatNullAsEmptyString","U","usm","implementation","URLImpl","constructorArgs","parsedBase","basicURLParse","serializeURL","serializeURLOrigin","stateOverride","cannotHaveAUsernamePasswordPort","setTheUsername","setThePassword","serializeHost","serializeInteger","cannotBeABaseURL","fragment","toJSON","Impl","impl","implSymbol","setup","privateData","wrapper","wrapperSymbol","interface","expose","Window","Worker","tr46","specialSchemes","ftp","gopher","wss","ucs2","isASCIIDigit","isASCIIAlpha","isASCIIAlphanumeric","isASCIIHex","isSingleDot","isDoubleDot","isWindowsDriveLetterCodePoints","cp1","cp2","isWindowsDriveLetterString","isNormalizedWindowsDriveLetterString","containsForbiddenHostCodePoint","containsForbiddenHostCodePointExcludingPercent","isSpecialScheme","isSpecial","percentEncode","hex","utf8PercentEncode","utf8PercentDecode","isC0ControlPercentEncode","extraPathPercentEncodeSet","isPathPercentEncode","extraUserinfoPercentEncodeSet","isUserinfoPercentEncode","percentEncodeChar","encodeSetPredicate","cStr","parseIPv4Number","parseIPv4","numbers","ipv4","serializeIPv4","parseIPv6","pieceIndex","pointer","numbersSeen","ipv4Piece","swaps","temp","serializeIPv6","seqResult","findLongestZeroSequence","ignore0","parseHost","isSpecialArg","parseOpaqueHost","asciiDomain","ipv4Host","decoded","maxIdx","maxLen","currStart","currLen","trimControlChars","trimTabAndNewline","shortenPath","isNormalizedWindowsDriveLetter","includesCredentials","URLStateMachine","encodingOverride","parseError","atFlag","arrFlag","passwordTokenSeenFlag","parseSchemeStart","parseScheme","parseNoScheme","parseSpecialRelativeOrAuthority","parsePathOrAuthority","parseRelative","parseRelativeSlash","parseSpecialAuthoritySlashes","parseSpecialAuthorityIgnoreSlashes","parseAuthority","encodedCodePoints","parseHostName","parsePort","fileOtherwiseCodePoints","parseFile","parseFileSlash","parseFileHost","parsePathStart","parsePath","parseCannotBeABaseURLPath","parseQuery","parseFragment","serializeOrigin","tuple","integer","mixin","wrapperForImpl","implForWrapper","stripBOM","escapeCDATA","requiresCDATA","wrapCDATA","hasProp","rootObj","rootElement","attr","txt","ele","up","att","allowSurrogateChars","bom","processItem","processors","__super__","superClass","parseStringPromise","assignOrPush","processAsync","xmlnskey","saxParser","error1","errThrown","ontext","resultObject","EXPLICIT_CHARKEY","onopentag","processedKey","onclosetag","emptyStr","objClone","old","xpath","charChild","oncdata","prefixMatch","firstCharLowerCase","stripPrefix","parseNumbers","parseBooleans","Disconnected","Preceding","Following","Contains","ContainedBy","ImplementationSpecific","Element","Attribute","Text","CData","EntityReference","EntityDeclaration","ProcessingInstruction","Comment","Document","DocType","DocumentFragment","NotationDeclaration","Declaration","Raw","AttributeDeclaration","ElementDeclaration","Dummy","isFunction","OpenTag","InsideTag","CloseTag","NodeType","XMLAttribute","XMLNode","debugInfo","attValue","isId","schemaTypeInfo","filterOptions","isEqualNode","namespaceURI","localName","XMLCData","XMLCharacterData","substringData","appendData","insertData","deleteData","replaceData","XMLComment","XMLDOMConfiguration","XMLDOMErrorHandler","XMLDOMStringList","clonedSelf","defaultParams","comments","entities","infoset","getParameter","canSetParameter","setParameter","handleError","XMLDOMImplementation","hasFeature","feature","createDocumentType","qualifiedName","publicId","systemId","createDocument","createHTMLDocument","getFeature","XMLDTDAttList","attributeType","defaultValueType","dtdAttType","dtdAttDefault","dtdAttList","XMLDTDElement","dtdElementValue","dtdElement","XMLDTDEntity","pe","dtdEntityValue","internal","pubID","sysID","dtdPubID","dtdSysID","nData","dtdNData","dtdEntity","XMLDTDNotation","dtdNotation","XMLDeclaration","xmlVersion","xmlEncoding","xmlStandalone","declaration","XMLDocType","XMLNamedNodeMap","ref1","ref2","documentObject","attList","pEntity","notation","docType","ent","pent","XMLDocument","XMLStringWriter","XMLStringifier","documentURI","domConfig","rootObject","writerOptions","document","createElement","createDocumentFragment","createTextNode","createCDATASection","createProcessingInstruction","createAttribute","createEntityReference","getElementsByTagName","tagname","importNode","importedNode","deep","createElementNS","createAttributeNS","getElementsByTagNameNS","getElementById","elementId","adoptNode","normalizeDocument","renameNode","getElementsByClassName","classNames","createEvent","eventInterface","createRange","createNodeIterator","whatToShow","createTreeWalker","WriterState","XMLDocumentCB","XMLElement","XMLProcessingInstruction","XMLRaw","XMLText","onDataCallback","onEndCallback","currentLevel","openTags","documentStarted","documentCompleted","createChildNode","attName","attribs","dummy","instruction","openCurrent","oldValidationFlag","noValidation","keepNullAttributes","insTarget","insValue","processingInstruction","rootNodeName","closeNode","openNode","isOpen","endline","nod","dat","com","ins","dec","dtd","XMLDummy","isRoot","attributeMap","clonedChild","removeAttribute","getAttribute","getAttributeNode","setAttributeNode","newAttr","removeAttributeNode","oldAttr","getAttributeNS","setAttributeNS","removeAttributeNS","getAttributeNodeNS","setAttributeNodeNS","hasAttribute","hasAttributeNS","setIdAttribute","setIdAttributeNS","setIdAttributeNode","idAttr","getNamedItem","setNamedItem","oldNode","removeNamedItem","getNamedItemNS","setNamedItemNS","removeNamedItemNS","DocumentPosition","XMLNodeList","parent1","baseURI","childNodeList","textContent","setParent","childNode","lastChild","len1","ref3","ignoreDecorators","convertAttKey","separateArrayItems","keepNullNodes","convertTextKey","convertCDataKey","convertCommentKey","convertRawKey","convertPIKey","insertBefore","newChild","refChild","removed","insertAfter","commentBefore","commentAfter","instructionBefore","instructionAfter","doc","importDocument","clonedRoot","u","importXMLBuilder","replaceChild","oldChild","removeChild","appendChild","hasChildNodes","cloneNode","isSupported","hasAttributes","compareDocumentPosition","isAncestor","isDescendant","isPreceding","isSameNode","lookupPrefix","isDefaultNamespace","lookupNamespaceURI","setUserData","getUserData","isDescendantChild","nodePos","thisPos","treePosition","isFollowing","found","foreachTreeNode","func","XMLStreamWriter","XMLWriterBase","isLastRootNode","writeChildNode","spaceBeforeSlash","childNodeCount","firstChildNode","prettySuppressed","allowEmpty","suppressPrettyCount","assertLegalName","assertLegalChar","textEscape","attEscape","ampregex","noDoubleEncoding","previousSibling","nextSibling","splitText","replaceWholeText","filteredOptions","ref4","ref5","ref6","dontPrettyTextNodes","dontprettytextnodes","spacebeforeslash","user","indentLevel","openAttribute","closeAttribute","begin","stringWriter","streamWriter","writerState","getInspectArgs","getAppendArgs","getCreateArgs","getBuilderName","getInputs","builderNodeEnvPrefix","buildkitdFlags","install","use","buildkitdConfig","buildkitdConfigInline","cacheBinary","cleanup","toolkit","driverOpt","driverSupportsFlags","yaml","actionsToolkit","toolkit_1","stateHelper","setCleanup","setStandalone","setBuilderName","setBuilderDriver","setCertsDir","certsDriverOpts","createCmd","nodeIndex","appendCmd","inspectCmd","installCmd","builderInspect","firstNode","reducedPlatforms","setContainerName","buildkitVersion","setDebug","IsDebug","builderDriver","rmCmd","eval","require","InvalidTokenError","b64DecodeUnicode","base64UrlDecode","CsvError","contexts","is_object","normalize_columns_array","normalizedColumns","disabled","ResizeableBuffer","prepend","np","cr$1","nl$1","space","tab","init_state","bomSkipped","bufBytesStart","castField","cast_function","commenting","from_line","escapeIsQuote","expectedRecordLength","firstLineToHeaders","cast_first_line_to_header","needMoreDataSize","previousBuf","quoting","stop","rawBuffer","recordHasError","record_length","recordDelimiterMaxLength","record_delimiter","trimChars","wasQuoting","wasRowDelimiter","timchars","underscore","normalize_options","cast","cast_date","group_columns_by_name","comment_no_infix","delimiter_json","ignore_last_delimiters","max_record_size","objname","on_record","rd","relax_column_count","relax_column_count_less","relax_column_count_more","relax_quotes","skip_empty_lines","skip_records_with_empty_values","skip_records_with_error","rtrim","ltrim","to_line","isRecordEmpty","cr","boms","utf8","utf16le","original_options","comment_lines","empty_lines","invalid_field_length","__needMoreData","bufLen","numOfCharLeft","requiredLength","nextBuf","bomLength","record_delimiterCount","__autoDiscoverRecordDelimiter","chr","__isEscape","__isQuote","nextChr","isNextChrTrimable","__isCharTrimable","isNextChrComment","__compareBytes","isNextChrDelimiter","__isDelimiter","isNextChrRecordDelimiter","__isRecordDelimiter","__error","__infoField","equals","recordDelimiterLength","skipCommentLine","__resetField","__resetRecord","errField","__onField","errRecord","__onRecord","commentCount","delimiterLength","lappend","rappend","recordLength","__firstLineToColumns","finalErr","extRecord","__infoRecord","__push","normalizedHeaders","__cast","isColumns","__isFloat","isTrim","loop1","timchar","sourceBuf","targetBuf","targetPos","firstByte","sourceLength","rdLength","rds","loop","on_skip","__infoDataSet","err1","err2","__webpack_module_cache__","moduleId","cachedModule","threw","__webpack_modules__","__webpack_exports__"],"sources":["../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/cache.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/cacheHttpClient.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/cacheUtils.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/constants.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/downloadUtils.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/requestUtils.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/internal/tar.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/lib/options.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/node_modules/uuid/index.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/node_modules/uuid/lib/bytesToUuid.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/node_modules/uuid/lib/rng.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/node_modules/uuid/v1.js","../webpack://docker-setup-buildx/./node_modules/@actions/cache/node_modules/uuid/v4.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/command.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/core.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/file-command.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/oidc-utils.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/path-utils.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/summary.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/lib/utils.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/md5.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/nil.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/parse.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/regex.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/rng.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/sha1.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/stringify.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/v1.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/v3.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/v35.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/v4.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/v5.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/validate.js","../webpack://docker-setup-buildx/./node_modules/@actions/core/node_modules/uuid/dist/version.js","../webpack://docker-setup-buildx/./node_modules/@actions/exec/lib/exec.js","../webpack://docker-setup-buildx/./node_modules/@actions/exec/lib/toolrunner.js","../webpack://docker-setup-buildx/./node_modules/@actions/github/lib/context.js","../webpack://docker-setup-buildx/./node_modules/@actions/github/lib/github.js","../webpack://docker-setup-buildx/./node_modules/@actions/github/lib/internal/utils.js","../webpack://docker-setup-buildx/./node_modules/@actions/github/lib/utils.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/glob.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-glob-options-helper.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-globber.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-match-kind.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-path-helper.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-path.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-pattern-helper.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-pattern.js","../webpack://docker-setup-buildx/./node_modules/@actions/glob/lib/internal-search-state.js","../webpack://docker-setup-buildx/./node_modules/@actions/http-client/lib/auth.js","../webpack://docker-setup-buildx/./node_modules/@actions/http-client/lib/index.js","../webpack://docker-setup-buildx/./node_modules/@actions/http-client/lib/proxy.js","../webpack://docker-setup-buildx/./node_modules/@actions/io/lib/io-util.js","../webpack://docker-setup-buildx/./node_modules/@actions/io/lib/io.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/lib/manifest.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/lib/retry-helper.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/lib/tool-cache.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/node_modules/uuid/lib/bytesToUuid.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/node_modules/uuid/lib/rng.js","../webpack://docker-setup-buildx/./node_modules/@actions/tool-cache/node_modules/uuid/v4.js","../webpack://docker-setup-buildx/./node_modules/@azure/abort-controller/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-auth/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/form-data/lib/form_data.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/form-data/lib/populate.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/md5.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/nil.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/parse.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/regex.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/rng.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/sha1.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/stringify.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/v1.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/v3.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/v35.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/v4.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/v5.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/validate.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-http/node_modules/uuid/dist/version.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-lro/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-paging/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-tracing/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/core-util/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/logger/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@azure/storage-blob/dist/index.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildkit/buildkit.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildkit/config.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildx/bake.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildx/builder.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildx/buildx.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildx/inputs.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/buildx/install.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/cache.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/context.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/docker/docker.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/exec.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/git.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/github.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/index.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/toolkit.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/lib/util.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/lru-cache/index.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/classes/comparator.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/classes/range.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/classes/semver.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/clean.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/cmp.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/coerce.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare-build.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare-loose.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/diff.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/eq.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/gt.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/gte.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/inc.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/lt.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/lte.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/major.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/minor.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/neq.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/parse.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/patch.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/prerelease.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/rcompare.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/rsort.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/satisfies.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/sort.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/functions/valid.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/index.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/internal/constants.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/internal/debug.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/internal/identifiers.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/internal/parse-options.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/internal/re.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/gtr.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/intersects.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/ltr.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/max-satisfying.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/min-satisfying.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/min-version.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/outside.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/simplify.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/subset.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/to-comparators.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/semver/ranges/valid.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/yallist/iterator.js","../webpack://docker-setup-buildx/./node_modules/@docker/actions-toolkit/node_modules/yallist/yallist.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/deps/streamsearch/sbmh.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/main.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/types/multipart.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/types/urlencoded.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/utils/Decoder.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/utils/basename.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/utils/decodeText.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/utils/getLimit.js","../webpack://docker-setup-buildx/./node_modules/@fastify/busboy/lib/utils/parseParams.js","../webpack://docker-setup-buildx/./node_modules/@octokit/auth-token/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/core/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/endpoint/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/graphql/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/request-error/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@octokit/request/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/api/context.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/api/diag.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/api/metrics.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/api/propagation.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/api/trace.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/baggage/utils.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/context-api.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/context/context.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/diag-api.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/diag/types.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/index.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/internal/global-utils.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/internal/semver.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/metrics-api.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/metrics/Metric.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/platform/index.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/platform/node/index.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/propagation-api.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace-api.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/context-utils.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/internal/utils.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/span_kind.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/status.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/trace/trace_flags.js","../webpack://docker-setup-buildx/./node_modules/@opentelemetry/api/build/src/version.js","../webpack://docker-setup-buildx/./node_modules/asynckit/index.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/abort.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/async.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/defer.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/iterate.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/state.js","../webpack://docker-setup-buildx/./node_modules/asynckit/lib/terminator.js","../webpack://docker-setup-buildx/./node_modules/asynckit/parallel.js","../webpack://docker-setup-buildx/./node_modules/asynckit/serial.js","../webpack://docker-setup-buildx/./node_modules/asynckit/serialOrdered.js","../webpack://docker-setup-buildx/./node_modules/balanced-match/index.js","../webpack://docker-setup-buildx/./node_modules/before-after-hook/index.js","../webpack://docker-setup-buildx/./node_modules/before-after-hook/lib/add.js","../webpack://docker-setup-buildx/./node_modules/before-after-hook/lib/register.js","../webpack://docker-setup-buildx/./node_modules/before-after-hook/lib/remove.js","../webpack://docker-setup-buildx/./node_modules/brace-expansion/index.js","../webpack://docker-setup-buildx/./node_modules/combined-stream/lib/combined_stream.js","../webpack://docker-setup-buildx/./node_modules/concat-map/index.js","../webpack://docker-setup-buildx/./node_modules/delayed-stream/lib/delayed_stream.js","../webpack://docker-setup-buildx/./node_modules/deprecation/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/is-plain-object/dist/is-plain-object.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/index.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/common.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/dumper.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/exception.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/loader.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/schema.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/schema/core.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/schema/default.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/schema/failsafe.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/schema/json.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/snippet.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/binary.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/bool.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/float.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/int.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/map.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/merge.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/null.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/omap.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/pairs.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/seq.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/set.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/str.js","../webpack://docker-setup-buildx/./node_modules/js-yaml/lib/type/timestamp.js","../webpack://docker-setup-buildx/./node_modules/mime-db/index.js","../webpack://docker-setup-buildx/./node_modules/mime-types/index.js","../webpack://docker-setup-buildx/./node_modules/minimatch/minimatch.js","../webpack://docker-setup-buildx/./node_modules/node-fetch/lib/index.js","../webpack://docker-setup-buildx/./node_modules/once/once.js","../webpack://docker-setup-buildx/./node_modules/sax/lib/sax.js","../webpack://docker-setup-buildx/./node_modules/semver/semver.js","../webpack://docker-setup-buildx/./node_modules/tmp/lib/tmp.js","../webpack://docker-setup-buildx/./node_modules/tr46/index.js","../webpack://docker-setup-buildx/./node_modules/tslib/tslib.js","../webpack://docker-setup-buildx/./node_modules/tunnel/index.js","../webpack://docker-setup-buildx/./node_modules/tunnel/lib/tunnel.js","../webpack://docker-setup-buildx/./node_modules/undici/index.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/agent.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/abort-signal.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/api-connect.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/api-pipeline.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/api-request.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/api-stream.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/api-upgrade.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/index.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/readable.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/api/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/balanced-pool.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cache/cache.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cache/cachestorage.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cache/symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cache/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/client.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/compat/dispatcher-weakref.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cookies/constants.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cookies/index.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cookies/parse.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/cookies/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/core/connect.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/core/errors.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/core/request.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/core/symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/core/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/dispatcher-base.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/dispatcher.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/body.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/constants.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/dataURL.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/file.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/formdata.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/global.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/headers.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/index.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/request.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/response.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fetch/webidl.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fileapi/encoding.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fileapi/filereader.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fileapi/progressevent.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fileapi/symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/fileapi/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/global.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/handler/DecoratorHandler.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/handler/RedirectHandler.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/handler/RetryHandler.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/interceptor/redirectInterceptor.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/llhttp/constants.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/llhttp/llhttp-wasm.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/llhttp/llhttp_simd-wasm.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/llhttp/utils.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-agent.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-client.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-errors.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-interceptor.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-pool.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/mock-utils.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/pending-interceptors-formatter.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/mock/pluralizer.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/node/fixed-queue.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/pool-base.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/pool-stats.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/pool.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/proxy-agent.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/timers.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/connection.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/constants.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/events.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/frame.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/receiver.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/symbols.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/util.js","../webpack://docker-setup-buildx/./node_modules/undici/lib/websocket/websocket.js","../webpack://docker-setup-buildx/./node_modules/universal-user-agent/dist-node/index.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/index.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/md5.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/native.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/nil.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/parse.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/regex.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/rng.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/sha1.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/stringify.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/v1.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/v3.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/v35.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/v4.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/v5.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/validate.js","../webpack://docker-setup-buildx/./node_modules/uuid/dist/version.js","../webpack://docker-setup-buildx/./node_modules/webidl-conversions/lib/index.js","../webpack://docker-setup-buildx/./node_modules/whatwg-url/lib/URL-impl.js","../webpack://docker-setup-buildx/./node_modules/whatwg-url/lib/URL.js","../webpack://docker-setup-buildx/./node_modules/whatwg-url/lib/public-api.js","../webpack://docker-setup-buildx/./node_modules/whatwg-url/lib/url-state-machine.js","../webpack://docker-setup-buildx/./node_modules/whatwg-url/lib/utils.js","../webpack://docker-setup-buildx/./node_modules/wrappy/wrappy.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/bom.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/builder.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/defaults.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/parser.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/processors.js","../webpack://docker-setup-buildx/./node_modules/xml2js/lib/xml2js.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/DocumentPosition.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/NodeType.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/Utility.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/WriterState.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLAttribute.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLCData.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLCharacterData.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLComment.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDOMConfiguration.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDOMImplementation.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDOMStringList.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDTDAttList.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDTDElement.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDTDEntity.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDTDNotation.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDeclaration.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDocType.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDocument.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDocumentCB.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLDummy.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLElement.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLNamedNodeMap.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLNode.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLNodeList.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLProcessingInstruction.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLRaw.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLStreamWriter.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLStringWriter.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLStringifier.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLText.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/XMLWriterBase.js","../webpack://docker-setup-buildx/./node_modules/xmlbuilder/lib/index.js","../webpack://docker-setup-buildx/./src/context.ts","../webpack://docker-setup-buildx/./src/main.ts","../webpack://docker-setup-buildx/./src/state-helper.ts","../webpack://docker-setup-buildx/./node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack://docker-setup-buildx/external node-commonjs \"assert\"","../webpack://docker-setup-buildx/external node-commonjs \"async_hooks\"","../webpack://docker-setup-buildx/external node-commonjs \"buffer\"","../webpack://docker-setup-buildx/external node-commonjs \"child_process\"","../webpack://docker-setup-buildx/external node-commonjs \"console\"","../webpack://docker-setup-buildx/external node-commonjs \"crypto\"","../webpack://docker-setup-buildx/external node-commonjs \"diagnostics_channel\"","../webpack://docker-setup-buildx/external node-commonjs \"events\"","../webpack://docker-setup-buildx/external node-commonjs \"fs\"","../webpack://docker-setup-buildx/external node-commonjs \"http\"","../webpack://docker-setup-buildx/external node-commonjs \"http2\"","../webpack://docker-setup-buildx/external node-commonjs \"https\"","../webpack://docker-setup-buildx/external node-commonjs \"net\"","../webpack://docker-setup-buildx/external node-commonjs \"node:events\"","../webpack://docker-setup-buildx/external node-commonjs \"node:stream\"","../webpack://docker-setup-buildx/external node-commonjs \"node:util\"","../webpack://docker-setup-buildx/external node-commonjs \"os\"","../webpack://docker-setup-buildx/external node-commonjs \"path\"","../webpack://docker-setup-buildx/external node-commonjs \"perf_hooks\"","../webpack://docker-setup-buildx/external node-commonjs \"punycode\"","../webpack://docker-setup-buildx/external node-commonjs \"querystring\"","../webpack://docker-setup-buildx/external node-commonjs \"stream\"","../webpack://docker-setup-buildx/external node-commonjs \"stream/web\"","../webpack://docker-setup-buildx/external node-commonjs \"string_decoder\"","../webpack://docker-setup-buildx/external node-commonjs \"timers\"","../webpack://docker-setup-buildx/external node-commonjs \"tls\"","../webpack://docker-setup-buildx/external node-commonjs \"url\"","../webpack://docker-setup-buildx/external node-commonjs \"util\"","../webpack://docker-setup-buildx/external node-commonjs \"util/types\"","../webpack://docker-setup-buildx/external node-commonjs \"worker_threads\"","../webpack://docker-setup-buildx/external node-commonjs \"zlib\"","../webpack://docker-setup-buildx/./node_modules/jwt-decode/build/cjs/index.js","../webpack://docker-setup-buildx/./node_modules/csv-parse/dist/cjs/sync.cjs","../webpack://docker-setup-buildx/webpack/bootstrap","../webpack://docker-setup-buildx/webpack/runtime/compat","../webpack://docker-setup-buildx/webpack/startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst path = __importStar(require(\"path\"));\nconst utils = __importStar(require(\"./internal/cacheUtils\"));\nconst cacheHttpClient = __importStar(require(\"./internal/cacheHttpClient\"));\nconst tar_1 = require(\"./internal/tar\");\nclass ValidationError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ValidationError';\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\nexports.ValidationError = ValidationError;\nclass ReserveCacheError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ReserveCacheError';\n Object.setPrototypeOf(this, ReserveCacheError.prototype);\n }\n}\nexports.ReserveCacheError = ReserveCacheError;\nfunction checkPaths(paths) {\n if (!paths || paths.length === 0) {\n throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);\n }\n}\nfunction checkKey(key) {\n if (key.length > 512) {\n throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`);\n }\n const regex = /^[^,]*$/;\n if (!regex.test(key)) {\n throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);\n }\n}\n/**\n * isFeatureAvailable to check the presence of Actions cache service\n *\n * @returns boolean return true if Actions cache service feature is available, otherwise false\n */\nfunction isFeatureAvailable() {\n return !!process.env['ACTIONS_CACHE_URL'];\n}\nexports.isFeatureAvailable = isFeatureAvailable;\n/**\n * Restores cache from keys\n *\n * @param paths a list of file paths to restore from the cache\n * @param primaryKey an explicit key for restoring the cache\n * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key\n * @param downloadOptions cache download options\n * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform\n * @returns string returns the key for the cache hit, otherwise returns undefined\n */\nfunction restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {\n return __awaiter(this, void 0, void 0, function* () {\n checkPaths(paths);\n restoreKeys = restoreKeys || [];\n const keys = [primaryKey, ...restoreKeys];\n core.debug('Resolved Keys:');\n core.debug(JSON.stringify(keys));\n if (keys.length > 10) {\n throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`);\n }\n for (const key of keys) {\n checkKey(key);\n }\n const compressionMethod = yield utils.getCompressionMethod();\n let archivePath = '';\n try {\n // path are needed to compute version\n const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {\n compressionMethod,\n enableCrossOsArchive\n });\n if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {\n // Cache not found\n return undefined;\n }\n if (options === null || options === void 0 ? void 0 : options.lookupOnly) {\n core.info('Lookup only - skipping download');\n return cacheEntry.cacheKey;\n }\n archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));\n core.debug(`Archive Path: ${archivePath}`);\n // Download the cache from the cache entry\n yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);\n if (core.isDebug()) {\n yield (0, tar_1.listTar)(archivePath, compressionMethod);\n }\n const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);\n yield (0, tar_1.extractTar)(archivePath, compressionMethod);\n core.info('Cache restored successfully');\n return cacheEntry.cacheKey;\n }\n catch (error) {\n const typedError = error;\n if (typedError.name === ValidationError.name) {\n throw error;\n }\n else {\n // Supress all non-validation cache related errors because caching should be optional\n core.warning(`Failed to restore: ${error.message}`);\n }\n }\n finally {\n // Try to delete the archive to save space\n try {\n yield utils.unlinkFile(archivePath);\n }\n catch (error) {\n core.debug(`Failed to delete archive: ${error}`);\n }\n }\n return undefined;\n });\n}\nexports.restoreCache = restoreCache;\n/**\n * Saves a list of files with the specified key\n *\n * @param paths a list of file paths to be cached\n * @param key an explicit key for restoring the cache\n * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform\n * @param options cache upload options\n * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails\n */\nfunction saveCache(paths, key, options, enableCrossOsArchive = false) {\n var _a, _b, _c, _d, _e;\n return __awaiter(this, void 0, void 0, function* () {\n checkPaths(paths);\n checkKey(key);\n const compressionMethod = yield utils.getCompressionMethod();\n let cacheId = -1;\n const cachePaths = yield utils.resolvePaths(paths);\n core.debug('Cache Paths:');\n core.debug(`${JSON.stringify(cachePaths)}`);\n if (cachePaths.length === 0) {\n throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);\n }\n const archiveFolder = yield utils.createTempDirectory();\n const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));\n core.debug(`Archive Path: ${archivePath}`);\n try {\n yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod);\n if (core.isDebug()) {\n yield (0, tar_1.listTar)(archivePath, compressionMethod);\n }\n const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit\n const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.debug(`File Size: ${archiveFileSize}`);\n // For GHES, this check will take place in ReserveCache API with enterprise file size limit\n if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {\n throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);\n }\n core.debug('Reserving Cache');\n const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {\n compressionMethod,\n enableCrossOsArchive,\n cacheSize: archiveFileSize\n });\n if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {\n cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;\n }\n else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {\n throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);\n }\n else {\n throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);\n }\n core.debug(`Saving Cache (ID: ${cacheId})`);\n yield cacheHttpClient.saveCache(cacheId, archivePath, options);\n }\n catch (error) {\n const typedError = error;\n if (typedError.name === ValidationError.name) {\n throw error;\n }\n else if (typedError.name === ReserveCacheError.name) {\n core.info(`Failed to save: ${typedError.message}`);\n }\n else {\n core.warning(`Failed to save: ${typedError.message}`);\n }\n }\n finally {\n // Try to delete the archive to save space\n try {\n yield utils.unlinkFile(archivePath);\n }\n catch (error) {\n core.debug(`Failed to delete archive: ${error}`);\n }\n }\n return cacheId;\n });\n}\nexports.saveCache = saveCache;\n//# sourceMappingURL=cache.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = exports.getCacheVersion = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst crypto = __importStar(require(\"crypto\"));\nconst fs = __importStar(require(\"fs\"));\nconst url_1 = require(\"url\");\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst downloadUtils_1 = require(\"./downloadUtils\");\nconst options_1 = require(\"../options\");\nconst requestUtils_1 = require(\"./requestUtils\");\nconst versionSalt = '1.0';\nfunction getCacheApiUrl(resource) {\n const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';\n if (!baseUrl) {\n throw new Error('Cache Service Url not found, unable to restore cache.');\n }\n const url = `${baseUrl}_apis/artifactcache/${resource}`;\n core.debug(`Resource Url: ${url}`);\n return url;\n}\nfunction createAcceptHeader(type, apiVersion) {\n return `${type};api-version=${apiVersion}`;\n}\nfunction getRequestOptions() {\n const requestOptions = {\n headers: {\n Accept: createAcceptHeader('application/json', '6.0-preview.1')\n }\n };\n return requestOptions;\n}\nfunction createHttpClient() {\n const token = process.env['ACTIONS_RUNTIME_TOKEN'] || '';\n const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token);\n return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());\n}\nfunction getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {\n // don't pass changes upstream\n const components = paths.slice();\n // Add compression method to cache version to restore\n // compressed cache as per compression method\n if (compressionMethod) {\n components.push(compressionMethod);\n }\n // Only check for windows platforms if enableCrossOsArchive is false\n if (process.platform === 'win32' && !enableCrossOsArchive) {\n components.push('windows-only');\n }\n // Add salt to cache version to support breaking changes in cache entry\n components.push(versionSalt);\n return crypto.createHash('sha256').update(components.join('|')).digest('hex');\n}\nexports.getCacheVersion = getCacheVersion;\nfunction getCacheEntry(keys, paths, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);\n const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;\n const response = yield (0, requestUtils_1.retryTypedResponse)('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); }));\n // Cache not found\n if (response.statusCode === 204) {\n // List cache for primary key only if cache miss occurs\n if (core.isDebug()) {\n yield printCachesListForDiagnostics(keys[0], httpClient, version);\n }\n return null;\n }\n if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) {\n throw new Error(`Cache service responded with ${response.statusCode}`);\n }\n const cacheResult = response.result;\n const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation;\n if (!cacheDownloadUrl) {\n // Cache achiveLocation not found. This should never happen, and hence bail out.\n throw new Error('Cache not found.');\n }\n core.setSecret(cacheDownloadUrl);\n core.debug(`Cache Result:`);\n core.debug(JSON.stringify(cacheResult));\n return cacheResult;\n });\n}\nexports.getCacheEntry = getCacheEntry;\nfunction printCachesListForDiagnostics(key, httpClient, version) {\n return __awaiter(this, void 0, void 0, function* () {\n const resource = `caches?key=${encodeURIComponent(key)}`;\n const response = yield (0, requestUtils_1.retryTypedResponse)('listCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); }));\n if (response.statusCode === 200) {\n const cacheListResult = response.result;\n const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount;\n if (totalCount && totalCount > 0) {\n core.debug(`No matching cache found for cache key '${key}', version '${version} 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:`);\n for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) {\n core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`);\n }\n }\n }\n });\n}\nfunction downloadCache(archiveLocation, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const archiveUrl = new url_1.URL(archiveLocation);\n const downloadOptions = (0, options_1.getDownloadOptions)(options);\n if (archiveUrl.hostname.endsWith('.blob.core.windows.net')) {\n if (downloadOptions.useAzureSdk) {\n // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.\n yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions);\n }\n else if (downloadOptions.concurrentBlobDownloads) {\n // Use concurrent implementation with HttpClient to work around blob SDK issue\n yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions);\n }\n else {\n // Otherwise, download using the Actions http-client.\n yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath);\n }\n }\n else {\n yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath);\n }\n });\n}\nexports.downloadCache = downloadCache;\n// Reserve Cache\nfunction reserveCache(key, paths, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);\n const reserveCacheRequest = {\n key,\n version,\n cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize\n };\n const response = yield (0, requestUtils_1.retryTypedResponse)('reserveCache', () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);\n }));\n return response;\n });\n}\nexports.reserveCache = reserveCache;\nfunction getContentRange(start, end) {\n // Format: `bytes start-end/filesize\n // start and end are inclusive\n // filesize can be *\n // For a 200 byte chunk starting at byte 0:\n // Content-Range: bytes 0-199/*\n return `bytes ${start}-${end}/*`;\n}\nfunction uploadChunk(httpClient, resourceUrl, openStream, start, end) {\n return __awaiter(this, void 0, void 0, function* () {\n core.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);\n const additionalHeaders = {\n 'Content-Type': 'application/octet-stream',\n 'Content-Range': getContentRange(start, end)\n };\n const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);\n }));\n if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) {\n throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`);\n }\n });\n}\nfunction uploadFile(httpClient, cacheId, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n // Upload Chunks\n const fileSize = utils.getArchiveFileSizeInBytes(archivePath);\n const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`);\n const fd = fs.openSync(archivePath, 'r');\n const uploadOptions = (0, options_1.getUploadOptions)(options);\n const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency);\n const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize);\n const parallelUploads = [...new Array(concurrency).keys()];\n core.debug('Awaiting all uploads');\n let offset = 0;\n try {\n yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () {\n while (offset < fileSize) {\n const chunkSize = Math.min(fileSize - offset, maxChunkSize);\n const start = offset;\n const end = offset + chunkSize - 1;\n offset += maxChunkSize;\n yield uploadChunk(httpClient, resourceUrl, () => fs\n .createReadStream(archivePath, {\n fd,\n start,\n end,\n autoClose: false\n })\n .on('error', error => {\n throw new Error(`Cache upload failed because file read failed with ${error.message}`);\n }), start, end);\n }\n })));\n }\n finally {\n fs.closeSync(fd);\n }\n return;\n });\n}\nfunction commitCache(httpClient, cacheId, filesize) {\n return __awaiter(this, void 0, void 0, function* () {\n const commitCacheRequest = { size: filesize };\n return yield (0, requestUtils_1.retryTypedResponse)('commitCache', () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest);\n }));\n });\n}\nfunction saveCache(cacheId, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n core.debug('Upload cache');\n yield uploadFile(httpClient, cacheId, archivePath, options);\n // Commit Cache\n core.debug('Commiting cache');\n const cacheSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`);\n const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize);\n if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) {\n throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`);\n }\n core.info('Cache saved successfully');\n });\n}\nexports.saveCache = saveCache;\n//# sourceMappingURL=cacheHttpClient.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isGhes = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst exec = __importStar(require(\"@actions/exec\"));\nconst glob = __importStar(require(\"@actions/glob\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\nconst semver = __importStar(require(\"semver\"));\nconst util = __importStar(require(\"util\"));\nconst uuid_1 = require(\"uuid\");\nconst constants_1 = require(\"./constants\");\n// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23\nfunction createTempDirectory() {\n return __awaiter(this, void 0, void 0, function* () {\n const IS_WINDOWS = process.platform === 'win32';\n let tempDirectory = process.env['RUNNER_TEMP'] || '';\n if (!tempDirectory) {\n let baseLocation;\n if (IS_WINDOWS) {\n // On Windows use the USERPROFILE env variable\n baseLocation = process.env['USERPROFILE'] || 'C:\\\\';\n }\n else {\n if (process.platform === 'darwin') {\n baseLocation = '/Users';\n }\n else {\n baseLocation = '/home';\n }\n }\n tempDirectory = path.join(baseLocation, 'actions', 'temp');\n }\n const dest = path.join(tempDirectory, (0, uuid_1.v4)());\n yield io.mkdirP(dest);\n return dest;\n });\n}\nexports.createTempDirectory = createTempDirectory;\nfunction getArchiveFileSizeInBytes(filePath) {\n return fs.statSync(filePath).size;\n}\nexports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes;\nfunction resolvePaths(patterns) {\n var _a, e_1, _b, _c;\n var _d;\n return __awaiter(this, void 0, void 0, function* () {\n const paths = [];\n const workspace = (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();\n const globber = yield glob.create(patterns.join('\\n'), {\n implicitDescendants: false\n });\n try {\n for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {\n _c = _g.value;\n _e = false;\n const file = _c;\n const relativeFile = path\n .relative(workspace, file)\n .replace(new RegExp(`\\\\${path.sep}`, 'g'), '/');\n core.debug(`Matched: ${relativeFile}`);\n // Paths are made relative so the tar entries are all relative to the root of the workspace.\n if (relativeFile === '') {\n // path.relative returns empty string if workspace and file are equal\n paths.push('.');\n }\n else {\n paths.push(`${relativeFile}`);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return paths;\n });\n}\nexports.resolvePaths = resolvePaths;\nfunction unlinkFile(filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n return util.promisify(fs.unlink)(filePath);\n });\n}\nexports.unlinkFile = unlinkFile;\nfunction getVersion(app, additionalArgs = []) {\n return __awaiter(this, void 0, void 0, function* () {\n let versionOutput = '';\n additionalArgs.push('--version');\n core.debug(`Checking ${app} ${additionalArgs.join(' ')}`);\n try {\n yield exec.exec(`${app}`, additionalArgs, {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n }\n catch (err) {\n core.debug(err.message);\n }\n versionOutput = versionOutput.trim();\n core.debug(versionOutput);\n return versionOutput;\n });\n}\n// Use zstandard if possible to maximize cache performance\nfunction getCompressionMethod() {\n return __awaiter(this, void 0, void 0, function* () {\n const versionOutput = yield getVersion('zstd', ['--quiet']);\n const version = semver.clean(versionOutput);\n core.debug(`zstd version: ${version}`);\n if (versionOutput === '') {\n return constants_1.CompressionMethod.Gzip;\n }\n else {\n return constants_1.CompressionMethod.ZstdWithoutLong;\n }\n });\n}\nexports.getCompressionMethod = getCompressionMethod;\nfunction getCacheFileName(compressionMethod) {\n return compressionMethod === constants_1.CompressionMethod.Gzip\n ? constants_1.CacheFilename.Gzip\n : constants_1.CacheFilename.Zstd;\n}\nexports.getCacheFileName = getCacheFileName;\nfunction getGnuTarPathOnWindows() {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(constants_1.GnuTarPathOnWindows)) {\n return constants_1.GnuTarPathOnWindows;\n }\n const versionOutput = yield getVersion('tar');\n return versionOutput.toLowerCase().includes('gnu tar') ? io.which('tar') : '';\n });\n}\nexports.getGnuTarPathOnWindows = getGnuTarPathOnWindows;\nfunction assertDefined(name, value) {\n if (value === undefined) {\n throw Error(`Expected ${name} but value was undefiend`);\n }\n return value;\n}\nexports.assertDefined = assertDefined;\nfunction isGhes() {\n const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');\n const hostname = ghUrl.hostname.trimEnd().toUpperCase();\n const isGitHubHost = hostname === 'GITHUB.COM';\n const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');\n return !isGitHubHost && !isGheHost;\n}\nexports.isGhes = isGhes;\n//# sourceMappingURL=cacheUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;\nvar CacheFilename;\n(function (CacheFilename) {\n CacheFilename[\"Gzip\"] = \"cache.tgz\";\n CacheFilename[\"Zstd\"] = \"cache.tzst\";\n})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));\nvar CompressionMethod;\n(function (CompressionMethod) {\n CompressionMethod[\"Gzip\"] = \"gzip\";\n // Long range mode was added to zstd in v1.3.2.\n // This enum is for earlier version of zstd that does not have --long support\n CompressionMethod[\"ZstdWithoutLong\"] = \"zstd-without-long\";\n CompressionMethod[\"Zstd\"] = \"zstd\";\n})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));\nvar ArchiveToolType;\n(function (ArchiveToolType) {\n ArchiveToolType[\"GNU\"] = \"gnu\";\n ArchiveToolType[\"BSD\"] = \"bsd\";\n})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));\n// The default number of retry attempts.\nexports.DefaultRetryAttempts = 2;\n// The default delay in milliseconds between retry attempts.\nexports.DefaultRetryDelay = 5000;\n// Socket timeout in milliseconds during download. If no traffic is received\n// over the socket during this period, the socket is destroyed and the download\n// is aborted.\nexports.SocketTimeout = 5000;\n// The default path of GNUtar on hosted Windows runners\nexports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\\\Git\\\\usr\\\\bin\\\\tar.exe`;\n// The default path of BSDtar on hosted Windows runners\nexports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\\\Windows\\\\System32\\\\tar.exe`;\nexports.TarFilename = 'cache.tar';\nexports.ManifestFilename = 'manifest.txt';\n//# sourceMappingURL=constants.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst storage_blob_1 = require(\"@azure/storage-blob\");\nconst buffer = __importStar(require(\"buffer\"));\nconst fs = __importStar(require(\"fs\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst constants_1 = require(\"./constants\");\nconst requestUtils_1 = require(\"./requestUtils\");\nconst abort_controller_1 = require(\"@azure/abort-controller\");\n/**\n * Pipes the body of a HTTP response to a stream\n *\n * @param response the HTTP response\n * @param output the writable stream\n */\nfunction pipeResponseToStream(response, output) {\n return __awaiter(this, void 0, void 0, function* () {\n const pipeline = util.promisify(stream.pipeline);\n yield pipeline(response.message, output);\n });\n}\n/**\n * Class for tracking the download state and displaying stats.\n */\nclass DownloadProgress {\n constructor(contentLength) {\n this.contentLength = contentLength;\n this.segmentIndex = 0;\n this.segmentSize = 0;\n this.segmentOffset = 0;\n this.receivedBytes = 0;\n this.displayedComplete = false;\n this.startTime = Date.now();\n }\n /**\n * Progress to the next segment. Only call this method when the previous segment\n * is complete.\n *\n * @param segmentSize the length of the next segment\n */\n nextSegment(segmentSize) {\n this.segmentOffset = this.segmentOffset + this.segmentSize;\n this.segmentIndex = this.segmentIndex + 1;\n this.segmentSize = segmentSize;\n this.receivedBytes = 0;\n core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`);\n }\n /**\n * Sets the number of bytes received for the current segment.\n *\n * @param receivedBytes the number of bytes received\n */\n setReceivedBytes(receivedBytes) {\n this.receivedBytes = receivedBytes;\n }\n /**\n * Returns the total number of bytes transferred.\n */\n getTransferredBytes() {\n return this.segmentOffset + this.receivedBytes;\n }\n /**\n * Returns true if the download is complete.\n */\n isDone() {\n return this.getTransferredBytes() === this.contentLength;\n }\n /**\n * Prints the current download stats. Once the download completes, this will print one\n * last line and then stop.\n */\n display() {\n if (this.displayedComplete) {\n return;\n }\n const transferredBytes = this.segmentOffset + this.receivedBytes;\n const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1);\n const elapsedTime = Date.now() - this.startTime;\n const downloadSpeed = (transferredBytes /\n (1024 * 1024) /\n (elapsedTime / 1000)).toFixed(1);\n core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`);\n if (this.isDone()) {\n this.displayedComplete = true;\n }\n }\n /**\n * Returns a function used to handle TransferProgressEvents.\n */\n onProgress() {\n return (progress) => {\n this.setReceivedBytes(progress.loadedBytes);\n };\n }\n /**\n * Starts the timer that displays the stats.\n *\n * @param delayInMs the delay between each write\n */\n startDisplayTimer(delayInMs = 1000) {\n const displayCallback = () => {\n this.display();\n if (!this.isDone()) {\n this.timeoutHandle = setTimeout(displayCallback, delayInMs);\n }\n };\n this.timeoutHandle = setTimeout(displayCallback, delayInMs);\n }\n /**\n * Stops the timer that displays the stats. As this typically indicates the download\n * is complete, this will display one last line, unless the last line has already\n * been written.\n */\n stopDisplayTimer() {\n if (this.timeoutHandle) {\n clearTimeout(this.timeoutHandle);\n this.timeoutHandle = undefined;\n }\n this.display();\n }\n}\nexports.DownloadProgress = DownloadProgress;\n/**\n * Download the cache using the Actions toolkit http-client\n *\n * @param archiveLocation the URL for the cache\n * @param archivePath the local path where the cache is saved\n */\nfunction downloadCacheHttpClient(archiveLocation, archivePath) {\n return __awaiter(this, void 0, void 0, function* () {\n const writeStream = fs.createWriteStream(archivePath);\n const httpClient = new http_client_1.HttpClient('actions/cache');\n const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); }));\n // Abort download if no traffic received over the socket.\n downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => {\n downloadResponse.message.destroy();\n core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`);\n });\n yield pipeResponseToStream(downloadResponse, writeStream);\n // Validate download size.\n const contentLengthHeader = downloadResponse.message.headers['content-length'];\n if (contentLengthHeader) {\n const expectedLength = parseInt(contentLengthHeader);\n const actualLength = utils.getArchiveFileSizeInBytes(archivePath);\n if (actualLength !== expectedLength) {\n throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`);\n }\n }\n else {\n core.debug('Unable to validate download, no Content-Length header');\n }\n });\n}\nexports.downloadCacheHttpClient = downloadCacheHttpClient;\n/**\n * Download the cache using the Actions toolkit http-client concurrently\n *\n * @param archiveLocation the URL for the cache\n * @param archivePath the local path where the cache is saved\n */\nfunction downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const archiveDescriptor = yield fs.promises.open(archivePath, 'w');\n const httpClient = new http_client_1.HttpClient('actions/cache', undefined, {\n socketTimeout: options.timeoutInMs,\n keepAlive: true\n });\n try {\n const res = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCacheMetadata', () => __awaiter(this, void 0, void 0, function* () { return yield httpClient.request('HEAD', archiveLocation, null, {}); }));\n const lengthHeader = res.message.headers['content-length'];\n if (lengthHeader === undefined || lengthHeader === null) {\n throw new Error('Content-Length not found on blob response');\n }\n const length = parseInt(lengthHeader);\n if (Number.isNaN(length)) {\n throw new Error(`Could not interpret Content-Length: ${length}`);\n }\n const downloads = [];\n const blockSize = 4 * 1024 * 1024;\n for (let offset = 0; offset < length; offset += blockSize) {\n const count = Math.min(blockSize, length - offset);\n downloads.push({\n offset,\n promiseGetter: () => __awaiter(this, void 0, void 0, function* () {\n return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count);\n })\n });\n }\n // reverse to use .pop instead of .shift\n downloads.reverse();\n let actives = 0;\n let bytesDownloaded = 0;\n const progress = new DownloadProgress(length);\n progress.startDisplayTimer();\n const progressFn = progress.onProgress();\n const activeDownloads = [];\n let nextDownload;\n const waitAndWrite = () => __awaiter(this, void 0, void 0, function* () {\n const segment = yield Promise.race(Object.values(activeDownloads));\n yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset);\n actives--;\n delete activeDownloads[segment.offset];\n bytesDownloaded += segment.count;\n progressFn({ loadedBytes: bytesDownloaded });\n });\n while ((nextDownload = downloads.pop())) {\n activeDownloads[nextDownload.offset] = nextDownload.promiseGetter();\n actives++;\n if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) {\n yield waitAndWrite();\n }\n }\n while (actives > 0) {\n yield waitAndWrite();\n }\n }\n finally {\n httpClient.dispose();\n yield archiveDescriptor.close();\n }\n });\n}\nexports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent;\nfunction downloadSegmentRetry(httpClient, archiveLocation, offset, count) {\n return __awaiter(this, void 0, void 0, function* () {\n const retries = 5;\n let failures = 0;\n while (true) {\n try {\n const timeout = 30000;\n const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count));\n if (typeof result === 'string') {\n throw new Error('downloadSegmentRetry failed due to timeout');\n }\n return result;\n }\n catch (err) {\n if (failures >= retries) {\n throw err;\n }\n failures++;\n }\n }\n });\n}\nfunction downloadSegment(httpClient, archiveLocation, offset, count) {\n return __awaiter(this, void 0, void 0, function* () {\n const partRes = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCachePart', () => __awaiter(this, void 0, void 0, function* () {\n return yield httpClient.get(archiveLocation, {\n Range: `bytes=${offset}-${offset + count - 1}`\n });\n }));\n if (!partRes.readBodyBuffer) {\n throw new Error('Expected HttpClientResponse to implement readBodyBuffer');\n }\n return {\n offset,\n count,\n buffer: yield partRes.readBodyBuffer()\n };\n });\n}\n/**\n * Download the cache using the Azure Storage SDK. Only call this method if the\n * URL points to an Azure Storage endpoint.\n *\n * @param archiveLocation the URL for the cache\n * @param archivePath the local path where the cache is saved\n * @param options the download options with the defaults set\n */\nfunction downloadCacheStorageSDK(archiveLocation, archivePath, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, {\n retryOptions: {\n // Override the timeout used when downloading each 4 MB chunk\n // The default is 2 min / MB, which is way too slow\n tryTimeoutInMs: options.timeoutInMs\n }\n });\n const properties = yield client.getProperties();\n const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1;\n if (contentLength < 0) {\n // We should never hit this condition, but just in case fall back to downloading the\n // file as one large stream\n core.debug('Unable to determine content length, downloading file with http-client...');\n yield downloadCacheHttpClient(archiveLocation, archivePath);\n }\n else {\n // Use downloadToBuffer for faster downloads, since internally it splits the\n // file into 4 MB chunks which can then be parallelized and retried independently\n //\n // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB\n // on 64-bit systems), split the download into multiple segments\n // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.\n // Updated segment size to 128MB = 134217728 bytes, to complete a segment faster and fail fast\n const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH);\n const downloadProgress = new DownloadProgress(contentLength);\n const fd = fs.openSync(archivePath, 'w');\n try {\n downloadProgress.startDisplayTimer();\n const controller = new abort_controller_1.AbortController();\n const abortSignal = controller.signal;\n while (!downloadProgress.isDone()) {\n const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;\n const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);\n downloadProgress.nextSegment(segmentSize);\n const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 3600000, client.downloadToBuffer(segmentStart, segmentSize, {\n abortSignal,\n concurrency: options.downloadConcurrency,\n onProgress: downloadProgress.onProgress()\n }));\n if (result === 'timeout') {\n controller.abort();\n throw new Error('Aborting cache download as the download time exceeded the timeout.');\n }\n else if (Buffer.isBuffer(result)) {\n fs.writeFileSync(fd, result);\n }\n }\n }\n finally {\n downloadProgress.stopDisplayTimer();\n fs.closeSync(fd);\n }\n }\n });\n}\nexports.downloadCacheStorageSDK = downloadCacheStorageSDK;\nconst promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () {\n let timeoutHandle;\n const timeoutPromise = new Promise(resolve => {\n timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs);\n });\n return Promise.race([promise, timeoutPromise]).then(result => {\n clearTimeout(timeoutHandle);\n return result;\n });\n});\n//# sourceMappingURL=downloadUtils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst constants_1 = require(\"./constants\");\nfunction isSuccessStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n return statusCode >= 200 && statusCode < 300;\n}\nexports.isSuccessStatusCode = isSuccessStatusCode;\nfunction isServerErrorStatusCode(statusCode) {\n if (!statusCode) {\n return true;\n }\n return statusCode >= 500;\n}\nexports.isServerErrorStatusCode = isServerErrorStatusCode;\nfunction isRetryableStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n const retryableStatusCodes = [\n http_client_1.HttpCodes.BadGateway,\n http_client_1.HttpCodes.ServiceUnavailable,\n http_client_1.HttpCodes.GatewayTimeout\n ];\n return retryableStatusCodes.includes(statusCode);\n}\nexports.isRetryableStatusCode = isRetryableStatusCode;\nfunction sleep(milliseconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n });\n}\nfunction retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = undefined) {\n return __awaiter(this, void 0, void 0, function* () {\n let errorMessage = '';\n let attempt = 1;\n while (attempt <= maxAttempts) {\n let response = undefined;\n let statusCode = undefined;\n let isRetryable = false;\n try {\n response = yield method();\n }\n catch (error) {\n if (onError) {\n response = onError(error);\n }\n isRetryable = true;\n errorMessage = error.message;\n }\n if (response) {\n statusCode = getStatusCode(response);\n if (!isServerErrorStatusCode(statusCode)) {\n return response;\n }\n }\n if (statusCode) {\n isRetryable = isRetryableStatusCode(statusCode);\n errorMessage = `Cache service responded with ${statusCode}`;\n }\n core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`);\n if (!isRetryable) {\n core.debug(`${name} - Error is not retryable`);\n break;\n }\n yield sleep(delay);\n attempt++;\n }\n throw Error(`${name} failed: ${errorMessage}`);\n });\n}\nexports.retry = retry;\nfunction retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, \n // If the error object contains the statusCode property, extract it and return\n // an TypedResponse so it can be processed by the retry logic.\n (error) => {\n if (error instanceof http_client_1.HttpClientError) {\n return {\n statusCode: error.statusCode,\n result: null,\n headers: {},\n error\n };\n }\n else {\n return undefined;\n }\n });\n });\n}\nexports.retryTypedResponse = retryTypedResponse;\nfunction retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay);\n });\n}\nexports.retryHttpClientResponse = retryHttpClientResponse;\n//# sourceMappingURL=requestUtils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTar = exports.extractTar = exports.listTar = void 0;\nconst exec_1 = require(\"@actions/exec\");\nconst io = __importStar(require(\"@actions/io\"));\nconst fs_1 = require(\"fs\");\nconst path = __importStar(require(\"path\"));\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst constants_1 = require(\"./constants\");\nconst IS_WINDOWS = process.platform === 'win32';\n// Returns tar path and type: BSD or GNU\nfunction getTarPath() {\n return __awaiter(this, void 0, void 0, function* () {\n switch (process.platform) {\n case 'win32': {\n const gnuTar = yield utils.getGnuTarPathOnWindows();\n const systemTar = constants_1.SystemTarPathOnWindows;\n if (gnuTar) {\n // Use GNUtar as default on windows\n return { path: gnuTar, type: constants_1.ArchiveToolType.GNU };\n }\n else if ((0, fs_1.existsSync)(systemTar)) {\n return { path: systemTar, type: constants_1.ArchiveToolType.BSD };\n }\n break;\n }\n case 'darwin': {\n const gnuTar = yield io.which('gtar', false);\n if (gnuTar) {\n // fix permission denied errors when extracting BSD tar archive with GNU tar - https://github.com/actions/cache/issues/527\n return { path: gnuTar, type: constants_1.ArchiveToolType.GNU };\n }\n else {\n return {\n path: yield io.which('tar', true),\n type: constants_1.ArchiveToolType.BSD\n };\n }\n }\n default:\n break;\n }\n // Default assumption is GNU tar is present in path\n return {\n path: yield io.which('tar', true),\n type: constants_1.ArchiveToolType.GNU\n };\n });\n}\n// Return arguments for tar as per tarPath, compressionMethod, method type and os\nfunction getTarArgs(tarPath, compressionMethod, type, archivePath = '') {\n return __awaiter(this, void 0, void 0, function* () {\n const args = [`\"${tarPath.path}\"`];\n const cacheFileName = utils.getCacheFileName(compressionMethod);\n const tarFile = 'cache.tar';\n const workingDirectory = getWorkingDirectory();\n // Speficic args for BSD tar on windows for workaround\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n // Method specific args\n switch (type) {\n case 'create':\n args.push('--posix', '-cf', BSD_TAR_ZSTD\n ? tarFile\n : cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '--exclude', BSD_TAR_ZSTD\n ? tarFile\n : cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '--files-from', constants_1.ManifestFilename);\n break;\n case 'extract':\n args.push('-xf', BSD_TAR_ZSTD\n ? tarFile\n : archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'));\n break;\n case 'list':\n args.push('-tf', BSD_TAR_ZSTD\n ? tarFile\n : archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P');\n break;\n }\n // Platform specific args\n if (tarPath.type === constants_1.ArchiveToolType.GNU) {\n switch (process.platform) {\n case 'win32':\n args.push('--force-local');\n break;\n case 'darwin':\n args.push('--delay-directory-restore');\n break;\n }\n }\n return args;\n });\n}\n// Returns commands to run tar and compression program\nfunction getCommands(compressionMethod, type, archivePath = '') {\n return __awaiter(this, void 0, void 0, function* () {\n let args;\n const tarPath = yield getTarPath();\n const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath);\n const compressionArgs = type !== 'create'\n ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath)\n : yield getCompressionProgram(tarPath, compressionMethod);\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n if (BSD_TAR_ZSTD && type !== 'create') {\n args = [[...compressionArgs].join(' '), [...tarArgs].join(' ')];\n }\n else {\n args = [[...tarArgs].join(' '), [...compressionArgs].join(' ')];\n }\n if (BSD_TAR_ZSTD) {\n return args;\n }\n return [args.join(' ')];\n });\n}\nfunction getWorkingDirectory() {\n var _a;\n return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd();\n}\n// Common function for extractTar and listTar to get the compression method\nfunction getDecompressionProgram(tarPath, compressionMethod, archivePath) {\n return __awaiter(this, void 0, void 0, function* () {\n // -d: Decompress.\n // unzstd is equivalent to 'zstd -d'\n // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.\n // Using 30 here because we also support 32-bit self-hosted runners.\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n switch (compressionMethod) {\n case constants_1.CompressionMethod.Zstd:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -d --long=30 --force -o',\n constants_1.TarFilename,\n archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/')\n ]\n : [\n '--use-compress-program',\n IS_WINDOWS ? '\"zstd -d --long=30\"' : 'unzstd --long=30'\n ];\n case constants_1.CompressionMethod.ZstdWithoutLong:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -d --force -o',\n constants_1.TarFilename,\n archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/')\n ]\n : ['--use-compress-program', IS_WINDOWS ? '\"zstd -d\"' : 'unzstd'];\n default:\n return ['-z'];\n }\n });\n}\n// Used for creating the archive\n// -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores.\n// zstdmt is equivalent to 'zstd -T0'\n// --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.\n// Using 30 here because we also support 32-bit self-hosted runners.\n// Long range mode is added to zstd in v1.3.2 release, so we will not use --long in older version of zstd.\nfunction getCompressionProgram(tarPath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n const cacheFileName = utils.getCacheFileName(compressionMethod);\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n switch (compressionMethod) {\n case constants_1.CompressionMethod.Zstd:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -T0 --long=30 --force -o',\n cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'),\n constants_1.TarFilename\n ]\n : [\n '--use-compress-program',\n IS_WINDOWS ? '\"zstd -T0 --long=30\"' : 'zstdmt --long=30'\n ];\n case constants_1.CompressionMethod.ZstdWithoutLong:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -T0 --force -o',\n cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'),\n constants_1.TarFilename\n ]\n : ['--use-compress-program', IS_WINDOWS ? '\"zstd -T0\"' : 'zstdmt'];\n default:\n return ['-z'];\n }\n });\n}\n// Executes all commands as separate processes\nfunction execCommands(commands, cwd) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const command of commands) {\n try {\n yield (0, exec_1.exec)(command, undefined, {\n cwd,\n env: Object.assign(Object.assign({}, process.env), { MSYS: 'winsymlinks:nativestrict' })\n });\n }\n catch (error) {\n throw new Error(`${command.split(' ')[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`);\n }\n }\n });\n}\n// List the contents of a tar\nfunction listTar(archivePath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n const commands = yield getCommands(compressionMethod, 'list', archivePath);\n yield execCommands(commands);\n });\n}\nexports.listTar = listTar;\n// Extract a tar\nfunction extractTar(archivePath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create directory to extract tar into\n const workingDirectory = getWorkingDirectory();\n yield io.mkdirP(workingDirectory);\n const commands = yield getCommands(compressionMethod, 'extract', archivePath);\n yield execCommands(commands);\n });\n}\nexports.extractTar = extractTar;\n// Create a tar\nfunction createTar(archiveFolder, sourceDirectories, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n // Write source directories to manifest.txt to avoid command length limits\n (0, fs_1.writeFileSync)(path.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join('\\n'));\n const commands = yield getCommands(compressionMethod, 'create');\n yield execCommands(commands, archiveFolder);\n });\n}\nexports.createTar = createTar;\n//# sourceMappingURL=tar.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDownloadOptions = exports.getUploadOptions = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy of the upload options with defaults filled in.\n *\n * @param copy the original upload options\n */\nfunction getUploadOptions(copy) {\n const result = {\n uploadConcurrency: 4,\n uploadChunkSize: 32 * 1024 * 1024\n };\n if (copy) {\n if (typeof copy.uploadConcurrency === 'number') {\n result.uploadConcurrency = copy.uploadConcurrency;\n }\n if (typeof copy.uploadChunkSize === 'number') {\n result.uploadChunkSize = copy.uploadChunkSize;\n }\n }\n core.debug(`Upload concurrency: ${result.uploadConcurrency}`);\n core.debug(`Upload chunk size: ${result.uploadChunkSize}`);\n return result;\n}\nexports.getUploadOptions = getUploadOptions;\n/**\n * Returns a copy of the download options with defaults filled in.\n *\n * @param copy the original download options\n */\nfunction getDownloadOptions(copy) {\n const result = {\n useAzureSdk: false,\n concurrentBlobDownloads: true,\n downloadConcurrency: 8,\n timeoutInMs: 30000,\n segmentTimeoutInMs: 600000,\n lookupOnly: false\n };\n if (copy) {\n if (typeof copy.useAzureSdk === 'boolean') {\n result.useAzureSdk = copy.useAzureSdk;\n }\n if (typeof copy.concurrentBlobDownloads === 'boolean') {\n result.concurrentBlobDownloads = copy.concurrentBlobDownloads;\n }\n if (typeof copy.downloadConcurrency === 'number') {\n result.downloadConcurrency = copy.downloadConcurrency;\n }\n if (typeof copy.timeoutInMs === 'number') {\n result.timeoutInMs = copy.timeoutInMs;\n }\n if (typeof copy.segmentTimeoutInMs === 'number') {\n result.segmentTimeoutInMs = copy.segmentTimeoutInMs;\n }\n if (typeof copy.lookupOnly === 'boolean') {\n result.lookupOnly = copy.lookupOnly;\n }\n }\n const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];\n if (segmentDownloadTimeoutMins &&\n !isNaN(Number(segmentDownloadTimeoutMins)) &&\n isFinite(Number(segmentDownloadTimeoutMins))) {\n result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000;\n }\n core.debug(`Use Azure SDK: ${result.useAzureSdk}`);\n core.debug(`Download concurrency: ${result.downloadConcurrency}`);\n core.debug(`Request timeout (ms): ${result.timeoutInMs}`);\n core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);\n core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);\n core.debug(`Lookup only: ${result.lookupOnly}`);\n return result;\n}\nexports.getDownloadOptions = getDownloadOptions;\n//# sourceMappingURL=options.js.map","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl =\n (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options, ...additionalPlugins) {\n const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);\n return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nconst undici_1 = require(\"undici\");\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getProxyAgentDispatcher(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgentDispatcher(destinationUrl);\n}\nexports.getProxyAgentDispatcher = getProxyAgentDispatcher;\nfunction getProxyFetch(destinationUrl) {\n const httpDispatcher = getProxyAgentDispatcher(destinationUrl);\n const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {\n return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));\n });\n return proxyFetch;\n}\nexports.getProxyFetch = getProxyFetch;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nexports.defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl),\n fetch: Utils.getProxyFetch(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = void 0;\nconst internal_globber_1 = require(\"./internal-globber\");\n/**\n * Constructs a globber\n *\n * @param patterns Patterns separated by newlines\n * @param options Glob options\n */\nfunction create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield internal_globber_1.DefaultGlobber.create(patterns, options);\n });\n}\nexports.create = create;\n//# sourceMappingURL=glob.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOptions = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy with defaults filled in.\n */\nfunction getOptions(copy) {\n const result = {\n followSymbolicLinks: true,\n implicitDescendants: true,\n omitBrokenSymbolicLinks: true\n };\n if (copy) {\n if (typeof copy.followSymbolicLinks === 'boolean') {\n result.followSymbolicLinks = copy.followSymbolicLinks;\n core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);\n }\n if (typeof copy.implicitDescendants === 'boolean') {\n result.implicitDescendants = copy.implicitDescendants;\n core.debug(`implicitDescendants '${result.implicitDescendants}'`);\n }\n if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {\n result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;\n core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);\n }\n }\n return result;\n}\nexports.getOptions = getOptions;\n//# sourceMappingURL=internal-glob-options-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nvar __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\nvar __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultGlobber = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst fs = __importStar(require(\"fs\"));\nconst globOptionsHelper = __importStar(require(\"./internal-glob-options-helper\"));\nconst path = __importStar(require(\"path\"));\nconst patternHelper = __importStar(require(\"./internal-pattern-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_pattern_1 = require(\"./internal-pattern\");\nconst internal_search_state_1 = require(\"./internal-search-state\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass DefaultGlobber {\n constructor(options) {\n this.patterns = [];\n this.searchPaths = [];\n this.options = globOptionsHelper.getOptions(options);\n }\n getSearchPaths() {\n // Return a copy\n return this.searchPaths.slice();\n }\n glob() {\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n const result = [];\n try {\n for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {\n const itemPath = _c.value;\n result.push(itemPath);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n });\n }\n globGenerator() {\n return __asyncGenerator(this, arguments, function* globGenerator_1() {\n // Fill in defaults options\n const options = globOptionsHelper.getOptions(this.options);\n // Implicit descendants?\n const patterns = [];\n for (const pattern of this.patterns) {\n patterns.push(pattern);\n if (options.implicitDescendants &&\n (pattern.trailingSeparator ||\n pattern.segments[pattern.segments.length - 1] !== '**')) {\n patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat('**')));\n }\n }\n // Push the search paths\n const stack = [];\n for (const searchPath of patternHelper.getSearchPaths(patterns)) {\n core.debug(`Search path '${searchPath}'`);\n // Exists?\n try {\n // Intentionally using lstat. Detection for broken symlink\n // will be performed later (if following symlinks).\n yield __await(fs.promises.lstat(searchPath));\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n continue;\n }\n throw err;\n }\n stack.unshift(new internal_search_state_1.SearchState(searchPath, 1));\n }\n // Search\n const traversalChain = []; // used to detect cycles\n while (stack.length) {\n // Pop\n const item = stack.pop();\n // Match?\n const match = patternHelper.match(patterns, item.path);\n const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path);\n if (!match && !partialMatch) {\n continue;\n }\n // Stat\n const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)\n // Broken symlink, or symlink cycle detected, or no longer exists\n );\n // Broken symlink, or symlink cycle detected, or no longer exists\n if (!stats) {\n continue;\n }\n // Directory\n if (stats.isDirectory()) {\n // Matched\n if (match & internal_match_kind_1.MatchKind.Directory) {\n yield yield __await(item.path);\n }\n // Descend?\n else if (!partialMatch) {\n continue;\n }\n // Push the child items in reverse\n const childLevel = item.level + 1;\n const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel));\n stack.push(...childItems.reverse());\n }\n // File\n else if (match & internal_match_kind_1.MatchKind.File) {\n yield yield __await(item.path);\n }\n }\n });\n }\n /**\n * Constructs a DefaultGlobber\n */\n static create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = new DefaultGlobber(options);\n if (IS_WINDOWS) {\n patterns = patterns.replace(/\\r\\n/g, '\\n');\n patterns = patterns.replace(/\\r/g, '\\n');\n }\n const lines = patterns.split('\\n').map(x => x.trim());\n for (const line of lines) {\n // Empty or comment\n if (!line || line.startsWith('#')) {\n continue;\n }\n // Pattern\n else {\n result.patterns.push(new internal_pattern_1.Pattern(line));\n }\n }\n result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns));\n return result;\n });\n }\n static stat(item, options, traversalChain) {\n return __awaiter(this, void 0, void 0, function* () {\n // Note:\n // `stat` returns info about the target of a symlink (or symlink chain)\n // `lstat` returns info about a symlink itself\n let stats;\n if (options.followSymbolicLinks) {\n try {\n // Use `stat` (following symlinks)\n stats = yield fs.promises.stat(item.path);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n if (options.omitBrokenSymbolicLinks) {\n core.debug(`Broken symlink '${item.path}'`);\n return undefined;\n }\n throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);\n }\n throw err;\n }\n }\n else {\n // Use `lstat` (not following symlinks)\n stats = yield fs.promises.lstat(item.path);\n }\n // Note, isDirectory() returns false for the lstat of a symlink\n if (stats.isDirectory() && options.followSymbolicLinks) {\n // Get the realpath\n const realPath = yield fs.promises.realpath(item.path);\n // Fixup the traversal chain to match the item level\n while (traversalChain.length >= item.level) {\n traversalChain.pop();\n }\n // Test for a cycle\n if (traversalChain.some((x) => x === realPath)) {\n core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);\n return undefined;\n }\n // Update the traversal chain\n traversalChain.push(realPath);\n }\n return stats;\n });\n }\n}\nexports.DefaultGlobber = DefaultGlobber;\n//# sourceMappingURL=internal-globber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MatchKind = void 0;\n/**\n * Indicates whether a pattern matches a path\n */\nvar MatchKind;\n(function (MatchKind) {\n /** Not matched */\n MatchKind[MatchKind[\"None\"] = 0] = \"None\";\n /** Matched if the path is a directory */\n MatchKind[MatchKind[\"Directory\"] = 1] = \"Directory\";\n /** Matched if the path is a regular file */\n MatchKind[MatchKind[\"File\"] = 2] = \"File\";\n /** Matched */\n MatchKind[MatchKind[\"All\"] = 3] = \"All\";\n})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));\n//# sourceMappingURL=internal-match-kind.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0;\nconst path = __importStar(require(\"path\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.\n *\n * For example, on Linux/macOS:\n * - `/ => /`\n * - `/hello => /`\n *\n * For example, on Windows:\n * - `C:\\ => C:\\`\n * - `C:\\hello => C:\\`\n * - `C: => C:`\n * - `C:hello => C:`\n * - `\\ => \\`\n * - `\\hello => \\`\n * - `\\\\hello => \\\\hello`\n * - `\\\\hello\\world => \\\\hello\\world`\n */\nfunction dirname(p) {\n // Normalize slashes and trim unnecessary trailing slash\n p = safeTrimTrailingSeparator(p);\n // Windows UNC root, e.g. \\\\hello or \\\\hello\\world\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+(\\\\[^\\\\]+)?$/.test(p)) {\n return p;\n }\n // Get dirname\n let result = path.dirname(p);\n // Trim trailing slash for Windows UNC root, e.g. \\\\hello\\world\\\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+\\\\[^\\\\]+\\\\$/.test(result)) {\n result = safeTrimTrailingSeparator(result);\n }\n return result;\n}\nexports.dirname = dirname;\n/**\n * Roots the path if not already rooted. On Windows, relative roots like `\\`\n * or `C:` are expanded based on the current working directory.\n */\nfunction ensureAbsoluteRoot(root, itemPath) {\n assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);\n assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Already rooted\n if (hasAbsoluteRoot(itemPath)) {\n return itemPath;\n }\n // Windows\n if (IS_WINDOWS) {\n // Check for itemPath like C: or C:foo\n if (itemPath.match(/^[A-Z]:[^\\\\/]|^[A-Z]:$/i)) {\n let cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n // Drive letter matches cwd? Expand to cwd\n if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {\n // Drive only, e.g. C:\n if (itemPath.length === 2) {\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}`;\n }\n // Drive + path, e.g. C:foo\n else {\n if (!cwd.endsWith('\\\\')) {\n cwd += '\\\\';\n }\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}${itemPath.substr(2)}`;\n }\n }\n // Different drive\n else {\n return `${itemPath[0]}:\\\\${itemPath.substr(2)}`;\n }\n }\n // Check for itemPath like \\ or \\foo\n else if (normalizeSeparators(itemPath).match(/^\\\\$|^\\\\[^\\\\]/)) {\n const cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n return `${cwd[0]}:\\\\${itemPath.substr(1)}`;\n }\n }\n assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);\n // Otherwise ensure root ends with a separator\n if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\\\'))) {\n // Intentionally empty\n }\n else {\n // Append separator\n root += path.sep;\n }\n return root + itemPath;\n}\nexports.ensureAbsoluteRoot = ensureAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\\\hello\\share` and `C:\\hello` (and using alternate separator).\n */\nfunction hasAbsoluteRoot(itemPath) {\n assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\\\hello\\share or C:\\hello\n return itemPath.startsWith('\\\\\\\\') || /^[A-Z]:\\\\/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasAbsoluteRoot = hasAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\`, `\\hello`, `\\\\hello\\share`, `C:`, and `C:\\hello` (and using alternate separator).\n */\nfunction hasRoot(itemPath) {\n assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\ or \\hello or \\\\hello\n // E.g. C: or C:\\hello\n return itemPath.startsWith('\\\\') || /^[A-Z]:/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasRoot = hasRoot;\n/**\n * Removes redundant slashes and converts `/` to `\\` on Windows\n */\nfunction normalizeSeparators(p) {\n p = p || '';\n // Windows\n if (IS_WINDOWS) {\n // Convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // Remove redundant slashes\n const isUnc = /^\\\\\\\\+[^\\\\]/.test(p); // e.g. \\\\hello\n return (isUnc ? '\\\\' : '') + p.replace(/\\\\\\\\+/g, '\\\\'); // preserve leading \\\\ for UNC\n }\n // Remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\nexports.normalizeSeparators = normalizeSeparators;\n/**\n * Normalizes the path separators and trims the trailing separator (when safe).\n * For example, `/foo/ => /foo` but `/ => /`\n */\nfunction safeTrimTrailingSeparator(p) {\n // Short-circuit if empty\n if (!p) {\n return '';\n }\n // Normalize separators\n p = normalizeSeparators(p);\n // No trailing slash\n if (!p.endsWith(path.sep)) {\n return p;\n }\n // Check '/' on Linux/macOS and '\\' on Windows\n if (p === path.sep) {\n return p;\n }\n // On Windows check if drive root. E.g. C:\\\n if (IS_WINDOWS && /^[A-Z]:\\\\$/i.test(p)) {\n return p;\n }\n // Otherwise trim trailing slash\n return p.substr(0, p.length - 1);\n}\nexports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;\n//# sourceMappingURL=internal-path-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Path = void 0;\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Helper class for parsing paths into segments\n */\nclass Path {\n /**\n * Constructs a Path\n * @param itemPath Path or array of segments\n */\n constructor(itemPath) {\n this.segments = [];\n // String\n if (typeof itemPath === 'string') {\n assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // Not rooted\n if (!pathHelper.hasRoot(itemPath)) {\n this.segments = itemPath.split(path.sep);\n }\n // Rooted\n else {\n // Add all segments, while not at the root\n let remaining = itemPath;\n let dir = pathHelper.dirname(remaining);\n while (dir !== remaining) {\n // Add the segment\n const basename = path.basename(remaining);\n this.segments.unshift(basename);\n // Truncate the last segment\n remaining = dir;\n dir = pathHelper.dirname(remaining);\n }\n // Remainder is the root\n this.segments.unshift(remaining);\n }\n }\n // Array\n else {\n // Must not be empty\n assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);\n // Each segment\n for (let i = 0; i < itemPath.length; i++) {\n let segment = itemPath[i];\n // Must not be empty\n assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);\n // Normalize slashes\n segment = pathHelper.normalizeSeparators(itemPath[i]);\n // Root segment\n if (i === 0 && pathHelper.hasRoot(segment)) {\n segment = pathHelper.safeTrimTrailingSeparator(segment);\n assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);\n this.segments.push(segment);\n }\n // All other segments\n else {\n // Must not contain slash\n assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);\n this.segments.push(segment);\n }\n }\n }\n }\n /**\n * Converts the path to it's string representation\n */\n toString() {\n // First segment\n let result = this.segments[0];\n // All others\n let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result));\n for (let i = 1; i < this.segments.length; i++) {\n if (skipSlash) {\n skipSlash = false;\n }\n else {\n result += path.sep;\n }\n result += this.segments[i];\n }\n return result;\n }\n}\nexports.Path = Path;\n//# sourceMappingURL=internal-path.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.partialMatch = exports.match = exports.getSearchPaths = void 0;\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Given an array of patterns, returns an array of paths to search.\n * Duplicates and paths under other included paths are filtered out.\n */\nfunction getSearchPaths(patterns) {\n // Ignore negate patterns\n patterns = patterns.filter(x => !x.negate);\n // Create a map of all search paths\n const searchPathMap = {};\n for (const pattern of patterns) {\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n searchPathMap[key] = 'candidate';\n }\n const result = [];\n for (const pattern of patterns) {\n // Check if already included\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n if (searchPathMap[key] === 'included') {\n continue;\n }\n // Check for an ancestor search path\n let foundAncestor = false;\n let tempKey = key;\n let parent = pathHelper.dirname(tempKey);\n while (parent !== tempKey) {\n if (searchPathMap[parent]) {\n foundAncestor = true;\n break;\n }\n tempKey = parent;\n parent = pathHelper.dirname(tempKey);\n }\n // Include the search pattern in the result\n if (!foundAncestor) {\n result.push(pattern.searchPath);\n searchPathMap[key] = 'included';\n }\n }\n return result;\n}\nexports.getSearchPaths = getSearchPaths;\n/**\n * Matches the patterns against the path\n */\nfunction match(patterns, itemPath) {\n let result = internal_match_kind_1.MatchKind.None;\n for (const pattern of patterns) {\n if (pattern.negate) {\n result &= ~pattern.match(itemPath);\n }\n else {\n result |= pattern.match(itemPath);\n }\n }\n return result;\n}\nexports.match = match;\n/**\n * Checks whether to descend further into the directory\n */\nfunction partialMatch(patterns, itemPath) {\n return patterns.some(x => !x.negate && x.partialMatch(itemPath));\n}\nexports.partialMatch = partialMatch;\n//# sourceMappingURL=internal-pattern-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Pattern = void 0;\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst minimatch_1 = require(\"minimatch\");\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_path_1 = require(\"./internal-path\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass Pattern {\n constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) {\n /**\n * Indicates whether matches should be excluded from the result set\n */\n this.negate = false;\n // Pattern overload\n let pattern;\n if (typeof patternOrNegate === 'string') {\n pattern = patternOrNegate.trim();\n }\n // Segments overload\n else {\n // Convert to pattern\n segments = segments || [];\n assert_1.default(segments.length, `Parameter 'segments' must not empty`);\n const root = Pattern.getLiteral(segments[0]);\n assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);\n pattern = new internal_path_1.Path(segments).toString().trim();\n if (patternOrNegate) {\n pattern = `!${pattern}`;\n }\n }\n // Negate\n while (pattern.startsWith('!')) {\n this.negate = !this.negate;\n pattern = pattern.substr(1).trim();\n }\n // Normalize slashes and ensures absolute root\n pattern = Pattern.fixupPattern(pattern, homedir);\n // Segments\n this.segments = new internal_path_1.Path(pattern).segments;\n // Trailing slash indicates the pattern should only match directories, not regular files\n this.trailingSeparator = pathHelper\n .normalizeSeparators(pattern)\n .endsWith(path.sep);\n pattern = pathHelper.safeTrimTrailingSeparator(pattern);\n // Search path (literal path prior to the first glob segment)\n let foundGlob = false;\n const searchSegments = this.segments\n .map(x => Pattern.getLiteral(x))\n .filter(x => !foundGlob && !(foundGlob = x === ''));\n this.searchPath = new internal_path_1.Path(searchSegments).toString();\n // Root RegExp (required when determining partial match)\n this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : '');\n this.isImplicitPattern = isImplicitPattern;\n // Create minimatch\n const minimatchOptions = {\n dot: true,\n nobrace: true,\n nocase: IS_WINDOWS,\n nocomment: true,\n noext: true,\n nonegate: true\n };\n pattern = IS_WINDOWS ? pattern.replace(/\\\\/g, '/') : pattern;\n this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions);\n }\n /**\n * Matches the pattern against the specified path\n */\n match(itemPath) {\n // Last segment is globstar?\n if (this.segments[this.segments.length - 1] === '**') {\n // Normalize slashes\n itemPath = pathHelper.normalizeSeparators(itemPath);\n // Append a trailing slash. Otherwise Minimatch will not match the directory immediately\n // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns\n // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.\n if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) {\n // Note, this is safe because the constructor ensures the pattern has an absolute root.\n // For example, formats like C: and C:foo on Windows are resolved to an absolute root.\n itemPath = `${itemPath}${path.sep}`;\n }\n }\n else {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n }\n // Match\n if (this.minimatch.match(itemPath)) {\n return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All;\n }\n return internal_match_kind_1.MatchKind.None;\n }\n /**\n * Indicates whether the pattern may match descendants of the specified path\n */\n partialMatch(itemPath) {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // matchOne does not handle root path correctly\n if (pathHelper.dirname(itemPath) === itemPath) {\n return this.rootRegExp.test(itemPath);\n }\n return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\\\+/ : /\\/+/), this.minimatch.set[0], true);\n }\n /**\n * Escapes glob patterns within a path\n */\n static globEscape(s) {\n return (IS_WINDOWS ? s : s.replace(/\\\\/g, '\\\\\\\\')) // escape '\\' on Linux/macOS\n .replace(/(\\[)(?=[^/]+\\])/g, '[[]') // escape '[' when ']' follows within the path segment\n .replace(/\\?/g, '[?]') // escape '?'\n .replace(/\\*/g, '[*]'); // escape '*'\n }\n /**\n * Normalizes slashes and ensures absolute root\n */\n static fixupPattern(pattern, homedir) {\n // Empty\n assert_1.default(pattern, 'pattern cannot be empty');\n // Must not contain `.` segment, unless first segment\n // Must not contain `..` segment\n const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));\n assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);\n // Must not contain globs in root, e.g. Windows UNC path \\\\foo\\b*r\n assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);\n // Normalize slashes\n pattern = pathHelper.normalizeSeparators(pattern);\n // Replace leading `.` segment\n if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {\n pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);\n }\n // Replace leading `~` segment\n else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {\n homedir = homedir || os.homedir();\n assert_1.default(homedir, 'Unable to determine HOME directory');\n assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);\n pattern = Pattern.globEscape(homedir) + pattern.substr(1);\n }\n // Replace relative drive root, e.g. pattern is C: or C:foo\n else if (IS_WINDOWS &&\n (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\\\]/i))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', pattern.substr(0, 2));\n if (pattern.length > 2 && !root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(2);\n }\n // Replace relative root, e.g. pattern is \\ or \\foo\n else if (IS_WINDOWS && (pattern === '\\\\' || pattern.match(/^\\\\[^\\\\]/))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', '\\\\');\n if (!root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(1);\n }\n // Otherwise ensure absolute root\n else {\n pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);\n }\n return pathHelper.normalizeSeparators(pattern);\n }\n /**\n * Attempts to unescape a pattern segment to create a literal path segment.\n * Otherwise returns empty string.\n */\n static getLiteral(segment) {\n let literal = '';\n for (let i = 0; i < segment.length; i++) {\n const c = segment[i];\n // Escape\n if (c === '\\\\' && !IS_WINDOWS && i + 1 < segment.length) {\n literal += segment[++i];\n continue;\n }\n // Wildcard\n else if (c === '*' || c === '?') {\n return '';\n }\n // Character set\n else if (c === '[' && i + 1 < segment.length) {\n let set = '';\n let closed = -1;\n for (let i2 = i + 1; i2 < segment.length; i2++) {\n const c2 = segment[i2];\n // Escape\n if (c2 === '\\\\' && !IS_WINDOWS && i2 + 1 < segment.length) {\n set += segment[++i2];\n continue;\n }\n // Closed\n else if (c2 === ']') {\n closed = i2;\n break;\n }\n // Otherwise\n else {\n set += c2;\n }\n }\n // Closed?\n if (closed >= 0) {\n // Cannot convert\n if (set.length > 1) {\n return '';\n }\n // Convert to literal\n if (set) {\n literal += set;\n i = closed;\n continue;\n }\n }\n // Otherwise fall thru\n }\n // Append\n literal += c;\n }\n return literal;\n }\n /**\n * Escapes regexp special characters\n * https://javascript.info/regexp-escaping\n */\n static regExpEscape(s) {\n return s.replace(/[[\\\\^$.|?*+()]/g, '\\\\$&');\n }\n}\nexports.Pattern = Pattern;\n//# sourceMappingURL=internal-pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchState = void 0;\nclass SearchState {\n constructor(path, level) {\n this.path = path;\n this.level = level;\n }\n}\nexports.SearchState = SearchState;\n//# sourceMappingURL=internal-search-state.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nconst undici_1 = require(\"undici\");\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (exports.Headers = Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return;\n }\n return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {\n token: `${proxyUrl.username}:${proxyUrl.password}`\n })));\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_a = fs.promises\n// export const {open} = 'fs'\n, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\n// export const {open} = 'fs'\nexports.IS_WINDOWS = process.platform === 'win32';\n// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691\nexports.UV_FS_O_EXLOCK = 0x10000000;\nexports.READONLY = fs.constants.O_RDONLY;\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nclass AbortSignal {\n constructor() {\n /**\n * onabort event listener.\n */\n this.onabort = null;\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n get aborted() {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n return abortedMap.get(this);\n }\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n static get none() {\n return new AbortSignal();\n }\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n addEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n listeners.push(listener);\n }\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n removeEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event) {\n throw new Error(\"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\");\n }\n}\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nfunction abortSignal(signal) {\n if (signal.aborted) {\n return;\n }\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n const listeners = listenersMap.get(signal);\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n abortedMap.set(signal, true);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nclass AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nclass AbortController {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals) {\n this._signal = new AbortSignal();\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n }\n else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n get signal() {\n return this._signal;\n }\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort() {\n abortSignal(this._signal);\n }\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n static timeout(ms) {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n\nexports.AbortController = AbortController;\nexports.AbortError = AbortError;\nexports.AbortSignal = AbortSignal;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nclass AzureKeyCredential {\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n this._key = key;\n }\n /**\n * The value of the key to be used in authentication\n */\n get key() {\n return this._key;\n }\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n update(newKey) {\n this._key = newKey;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n * @internal\n */\nfunction isDefined(thing) {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * Note: The properties may be inherited.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n * @internal\n */\nfunction isObjectWithProperties(thing, properties) {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * Note: The property may be inherited.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n * @internal\n */\nfunction objectHasProperty(thing, property) {\n return typeof thing === \"object\" && property in thing;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A static name/key-based credential that supports updating\n * the underlying name and key values.\n */\nclass AzureNamedKeyCredential {\n /**\n * Create an instance of an AzureNamedKeyCredential for use\n * with a service client.\n *\n * @param name - The initial value of the name to use in authentication.\n * @param key - The initial value of the key to use in authentication.\n */\n constructor(name, key) {\n if (!name || !key) {\n throw new TypeError(\"name and key must be non-empty strings\");\n }\n this._name = name;\n this._key = key;\n }\n /**\n * The value of the key to be used in authentication.\n */\n get key() {\n return this._key;\n }\n /**\n * The value of the name to be used in authentication.\n */\n get name() {\n return this._name;\n }\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newName - The new name value to be used.\n * @param newKey - The new key value to be used.\n */\n update(newName, newKey) {\n if (!newName || !newKey) {\n throw new TypeError(\"newName and newKey must be non-empty strings\");\n }\n this._name = newName;\n this._key = newKey;\n }\n}\n/**\n * Tests an object to determine whether it implements NamedKeyCredential.\n *\n * @param credential - The assumed NamedKeyCredential to be tested.\n */\nfunction isNamedKeyCredential(credential) {\n return (isObjectWithProperties(credential, [\"name\", \"key\"]) &&\n typeof credential.key === \"string\" &&\n typeof credential.name === \"string\");\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A static-signature-based credential that supports updating\n * the underlying signature value.\n */\nclass AzureSASCredential {\n /**\n * Create an instance of an AzureSASCredential for use\n * with a service client.\n *\n * @param signature - The initial value of the shared access signature to use in authentication\n */\n constructor(signature) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = signature;\n }\n /**\n * The value of the shared access signature to be used in authentication\n */\n get signature() {\n return this._signature;\n }\n /**\n * Change the value of the signature.\n *\n * Updates will take effect upon the next request after\n * updating the signature value.\n *\n * @param newSignature - The new shared access signature value to be used\n */\n update(newSignature) {\n if (!newSignature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = newSignature;\n }\n}\n/**\n * Tests an object to determine whether it implements SASCredential.\n *\n * @param credential - The assumed SASCredential to be tested.\n */\nfunction isSASCredential(credential) {\n return (isObjectWithProperties(credential, [\"signature\"]) && typeof credential.signature === \"string\");\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nfunction isTokenCredential(credential) {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n const castCredential = credential;\n return (castCredential &&\n typeof castCredential.getToken === \"function\" &&\n (castCredential.signRequest === undefined || castCredential.getToken.length > 0));\n}\n\nexports.AzureKeyCredential = AzureKeyCredential;\nexports.AzureNamedKeyCredential = AzureNamedKeyCredential;\nexports.AzureSASCredential = AzureSASCredential;\nexports.isNamedKeyCredential = isNamedKeyCredential;\nexports.isSASCredential = isSASCredential;\nexports.isTokenCredential = isTokenCredential;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar uuid = require('uuid');\nvar util = require('util');\nvar tslib = require('tslib');\nvar xml2js = require('xml2js');\nvar coreUtil = require('@azure/core-util');\nvar logger$1 = require('@azure/logger');\nvar coreAuth = require('@azure/core-auth');\nvar os = require('os');\nvar http = require('http');\nvar https = require('https');\nvar abortController = require('@azure/abort-controller');\nvar tunnel = require('tunnel');\nvar stream = require('stream');\nvar FormData = require('form-data');\nvar node_fetch = require('node-fetch');\nvar coreTracing = require('@azure/core-tracing');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n[\"default\"] = e;\n return Object.freeze(n);\n}\n\nvar xml2js__namespace = /*#__PURE__*/_interopNamespace(xml2js);\nvar os__namespace = /*#__PURE__*/_interopNamespace(os);\nvar http__namespace = /*#__PURE__*/_interopNamespace(http);\nvar https__namespace = /*#__PURE__*/_interopNamespace(https);\nvar tunnel__namespace = /*#__PURE__*/_interopNamespace(tunnel);\nvar FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData);\nvar node_fetch__default = /*#__PURE__*/_interopDefaultLegacy(node_fetch);\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName) {\n return headerName.toLowerCase();\n}\nfunction isHttpHeadersLike(object) {\n if (object && typeof object === \"object\") {\n const castObject = object;\n if (typeof castObject.rawHeaders === \"function\" &&\n typeof castObject.clone === \"function\" &&\n typeof castObject.get === \"function\" &&\n typeof castObject.set === \"function\" &&\n typeof castObject.contains === \"function\" &&\n typeof castObject.remove === \"function\" &&\n typeof castObject.headersArray === \"function\" &&\n typeof castObject.headerValues === \"function\" &&\n typeof castObject.headerNames === \"function\" &&\n typeof castObject.toJson === \"function\") {\n return true;\n }\n }\n return false;\n}\n/**\n * A collection of HTTP header key/value pairs.\n */\nclass HttpHeaders {\n constructor(rawHeaders) {\n this._headersMap = {};\n if (rawHeaders) {\n for (const headerName in rawHeaders) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName - The name of the header to set. This value is case-insensitive.\n * @param headerValue - The value of the header to set.\n */\n set(headerName, headerValue) {\n this._headersMap[getHeaderKey(headerName)] = {\n name: headerName,\n value: headerValue.toString(),\n };\n }\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName - The name of the header.\n */\n get(headerName) {\n const header = this._headersMap[getHeaderKey(headerName)];\n return !header ? undefined : header.value;\n }\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n contains(headerName) {\n return !!this._headersMap[getHeaderKey(headerName)];\n }\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName - The name of the header to remove.\n */\n remove(headerName) {\n const result = this.contains(headerName);\n delete this._headersMap[getHeaderKey(headerName)];\n return result;\n }\n /**\n * Get the headers that are contained this collection as an object.\n */\n rawHeaders() {\n return this.toJson({ preserveCase: true });\n }\n /**\n * Get the headers that are contained in this collection as an array.\n */\n headersArray() {\n const headers = [];\n for (const headerKey in this._headersMap) {\n headers.push(this._headersMap[headerKey]);\n }\n return headers;\n }\n /**\n * Get the header names that are contained in this collection.\n */\n headerNames() {\n const headerNames = [];\n const headers = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerNames.push(headers[i].name);\n }\n return headerNames;\n }\n /**\n * Get the header values that are contained in this collection.\n */\n headerValues() {\n const headerValues = [];\n const headers = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerValues.push(headers[i].value);\n }\n return headerValues;\n }\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n toJson(options = {}) {\n const result = {};\n if (options.preserveCase) {\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n result[header.name] = header.value;\n }\n }\n else {\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n result[getHeaderKey(header.name)] = header.value;\n }\n }\n return result;\n }\n /**\n * Get the string representation of this HTTP header collection.\n */\n toString() {\n return JSON.stringify(this.toJson({ preserveCase: true }));\n }\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n clone() {\n const resultPreservingCasing = {};\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n resultPreservingCasing[header.name] = header.value;\n }\n return new HttpHeaders(resultPreservingCasing);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Encodes a string in base64 format.\n * @param value - The string to encode\n */\nfunction encodeString(value) {\n return Buffer.from(value).toString(\"base64\");\n}\n/**\n * Encodes a byte array in base64 format.\n * @param value - The Uint8Aray to encode\n */\nfunction encodeByteArray(value) {\n // Buffer.from accepts | -- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer);\n return bufferValue.toString(\"base64\");\n}\n/**\n * Decodes a base64 string into a byte array.\n * @param value - The base64 string to decode\n */\nfunction decodeString(value) {\n return Buffer.from(value, \"base64\");\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A set of constants used internally when processing requests.\n */\nconst Constants = {\n /**\n * The core-http version\n */\n coreHttpVersion: \"3.0.2\",\n /**\n * Specifies HTTP.\n */\n HTTP: \"http:\",\n /**\n * Specifies HTTPS.\n */\n HTTPS: \"https:\",\n /**\n * Specifies HTTP Proxy.\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n /**\n * Specifies HTTPS Proxy.\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n /**\n * Specifies NO Proxy.\n */\n NO_PROXY: \"NO_PROXY\",\n /**\n * Specifies ALL Proxy.\n */\n ALL_PROXY: \"ALL_PROXY\",\n HttpConstants: {\n /**\n * Http Verbs\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\",\n },\n StatusCodes: {\n TooManyRequests: 429,\n ServiceUnavailable: 503,\n },\n },\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n */\n AUTHORIZATION: \"authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n */\n RETRY_AFTER: \"Retry-After\",\n /**\n * The UserAgent header.\n */\n USER_AGENT: \"User-Agent\",\n },\n};\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Default key used to access the XML attributes.\n */\nconst XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nconst XML_CHARKEY = \"_\";\n\n// Copyright (c) Microsoft Corporation.\nconst validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;\n/**\n * Encodes an URI.\n *\n * @param uri - The URI to be encoded.\n * @returns The encoded URI.\n */\nfunction encodeUri(uri) {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param response - The Http Response\n * @returns The stripped version of Http Response.\n */\nfunction stripResponse(response) {\n const strippedResponse = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param request - The Http Request object\n * @returns The stripped version of Http Request.\n */\nfunction stripRequest(request) {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n/**\n * Validates the given uuid as a string\n *\n * @param uuid - The uuid as a string that needs to be validated\n * @returns True if the uuid is valid; false otherwise.\n */\nfunction isValidUuid(uuid) {\n return validUuidRegex.test(uuid);\n}\n/**\n * Generated UUID\n *\n * @returns RFC4122 v4 UUID.\n */\nfunction generateUuid() {\n return uuid.v4();\n}\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param promiseFactories - An array of promise factories(A function that return a promise)\n * @param kickstart - Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n * @returns A chain of resolved or rejected promises\n */\nfunction executePromisesSequentially(promiseFactories, kickstart) {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n/**\n * Converts a Promise to a callback.\n * @param promise - The Promise to be converted to a callback\n * @returns A function that takes the callback `(cb: Function) => void`\n * @deprecated generated code should instead depend on responseToBody\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction promiseToCallback(promise) {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n return (cb) => {\n promise\n .then((data) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n return cb(undefined, data);\n })\n .catch((err) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n cb(err);\n });\n };\n}\n/**\n * Converts a Promise to a service callback.\n * @param promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns A function that takes the service callback (cb: ServiceCallback): void\n */\nfunction promiseToServiceCallback(promise) {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb) => {\n promise\n .then((data) => {\n return process.nextTick(cb, undefined, data.parsedBody, data.request, data);\n })\n .catch((err) => {\n process.nextTick(cb, err);\n });\n };\n}\nfunction prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n const result = { [elementName]: obj };\n result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n return result;\n}\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param targetCtor - The target object on which the properties need to be applied.\n * @param sourceCtors - An array of source objects from which the properties need to be taken.\n */\nfunction applyMixins(targetCtorParam, sourceCtors) {\n const castTargetCtorParam = targetCtorParam;\n sourceCtors.forEach((sourceCtor) => {\n Object.getOwnPropertyNames(sourceCtor.prototype).forEach((name) => {\n castTargetCtorParam.prototype[name] = sourceCtor.prototype[name];\n });\n });\n}\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param value - The value to be validated for ISO 8601 duration format.\n * @returns `true` if valid, `false` otherwise.\n */\nfunction isDuration(value) {\n return validateISODuration.test(value);\n}\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param value - The value to search and replace in.\n * @param searchValue - The value to search for in the value argument.\n * @param replaceValue - The value to replace searchValue with in the value argument.\n * @returns The value where each instance of searchValue was replaced with replacedValue.\n */\nfunction replaceAll(value, searchValue, replaceValue) {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n/**\n * Determines whether the given entity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param value - Any entity\n * @returns true is it is primitive type, false otherwise.\n */\nfunction isPrimitiveType(value) {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}\nfunction getEnvironmentValue(name) {\n if (process.env[name]) {\n return process.env[name];\n }\n else if (process.env[name.toLowerCase()]) {\n return process.env[name.toLowerCase()];\n }\n return undefined;\n}\n/**\n * @internal\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nfunction isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n\n// Copyright (c) Microsoft Corporation.\n// This file contains utility code to serialize and deserialize network operations according to `OperationSpec` objects generated by AutoRest.TypeScript from OpenAPI specifications.\n/**\n * Used to map raw response objects to final shapes.\n * Helps packing and unpacking Dates and other encoded types that are not intrinsic to JSON.\n * Also allows pulling values from headers, as well as inserting default values and constants.\n */\nclass Serializer {\n constructor(\n /**\n * The provided model mapper.\n */\n modelMappers = {}, \n /**\n * Whether the contents are XML or not.\n */\n isXML) {\n this.modelMappers = modelMappers;\n this.isXML = isXML;\n }\n /**\n * Validates constraints, if any. This function will throw if the provided value does not respect those constraints.\n * @param mapper - The definition of data models.\n * @param value - The value.\n * @param objectName - Name of the object. Used in the error messages.\n * @deprecated Removing the constraints validation on client side.\n */\n validateConstraints(mapper, value, objectName) {\n const failValidation = (constraintName, constraintValue) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && value != undefined) {\n const valueAsNumber = value;\n const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints;\n if (ExclusiveMaximum != undefined && valueAsNumber >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && valueAsNumber <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && valueAsNumber > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && valueAsNumber < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n const valueAsArray = value;\n if (MaxItems != undefined && valueAsArray.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && valueAsArray.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && valueAsArray.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && valueAsArray.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && valueAsNumber % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if (typeof value !== \"string\" || value.match(pattern) === null) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems &&\n valueAsArray.some((item, i, ar) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n /**\n * Serialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param object - A valid Javascript object to be serialized.\n * @param objectName - Name of the serialized object.\n * @param options - additional options to deserialization.\n * @returns A valid serialized Javascript object.\n */\n serialize(mapper, object, objectName, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n let payload = {};\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Sequence$/i) !== null) {\n payload = [];\n }\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n const { required, nullable } = mapper;\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n if (object == undefined) {\n payload = object;\n }\n else {\n if (mapperType.match(/^any$/i) !== null) {\n payload = object;\n }\n else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n }\n else if (mapperType.match(/^Enum$/i) !== null) {\n const enumMapper = mapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n }\n else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = serializeByteArrayType(objectName, object);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Composite$/i) !== null) {\n payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n }\n return payload;\n }\n /**\n * Deserialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param responseBody - A valid Javascript entity to be deserialized.\n * @param objectName - Name of the deserialized object.\n * @param options - Controls behavior of XML parser and builder.\n * @returns A valid deserialized Javascript object.\n */\n deserialize(mapper, responseBody, objectName, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n let payload;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Composite$/i) !== null) {\n payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else {\n if (this.isXML) {\n const xmlCharKey = updatedOptions.xmlCharKey;\n const castResponseBody = responseBody;\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\" i.e., XML_ATTRKEY) and body (\"#\" i.e., XML_CHARKEY) properties,\n * then just reduce the responseBody value to the body (\"#\" i.e., XML_CHARKEY) property.\n */\n if (castResponseBody[XML_ATTRKEY] != undefined &&\n castResponseBody[xmlCharKey] != undefined) {\n responseBody = castResponseBody[xmlCharKey];\n }\n }\n if (mapperType.match(/^Number$/i) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^Boolean$/i) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n }\n else if (responseBody === \"false\") {\n payload = false;\n }\n else {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) {\n payload = responseBody;\n }\n else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) {\n payload = new Date(responseBody);\n }\n else if (mapperType.match(/^UnixTime$/i) !== null) {\n payload = unixTimeToDate(responseBody);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = decodeString(responseBody);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = base64UrlToByteArray(responseBody);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions);\n }\n }\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n return payload;\n }\n}\nfunction trimEnd(str, ch) {\n let len = str.length;\n while (len - 1 >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\nfunction bufferToBase64Url(buffer) {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\nfunction base64UrlToByteArray(str) {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Base64 to Uint8Array.\n return decodeString(str);\n}\nfunction splitSerializeName(prop) {\n const classes = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n }\n else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n return classes;\n}\nfunction dateToUnixTime(d) {\n if (!d) {\n return undefined;\n }\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d);\n }\n return Math.floor(d.getTime() / 1000);\n}\nfunction unixTimeToDate(n) {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\nfunction serializeBasicTypes(typeName, objectName, value) {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/i) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n }\n else if (typeName.match(/^String$/i) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n }\n else if (typeName.match(/^Uuid$/i) !== null) {\n if (!(typeof value.valueOf() === \"string\" && isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n }\n else if (typeName.match(/^Boolean$/i) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n }\n else if (typeName.match(/^Stream$/i) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !((typeof Blob === \"function\" || typeof Blob === \"object\") && value instanceof Blob)) {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`);\n }\n }\n }\n return value;\n}\nfunction serializeEnumType(objectName, allowedValues, value) {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\nfunction serializeByteArrayType(objectName, value) {\n let returnValue = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = encodeByteArray(value);\n }\n return returnValue;\n}\nfunction serializeBase64UrlType(objectName, value) {\n let returnValue = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = bufferToBase64Url(value) || \"\";\n }\n return returnValue;\n}\nfunction serializeDateTypes(typeName, value, objectName) {\n if (value != undefined) {\n if (typeName.match(/^Date$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value =\n value instanceof Date\n ? value.toISOString().substring(0, 10)\n : new Date(value).toISOString().substring(0, 10);\n }\n else if (typeName.match(/^DateTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = value instanceof Date ? value.toISOString() : new Date(value).toISOString();\n }\n else if (typeName.match(/^DateTimeRfc1123$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString();\n }\n else if (typeName.match(/^UnixTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n }\n else if (typeName.match(/^TimeSpan$/i) !== null) {\n if (!isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n }\n }\n return value;\n}\nfunction serializeSequenceType(serializer, mapper, object, objectName, isXml, options) {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n const serializedValue = serializer.serialize(elementType, object[i], objectName, options);\n if (isXml && elementType.xmlNamespace) {\n const xmlnsKey = elementType.xmlNamespacePrefix\n ? `xmlns:${elementType.xmlNamespacePrefix}`\n : \"xmlns\";\n if (elementType.type.name === \"Composite\") {\n tempArray[i] = Object.assign({}, serializedValue);\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n else {\n tempArray[i] = {};\n tempArray[i][options.xmlCharKey] = serializedValue;\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n }\n else {\n tempArray[i] = serializedValue;\n }\n }\n return tempArray;\n}\nfunction serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary = {};\n for (const key of Object.keys(object)) {\n const serializedValue = serializer.serialize(valueType, object[key], objectName, options);\n // If the element needs an XML namespace we need to add it within the $ property\n tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options);\n }\n // Add the namespace to the root element if needed\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : \"xmlns\";\n const result = tempDictionary;\n result[XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace };\n return result;\n }\n return tempDictionary;\n}\n/**\n * Resolves the additionalProperties property from a referenced mapper.\n * @param serializer - The serializer containing the entire set of mappers.\n * @param mapper - The composite mapper to resolve.\n * @param objectName - Name of the object being serialized.\n */\nfunction resolveAdditionalProperties(serializer, mapper, objectName) {\n const additionalProperties = mapper.type.additionalProperties;\n if (!additionalProperties && mapper.type.className) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties;\n }\n return additionalProperties;\n}\n/**\n * Finds the mapper referenced by `className`.\n * @param serializer - The serializer containing the entire set of mappers\n * @param mapper - The composite mapper to resolve\n * @param objectName - Name of the object being serialized\n */\nfunction resolveReferencedMapper(serializer, mapper, objectName) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n return serializer.modelMappers[className];\n}\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer - The serializer containing the entire set of mappers\n * @param mapper - The composite mapper to resolve\n */\nfunction resolveModelProperties(serializer, mapper, objectName) {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${mapper.type.className}\".`);\n }\n modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${mapper.type.className}\" for object \"${objectName}\".`);\n }\n }\n return modelProps;\n}\nfunction serializeCompositeType(serializer, mapper, object, objectName, isXml, options) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n if (object != undefined) {\n const payload = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n let propName;\n let parentObject = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n }\n else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n }\n else {\n const paths = splitSerializeName(propertyMapper.serializedName);\n propName = paths.pop();\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if (childObject == undefined &&\n (object[key] != undefined || propertyMapper.defaultValue !== undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n if (parentObject != undefined) {\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix\n ? `xmlns:${mapper.xmlNamespacePrefix}`\n : \"xmlns\";\n parentObject[XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace });\n }\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator &&\n polymorphicDiscriminator.clientName === key &&\n toSerialize == undefined) {\n toSerialize = mapper.serializedName;\n }\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options);\n if (serializedValue !== undefined && propName != undefined) {\n const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options);\n if (isXml && propertyMapper.xmlIsAttribute) {\n // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {};\n parentObject[XML_ATTRKEY][propName] = serializedValue;\n }\n else if (isXml && propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName]: value };\n }\n else {\n parentObject[propName] = value;\n }\n }\n }\n }\n const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName);\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]', options);\n }\n }\n }\n return payload;\n }\n return object;\n}\nfunction getXmlObjectValue(propertyMapper, serializedValue, isXml, options) {\n if (!isXml || !propertyMapper.xmlNamespace) {\n return serializedValue;\n }\n const xmlnsKey = propertyMapper.xmlNamespacePrefix\n ? `xmlns:${propertyMapper.xmlNamespacePrefix}`\n : \"xmlns\";\n const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace };\n if ([\"Composite\"].includes(propertyMapper.type.name)) {\n if (serializedValue[XML_ATTRKEY]) {\n return serializedValue;\n }\n else {\n const result = Object.assign({}, serializedValue);\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n }\n }\n const result = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n}\nfunction isSpecialXmlProperty(propertyName, options) {\n return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName);\n}\nfunction deserializeCompositeType(serializer, mapper, responseBody, objectName, options) {\n var _a, _b;\n const xmlCharKey = (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance = {};\n const handledPropertyNames = [];\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n const headerCollectionPrefix = propertyMapper.headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options);\n }\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n }\n else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options);\n }\n else if (propertyMapper.xmlIsMsText) {\n if (responseBody[xmlCharKey] !== undefined) {\n instance[key] = responseBody[xmlCharKey];\n }\n else if (typeof responseBody === \"string\") {\n // The special case where xml parser parses \"content\" into JSON of\n // `{ name: \"content\"}` instead of `{ name: { \"_\": \"content\" }}`\n instance[key] = responseBody;\n }\n }\n else {\n const propertyName = xmlElementName || xmlName || serializedName;\n if (propertyMapper.xmlIsWrapped) {\n /* a list of wrapped by \n For the xml example below\n \n ...\n ...\n \n the responseBody has\n {\n Cors: {\n CorsRule: [{...}, {...}]\n }\n }\n xmlName is \"Cors\" and xmlElementName is\"CorsRule\".\n */\n const wrapped = responseBody[xmlName];\n const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : [];\n instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options);\n handledPropertyNames.push(xmlName);\n }\n else {\n const property = responseBody[propertyName];\n instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options);\n handledPropertyNames.push(propertyName);\n }\n }\n }\n else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res)\n break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator &&\n key === polymorphicDiscriminator.clientName &&\n propertyInstance == undefined) {\n propertyInstance = mapper.serializedName;\n }\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n // Copy over any properties that have already been added into the instance, where they do\n // not exist on the newly de-serialized array\n for (const [k, v] of Object.entries(instance)) {\n if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) {\n arrayInstance[k] = v;\n }\n }\n instance = arrayInstance;\n }\n else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n instance[key] = serializedValue;\n }\n }\n }\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]', options);\n }\n }\n }\n else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined &&\n !handledPropertyNames.includes(key) &&\n !isSpecialXmlProperty(key, options)) {\n instance[key] = responseBody[key];\n }\n }\n }\n return instance;\n}\nfunction deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) {\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options);\n }\n return tempDictionary;\n }\n return responseBody;\n}\nfunction deserializeSequenceType(serializer, mapper, responseBody, objectName, options) {\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options);\n }\n return tempArray;\n }\n return responseBody;\n}\nfunction getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator = discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\nfunction getPolymorphicDiscriminatorRecursively(serializer, mapper) {\n return (mapper.type.polymorphicDiscriminator ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.className));\n}\nfunction getPolymorphicDiscriminatorSafely(serializer, typeName) {\n return (typeName &&\n serializer.modelMappers[typeName] &&\n serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n/**\n * Utility function that serializes an object that might contain binary information into a plain object, array or a string.\n */\nfunction serializeObject(toSerialize) {\n const castToSerialize = toSerialize;\n if (toSerialize == undefined)\n return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = encodeByteArray(toSerialize);\n return toSerialize;\n }\n else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n }\n else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n }\n else if (typeof toSerialize === \"object\") {\n const dictionary = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(castToSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o) {\n const result = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n/**\n * String enum containing the string types of property mappers.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nconst MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\",\n]);\n\n// Copyright (c) Microsoft Corporation.\nfunction isWebResourceLike(object) {\n if (object && typeof object === \"object\") {\n const castObject = object;\n if (typeof castObject.url === \"string\" &&\n typeof castObject.method === \"string\" &&\n typeof castObject.headers === \"object\" &&\n isHttpHeadersLike(castObject.headers) &&\n typeof castObject.validateRequestProperties === \"function\" &&\n typeof castObject.prepare === \"function\" &&\n typeof castObject.clone === \"function\") {\n return true;\n }\n }\n return false;\n}\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n */\nclass WebResource {\n constructor(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, decompressResponse, streamResponseStatusCodes) {\n this.streamResponseBody = streamResponseBody;\n this.streamResponseStatusCodes = streamResponseStatusCodes;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers);\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.decompressResponse = decompressResponse;\n this.requestId = this.headers.get(\"x-ms-client-request-id\") || generateUuid();\n }\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties() {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n /**\n * Prepares the request.\n * @param options - Options to provide for preparing the request.\n * @returns Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options) {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n if (options.method === undefined ||\n options.method === null ||\n typeof options.method.valueOf() !== \"string\") {\n throw new Error(\"options.method must be a string.\");\n }\n if (options.url && options.pathTemplate) {\n throw new Error(\"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\");\n }\n if ((options.pathTemplate === undefined ||\n options.pathTemplate === null ||\n typeof options.pathTemplate.valueOf() !== \"string\") &&\n (options.url === undefined ||\n options.url === null ||\n typeof options.url.valueOf() !== \"string\")) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error('options.url must be of type \"string\".');\n }\n this.url = options.url;\n }\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error('The provided method \"' +\n options.method +\n '\" is invalid. Supported HTTP methods are: ' +\n JSON.stringify(validMethods));\n }\n }\n this.method = options.method.toUpperCase();\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error('options.pathTemplate must be of type \"string\".');\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url = baseUrl +\n (baseUrl.endsWith(\"/\") ? \"\" : \"/\") +\n (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({[\\w-]*\\s*[\\w-]*})/gi);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`);\n }\n segments.forEach(function (item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = pathParameters[pathParamName];\n if (pathParam === null ||\n pathParam === undefined ||\n !(typeof pathParam === \"string\" || typeof pathParam === \"object\")) {\n const stringifiedPathParameters = JSON.stringify(pathParameters, undefined, 2);\n throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in parameters: ${stringifiedPathParameters}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`);\n }\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(`options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n }\n else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`);\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n }\n else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(`options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n }\n else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n } // end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", this.requestId);\n }\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicitly\n this.body = options.body;\n if (options.body !== undefined && options.body !== null) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n }\n else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, \"requestBody\");\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n if (options.spanOptions) {\n this.spanOptions = options.spanOptions;\n }\n if (options.tracingContext) {\n this.tracingContext = options.tracingContext;\n }\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n return this;\n }\n /**\n * Clone this WebResource HTTP request object.\n * @returns The clone of this WebResource HTTP request object.\n */\n clone() {\n const result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.decompressResponse, this.streamResponseStatusCodes);\n if (this.formData) {\n result.formData = this.formData;\n }\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n return result;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nclass URLQuery {\n constructor() {\n this._rawQuery = {};\n }\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n any() {\n return Object.keys(this._rawQuery).length > 0;\n }\n /**\n * Get the keys of the query string.\n */\n keys() {\n return Object.keys(this._rawQuery);\n }\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n set(parameterName, parameterValue) {\n const caseParameterValue = parameterValue;\n if (parameterName) {\n if (caseParameterValue !== undefined && caseParameterValue !== null) {\n const newValue = Array.isArray(caseParameterValue)\n ? caseParameterValue\n : caseParameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n }\n else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n get(parameterName) {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n toString() {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n }\n else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n /**\n * Parse a URLQuery from the provided text.\n */\n static parse(text) {\n const result = new URLQuery();\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n let currentState = \"ParameterName\";\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n return result;\n }\n}\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nclass URLBuilder {\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n setScheme(scheme) {\n if (!scheme) {\n this._scheme = undefined;\n }\n else {\n this.set(scheme, \"SCHEME\");\n }\n }\n /**\n * Get the scheme that has been set in this URL.\n */\n getScheme() {\n return this._scheme;\n }\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n setHost(host) {\n if (!host) {\n this._host = undefined;\n }\n else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n /**\n * Get the host that has been set in this URL.\n */\n getHost() {\n return this._host;\n }\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n setPort(port) {\n if (port === undefined || port === null || port === \"\") {\n this._port = undefined;\n }\n else {\n this.set(port.toString(), \"PORT\");\n }\n }\n /**\n * Get the port that has been set in this URL.\n */\n getPort() {\n return this._port;\n }\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n setPath(path) {\n if (!path) {\n this._path = undefined;\n }\n else {\n const schemeIndex = path.indexOf(\"://\");\n if (schemeIndex !== -1) {\n const schemeStart = path.lastIndexOf(\"/\", schemeIndex);\n // Make sure to only grab the URL part of the path before setting the state back to SCHEME\n // this will handle cases such as \"/a/b/c/https://microsoft.com\" => \"https://microsoft.com\"\n this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), \"SCHEME\");\n }\n else {\n this.set(path, \"PATH\");\n }\n }\n }\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n appendPath(path) {\n if (path) {\n let currentPath = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n /**\n * Get the path that has been set in this URL.\n */\n getPath() {\n return this._path;\n }\n /**\n * Set the query in this URL.\n */\n setQuery(query) {\n if (!query) {\n this._query = undefined;\n }\n else {\n this._query = URLQuery.parse(query);\n }\n }\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n setQueryParameter(queryParameterName, queryParameterValue) {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n getQueryParameterValue(queryParameterName) {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n /**\n * Get the query in this URL.\n */\n getQuery() {\n return this._query ? this._query.toString() : undefined;\n }\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n set(text, startState) {\n const tokenizer = new URLTokenizer(text, startState);\n while (tokenizer.next()) {\n const token = tokenizer.current();\n let tokenPath;\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n case \"PATH\":\n tokenPath = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n /**\n * Serializes the URL as a string.\n * @returns the URL as a string.\n */\n toString() {\n let result = \"\";\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n if (this._host) {\n result += this._host;\n }\n if (this._port) {\n result += `:${this._port}`;\n }\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n return result;\n }\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n replaceAll(searchValue, replaceValue) {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n /**\n * Parses a given string URL into a new {@link URLBuilder}.\n */\n static parse(text) {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\nclass URLToken {\n constructor(text, type) {\n this.text = text;\n this.type = type;\n }\n static scheme(text) {\n return new URLToken(text, \"SCHEME\");\n }\n static host(text) {\n return new URLToken(text, \"HOST\");\n }\n static port(text) {\n return new URLToken(text, \"PORT\");\n }\n static path(text) {\n return new URLToken(text, \"PATH\");\n }\n static query(text) {\n return new URLToken(text, \"QUERY\");\n }\n}\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nfunction isAlphaNumericCharacter(character) {\n const characterCode = character.charCodeAt(0);\n return ((48 /* '0' */ <= characterCode && characterCode <= 57) /* '9' */ ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90) /* 'Z' */ ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122) /* 'z' */);\n}\n/**\n * A class that tokenizes URL strings.\n */\nclass URLTokenizer {\n constructor(_text, state) {\n this._text = _text;\n this._textLength = _text ? _text.length : 0;\n this._currentState = state !== undefined && state !== null ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n current() {\n return this._currentToken;\n }\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n next() {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n }\n else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n case \"HOST\":\n nextHost(this);\n break;\n case \"PORT\":\n nextPort(this);\n break;\n case \"PATH\":\n nextPath(this);\n break;\n case \"QUERY\":\n nextQuery(this);\n break;\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer) {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer) {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer) {\n return tokenizer._text[tokenizer._currentIndex];\n}\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer, step) {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer, charactersToPeek) {\n let endIndex = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer, condition) {\n let result = \"\";\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n }\n else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n return result;\n}\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer) {\n return readWhile(tokenizer, (character) => isAlphaNumericCharacter(character));\n}\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer, ...terminatingCharacters) {\n return readWhile(tokenizer, (character) => terminatingCharacters.indexOf(character) === -1);\n}\nfunction nextScheme(tokenizer) {\n const scheme = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else {\n tokenizer._currentState = \"HOST\";\n }\n}\nfunction nextSchemeOrHost(tokenizer) {\n const schemeOrHost = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n }\n else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n }\n else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\nfunction nextHost(tokenizer) {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n const host = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n }\n else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextPort(tokenizer) {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n const port = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextPath(tokenizer) {\n const path = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextQuery(tokenizer) {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n const query = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction createProxyAgent(requestUrl, proxySettings, headers) {\n const host = URLBuilder.parse(proxySettings.host).getHost();\n if (!host) {\n throw new Error(\"Expecting a non-empty host in proxy settings.\");\n }\n if (!isValidPort(proxySettings.port)) {\n throw new Error(\"Expecting a valid port number in the range of [0, 65535] in proxy settings.\");\n }\n const tunnelOptions = {\n proxy: {\n host: host,\n port: proxySettings.port,\n headers: (headers && headers.rawHeaders()) || {},\n },\n };\n if (proxySettings.username && proxySettings.password) {\n tunnelOptions.proxy.proxyAuth = `${proxySettings.username}:${proxySettings.password}`;\n }\n else if (proxySettings.username) {\n tunnelOptions.proxy.proxyAuth = `${proxySettings.username}`;\n }\n const isRequestHttps = isUrlHttps(requestUrl);\n const isProxyHttps = isUrlHttps(proxySettings.host);\n const proxyAgent = {\n isHttps: isRequestHttps,\n agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions),\n };\n return proxyAgent;\n}\nfunction isUrlHttps(url) {\n const urlScheme = URLBuilder.parse(url).getScheme() || \"\";\n return urlScheme.toLowerCase() === \"https\";\n}\nfunction createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) {\n if (isRequestHttps && isProxyHttps) {\n return tunnel__namespace.httpsOverHttps(tunnelOptions);\n }\n else if (isRequestHttps && !isProxyHttps) {\n return tunnel__namespace.httpsOverHttp(tunnelOptions);\n }\n else if (!isRequestHttps && isProxyHttps) {\n return tunnel__namespace.httpOverHttps(tunnelOptions);\n }\n else {\n return tunnel__namespace.httpOverHttp(tunnelOptions);\n }\n}\nfunction isValidPort(port) {\n // any port in 0-65535 range is valid (RFC 793) even though almost all implementations\n // will reserve 0 for a specific purpose, and a range of numbers for ephemeral ports\n return 0 <= port && port <= 65535;\n}\n\n// Copyright (c) Microsoft Corporation.\nconst RedactedString = \"REDACTED\";\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\nconst defaultAllowedQueryParameters = [\"api-version\"];\nclass Sanitizer {\n constructor({ allowedHeaderNames = [], allowedQueryParameters = [] } = {}) {\n allowedHeaderNames = Array.isArray(allowedHeaderNames)\n ? defaultAllowedHeaderNames.concat(allowedHeaderNames)\n : defaultAllowedHeaderNames;\n allowedQueryParameters = Array.isArray(allowedQueryParameters)\n ? defaultAllowedQueryParameters.concat(allowedQueryParameters)\n : defaultAllowedQueryParameters;\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n sanitize(obj) {\n const seen = new Set();\n return JSON.stringify(obj, (key, value) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return Object.assign(Object.assign({}, value), { name: value.name, message: value.message });\n }\n if (key === \"_headersMap\") {\n return this.sanitizeHeaders(value);\n }\n else if (key === \"url\") {\n return this.sanitizeUrl(value);\n }\n else if (key === \"query\") {\n return this.sanitizeQuery(value);\n }\n else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n }\n else if (key === \"response\") {\n // Don't log response again\n return undefined;\n }\n else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n }\n else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n }, 2);\n }\n sanitizeHeaders(value) {\n return this.sanitizeObject(value, this.allowedHeaderNames, (v, k) => v[k].value);\n }\n sanitizeQuery(value) {\n return this.sanitizeObject(value, this.allowedQueryParameters, (v, k) => v[k]);\n }\n sanitizeObject(value, allowedKeys, accessor) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n const sanitized = {};\n for (const k of Object.keys(value)) {\n if (allowedKeys.has(k.toLowerCase())) {\n sanitized[k] = accessor(value, k);\n }\n else {\n sanitized[k] = RedactedString;\n }\n }\n return sanitized;\n }\n sanitizeUrl(value) {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n const urlBuilder = URLBuilder.parse(value);\n const queryString = urlBuilder.getQuery();\n if (!queryString) {\n return value;\n }\n const query = URLQuery.parse(queryString);\n for (const k of query.keys()) {\n if (!this.allowedQueryParameters.has(k.toLowerCase())) {\n query.set(k, RedactedString);\n }\n }\n urlBuilder.setQuery(query.toString());\n return urlBuilder.toString();\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst custom = util.inspect.custom;\n\n// Copyright (c) Microsoft Corporation.\nconst errorSanitizer = new Sanitizer();\n/**\n * An error resulting from an HTTP request to a service endpoint.\n */\nclass RestError extends Error {\n constructor(message, code, statusCode, request, response) {\n super(message);\n this.name = \"RestError\";\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n Object.setPrototypeOf(this, RestError.prototype);\n }\n /**\n * Logging method for util.inspect in Node\n */\n [custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n/**\n * A constant string to identify errors that may arise when making an HTTP request that indicates an issue with the transport layer (e.g. the hostname of the URL cannot be resolved via DNS.)\n */\nRestError.REQUEST_SEND_ERROR = \"REQUEST_SEND_ERROR\";\n/**\n * A constant string to identify errors that may arise from parsing an incoming HTTP response. Usually indicates a malformed HTTP body, such as an encoded JSON payload that is incomplete.\n */\nRestError.PARSE_ERROR = \"PARSE_ERROR\";\n\n// Copyright (c) Microsoft Corporation.\nconst logger = logger$1.createClientLogger(\"core-http\");\n\n// Copyright (c) Microsoft Corporation.\nfunction getCachedAgent(isHttps, agentCache) {\n return isHttps ? agentCache.httpsAgent : agentCache.httpAgent;\n}\nclass ReportTransform extends stream.Transform {\n constructor(progressCallback) {\n super();\n this.progressCallback = progressCallback;\n this.loadedBytes = 0;\n }\n _transform(chunk, _encoding, callback) {\n this.push(chunk);\n this.loadedBytes += chunk.length;\n this.progressCallback({ loadedBytes: this.loadedBytes });\n callback(undefined);\n }\n}\nfunction isReadableStream(body) {\n return body && typeof body.pipe === \"function\";\n}\nfunction isStreamComplete(stream, aborter) {\n return new Promise((resolve) => {\n stream.once(\"close\", () => {\n aborter === null || aborter === void 0 ? void 0 : aborter.abort();\n resolve();\n });\n stream.once(\"end\", resolve);\n stream.once(\"error\", resolve);\n });\n}\n/**\n * Transforms a set of headers into the key/value pair defined by {@link HttpHeadersLike}\n */\nfunction parseHeaders(headers) {\n const httpHeaders = new HttpHeaders();\n headers.forEach((value, key) => {\n httpHeaders.set(key, value);\n });\n return httpHeaders;\n}\n/**\n * An HTTP client that uses `node-fetch`.\n */\nclass NodeFetchHttpClient {\n constructor() {\n // a mapping of proxy settings string `${host}:${port}:${username}:${password}` to agent\n this.proxyAgentMap = new Map();\n this.keepAliveAgents = {};\n }\n /**\n * Provides minimum viable error handling and the logic that executes the abstract methods.\n * @param httpRequest - Object representing the outgoing HTTP request.\n * @returns An object representing the incoming HTTP response.\n */\n async sendRequest(httpRequest) {\n var _a;\n if (!httpRequest && typeof httpRequest !== \"object\") {\n throw new Error(\"'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.\");\n }\n const abortController$1 = new abortController.AbortController();\n let abortListener;\n if (httpRequest.abortSignal) {\n if (httpRequest.abortSignal.aborted) {\n throw new abortController.AbortError(\"The operation was aborted.\");\n }\n abortListener = (event) => {\n if (event.type === \"abort\") {\n abortController$1.abort();\n }\n };\n httpRequest.abortSignal.addEventListener(\"abort\", abortListener);\n }\n if (httpRequest.timeout) {\n setTimeout(() => {\n abortController$1.abort();\n }, httpRequest.timeout);\n }\n if (httpRequest.formData) {\n const formData = httpRequest.formData;\n const requestForm = new FormData__default[\"default\"]();\n const appendFormValue = (key, value) => {\n // value function probably returns a stream so we can provide a fresh stream on each retry\n if (typeof value === \"function\") {\n value = value();\n }\n if (value &&\n Object.prototype.hasOwnProperty.call(value, \"value\") &&\n Object.prototype.hasOwnProperty.call(value, \"options\")) {\n requestForm.append(key, value.value, value.options);\n }\n else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n }\n else {\n appendFormValue(formKey, formValue);\n }\n }\n httpRequest.body = requestForm;\n httpRequest.formData = undefined;\n const contentType = httpRequest.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n if (typeof requestForm.getBoundary === \"function\") {\n httpRequest.headers.set(\"Content-Type\", `multipart/form-data; boundary=${requestForm.getBoundary()}`);\n }\n else {\n // browser will automatically apply a suitable content-type header\n httpRequest.headers.remove(\"Content-Type\");\n }\n }\n }\n let body = httpRequest.body\n ? typeof httpRequest.body === \"function\"\n ? httpRequest.body()\n : httpRequest.body\n : undefined;\n if (httpRequest.onUploadProgress && httpRequest.body) {\n const onUploadProgress = httpRequest.onUploadProgress;\n const uploadReportStream = new ReportTransform(onUploadProgress);\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n }\n else {\n uploadReportStream.end(body);\n }\n body = uploadReportStream;\n }\n const platformSpecificRequestInit = await this.prepareRequest(httpRequest);\n const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, \n // the types for RequestInit are from the browser, which expects AbortSignal to\n // have `reason` and `throwIfAborted`, but these don't exist on our polyfill\n // for Node.\n signal: abortController$1.signal, redirect: \"manual\" }, platformSpecificRequestInit);\n let operationResponse;\n try {\n const response = await this.fetch(httpRequest.url, requestInit);\n const headers = parseHeaders(response.headers);\n const streaming = ((_a = httpRequest.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(response.status)) ||\n httpRequest.streamResponseBody;\n operationResponse = {\n headers: headers,\n request: httpRequest,\n status: response.status,\n readableStreamBody: streaming\n ? response.body\n : undefined,\n bodyAsText: !streaming ? await response.text() : undefined,\n };\n const onDownloadProgress = httpRequest.onDownloadProgress;\n if (onDownloadProgress) {\n const responseBody = response.body || undefined;\n if (isReadableStream(responseBody)) {\n const downloadReportStream = new ReportTransform(onDownloadProgress);\n responseBody.pipe(downloadReportStream);\n operationResponse.readableStreamBody = downloadReportStream;\n }\n else {\n const length = parseInt(headers.get(\"Content-Length\")) || undefined;\n if (length) {\n // Calling callback for non-stream response for consistency with browser\n onDownloadProgress({ loadedBytes: length });\n }\n }\n }\n await this.processRequest(operationResponse);\n return operationResponse;\n }\n catch (error) {\n const fetchError = error;\n if (fetchError.code === \"ENOTFOUND\") {\n throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest);\n }\n else if (fetchError.type === \"aborted\") {\n throw new abortController.AbortError(\"The operation was aborted.\");\n }\n throw fetchError;\n }\n finally {\n // clean up event listener\n if (httpRequest.abortSignal && abortListener) {\n let uploadStreamDone = Promise.resolve();\n if (isReadableStream(body)) {\n uploadStreamDone = isStreamComplete(body);\n }\n let downloadStreamDone = Promise.resolve();\n if (isReadableStream(operationResponse === null || operationResponse === void 0 ? void 0 : operationResponse.readableStreamBody)) {\n downloadStreamDone = isStreamComplete(operationResponse.readableStreamBody, abortController$1);\n }\n Promise.all([uploadStreamDone, downloadStreamDone])\n .then(() => {\n var _a;\n (_a = httpRequest.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", abortListener);\n return;\n })\n .catch((e) => {\n logger.warning(\"Error when cleaning up abortListener on httpRequest\", e);\n });\n }\n }\n }\n getOrCreateAgent(httpRequest) {\n var _a;\n const isHttps = isUrlHttps(httpRequest.url);\n // At the moment, proxy settings and keepAlive are mutually\n // exclusive because the 'tunnel' library currently lacks the\n // ability to create a proxy with keepAlive turned on.\n if (httpRequest.proxySettings) {\n const { host, port, username, password } = httpRequest.proxySettings;\n const key = `${host}:${port}:${username}:${password}`;\n const proxyAgents = (_a = this.proxyAgentMap.get(key)) !== null && _a !== void 0 ? _a : {};\n let agent = getCachedAgent(isHttps, proxyAgents);\n if (agent) {\n return agent;\n }\n const tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);\n agent = tunnel.agent;\n if (tunnel.isHttps) {\n proxyAgents.httpsAgent = tunnel.agent;\n }\n else {\n proxyAgents.httpAgent = tunnel.agent;\n }\n this.proxyAgentMap.set(key, proxyAgents);\n return agent;\n }\n else if (httpRequest.keepAlive) {\n let agent = getCachedAgent(isHttps, this.keepAliveAgents);\n if (agent) {\n return agent;\n }\n const agentOptions = {\n keepAlive: httpRequest.keepAlive,\n };\n if (isHttps) {\n agent = this.keepAliveAgents.httpsAgent = new https__namespace.Agent(agentOptions);\n }\n else {\n agent = this.keepAliveAgents.httpAgent = new http__namespace.Agent(agentOptions);\n }\n return agent;\n }\n else {\n return isHttps ? https__namespace.globalAgent : http__namespace.globalAgent;\n }\n }\n /**\n * Uses `node-fetch` to perform the request.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs\n async fetch(input, init) {\n return node_fetch__default[\"default\"](input, init);\n }\n /**\n * Prepares a request based on the provided web resource.\n */\n async prepareRequest(httpRequest) {\n const requestInit = {};\n // Set the http(s) agent\n requestInit.agent = this.getOrCreateAgent(httpRequest);\n requestInit.compress = httpRequest.decompressResponse;\n return requestInit;\n }\n /**\n * Process an HTTP response.\n */\n async processRequest(_operationResponse) {\n /* no_op */\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexports.HttpPipelineLogLevel = void 0;\n(function (HttpPipelineLogLevel) {\n /**\n * A log level that indicates that no logs will be logged.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"OFF\"] = 0] = \"OFF\";\n /**\n * An error log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"ERROR\"] = 1] = \"ERROR\";\n /**\n * A warning log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"WARNING\"] = 2] = \"WARNING\";\n /**\n * An information log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"INFO\"] = 3] = \"INFO\";\n})(exports.HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = {}));\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Converts an OperationOptions to a RequestOptionsBase\n *\n * @param opts - OperationOptions object to convert to RequestOptionsBase\n */\nfunction operationOptionsToRequestOptionsBase(opts) {\n const { requestOptions, tracingOptions } = opts, additionalOptions = tslib.__rest(opts, [\"requestOptions\", \"tracingOptions\"]);\n let result = additionalOptions;\n if (requestOptions) {\n result = Object.assign(Object.assign({}, result), requestOptions);\n }\n if (tracingOptions) {\n result.tracingContext = tracingOptions.tracingContext;\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n result.spanOptions = tracingOptions === null || tracingOptions === void 0 ? void 0 : tracingOptions.spanOptions;\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The base class from which all request policies derive.\n */\nclass BaseRequestPolicy {\n /**\n * The main method to implement that manipulates a request/response.\n */\n constructor(\n /**\n * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.\n */\n _nextPolicy, \n /**\n * The options that can be passed to a given request policy.\n */\n _options) {\n this._nextPolicy = _nextPolicy;\n this._options = _options;\n }\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel - The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel) {\n return this._options.shouldLog(logLevel);\n }\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel - The log level of this log.\n * @param message - The message of this log.\n */\n log(logLevel, message) {\n this._options.log(logLevel, message);\n }\n}\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nclass RequestPolicyOptions {\n constructor(_logger) {\n this._logger = _logger;\n }\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel - The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel) {\n return (!!this._logger &&\n logLevel !== exports.HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel);\n }\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel - The log level of this log.\n * @param message - The message of this log.\n */\n log(logLevel, message) {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Note: The reason we re-define all of the xml2js default settings (version 2.0) here is because the default settings object exposed\n// by the xm2js library is mutable. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/536\n// By creating a new copy of the settings each time we instantiate the parser,\n// we are safeguarding against the possibility of the default settings being mutated elsewhere unintentionally.\nconst xml2jsDefaultOptionsV2 = {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: XML_ATTRKEY,\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: undefined,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: \"$$\",\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: undefined,\n attrValueProcessors: undefined,\n tagNameProcessors: undefined,\n valueProcessors: undefined,\n rootName: \"root\",\n xmldec: {\n version: \"1.0\",\n encoding: \"UTF-8\",\n standalone: true,\n },\n doctype: undefined,\n renderOpts: {\n pretty: true,\n indent: \" \",\n newline: \"\\n\",\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: \"\",\n cdata: false,\n};\n// The xml2js settings for general XML parsing operations.\nconst xml2jsParserSettings = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsParserSettings.explicitArray = false;\n// The xml2js settings for general XML building operations.\nconst xml2jsBuilderSettings = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsBuilderSettings.explicitArray = false;\nxml2jsBuilderSettings.renderOpts = {\n pretty: false,\n};\n/**\n * Converts given JSON object to XML string\n * @param obj - JSON object to be converted into XML string\n * @param opts - Options that govern the parsing of given JSON object\n */\nfunction stringifyXML(obj, opts = {}) {\n var _a;\n xml2jsBuilderSettings.rootName = opts.rootName;\n xml2jsBuilderSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n const builder = new xml2js__namespace.Builder(xml2jsBuilderSettings);\n return builder.buildObject(obj);\n}\n/**\n * Converts given XML string into JSON\n * @param str - String containing the XML content to be parsed into JSON\n * @param opts - Options that govern the parsing of given xml string\n */\nfunction parseXML(str, opts = {}) {\n var _a;\n xml2jsParserSettings.explicitRoot = !!opts.includeRoot;\n xml2jsParserSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n const xmlParser = new xml2js__namespace.Parser(xml2jsParserSettings);\n return new Promise((resolve, reject) => {\n if (!str) {\n reject(new Error(\"Document is empty\"));\n }\n else {\n xmlParser.parseString(str, (err, res) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res);\n }\n });\n }\n });\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nfunction deserializationPolicy(deserializationContentTypes, parsingOptions) {\n return {\n create: (nextPolicy, options) => {\n return new DeserializationPolicy(nextPolicy, options, deserializationContentTypes, parsingOptions);\n },\n };\n}\nconst defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nconst defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\nconst DefaultDeserializationOptions = {\n expectedContentTypes: {\n json: defaultJsonContentTypes,\n xml: defaultXmlContentTypes,\n },\n};\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nclass DeserializationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, requestPolicyOptions, deserializationContentTypes, parsingOptions = {}) {\n var _a;\n super(nextPolicy, requestPolicyOptions);\n this.jsonContentTypes =\n (deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes;\n this.xmlContentTypes =\n (deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes;\n this.xmlCharKey = (_a = parsingOptions.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n }\n async sendRequest(request) {\n return this._nextPolicy.sendRequest(request).then((response) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response, {\n xmlCharKey: this.xmlCharKey,\n }));\n }\n}\nfunction getOperationResponse(parsedResponse) {\n let result;\n const request = parsedResponse.request;\n const operationSpec = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n }\n else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\nfunction shouldDeserializeResponse(parsedResponse) {\n const shouldDeserialize = parsedResponse.request.shouldDeserialize;\n let result;\n if (shouldDeserialize === undefined) {\n result = true;\n }\n else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n }\n else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n/**\n * Given a particular set of content types to parse as either JSON or XML, consumes the HTTP response to produce the result object defined by the request's {@link OperationSpec}.\n * @param jsonContentTypes - Response content types to parse the body as JSON.\n * @param xmlContentTypes - Response content types to parse the body as XML.\n * @param response - HTTP Response from the pipeline.\n * @param options - Options to the serializer, mostly for configuring the XML parser if needed.\n * @returns A parsed {@link HttpOperationResponse} object that can be returned by the {@link ServiceClient}.\n */\nfunction deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n return parse(jsonContentTypes, xmlContentTypes, response, updatedOptions).then((parsedResponse) => {\n if (!shouldDeserializeResponse(parsedResponse)) {\n return parsedResponse;\n }\n const operationSpec = parsedResponse.request.operationSpec;\n if (!operationSpec || !operationSpec.responses) {\n return parsedResponse;\n }\n const responseSpec = getOperationResponse(parsedResponse);\n const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec);\n if (error) {\n throw error;\n }\n else if (shouldReturnResponse) {\n return parsedResponse;\n }\n // An operation response spec does exist for current status code, so\n // use it to deserialize the response.\n if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof valueToDeserialize === \"object\"\n ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName]\n : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\", options);\n }\n catch (innerError) {\n const restError = new RestError(`Error ${innerError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, undefined, parsedResponse.status, parsedResponse.request, parsedResponse);\n throw restError;\n }\n }\n else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJson(), \"operationRes.parsedHeaders\", options);\n }\n }\n return parsedResponse;\n });\n}\nfunction isOperationSpecEmpty(operationSpec) {\n const expectedStatusCodes = Object.keys(operationSpec.responses);\n return (expectedStatusCodes.length === 0 ||\n (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n}\nfunction handleErrorResponse(parsedResponse, operationSpec, responseSpec) {\n var _a;\n const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300;\n const isExpectedStatusCode = isOperationSpecEmpty(operationSpec)\n ? isSuccessByStatus\n : !!responseSpec;\n if (isExpectedStatusCode) {\n if (responseSpec) {\n if (!responseSpec.isError) {\n return { error: null, shouldReturnResponse: false };\n }\n }\n else {\n return { error: null, shouldReturnResponse: false };\n }\n }\n const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default;\n const streaming = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ||\n parsedResponse.request.streamResponseBody;\n const initialErrorMessage = streaming\n ? `Unexpected status code: ${parsedResponse.status}`\n : parsedResponse.bodyAsText;\n const error = new RestError(initialErrorMessage, undefined, parsedResponse.status, parsedResponse.request, parsedResponse);\n // If the item failed but there's no error spec or default spec to deserialize the error,\n // we should fail so we just throw the parsed response\n if (!errorResponseSpec) {\n throw error;\n }\n const defaultBodyMapper = errorResponseSpec.bodyMapper;\n const defaultHeadersMapper = errorResponseSpec.headersMapper;\n try {\n // If error response has a body, try to deserialize it using default body mapper.\n // Then try to extract error code & message from it\n if (parsedResponse.parsedBody) {\n const parsedBody = parsedResponse.parsedBody;\n let parsedError;\n if (defaultBodyMapper) {\n let valueToDeserialize = parsedBody;\n if (operationSpec.isXML && defaultBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof parsedBody === \"object\" ? parsedBody[defaultBodyMapper.xmlElementName] : [];\n }\n parsedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, \"error.response.parsedBody\");\n }\n const internalError = parsedBody.error || parsedError || parsedBody;\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n if (defaultBodyMapper) {\n error.response.parsedBody = parsedError;\n }\n }\n // If error response has headers, try to deserialize it using default header mapper\n if (parsedResponse.headers && defaultHeadersMapper) {\n error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJson(), \"operationRes.parsedHeaders\");\n }\n }\n catch (defaultError) {\n error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`;\n }\n return { error, shouldReturnResponse: false };\n}\nfunction parse(jsonContentTypes, xmlContentTypes, operationResponse, opts) {\n var _a;\n const errorHandler = (err) => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse);\n return Promise.reject(e);\n };\n const streaming = ((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) ||\n operationResponse.request.streamResponseBody;\n if (!streaming && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents = !contentType\n ? []\n : contentType.split(\";\").map((component) => component.toLowerCase());\n if (contentComponents.length === 0 ||\n contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) {\n return new Promise((resolve) => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n }\n else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text, opts)\n .then((body) => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n return Promise.resolve(operationResponse);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * By default, HTTP connections are maintained for future requests.\n */\nconst DefaultKeepAliveOptions = {\n enable: true,\n};\n/**\n * Creates a policy that controls whether HTTP connections are maintained on future requests.\n * @param keepAliveOptions - Keep alive options. By default, HTTP connections are maintained for future requests.\n * @returns An instance of the {@link KeepAlivePolicy}\n */\nfunction keepAlivePolicy(keepAliveOptions) {\n return {\n create: (nextPolicy, options) => {\n return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions);\n },\n };\n}\n/**\n * KeepAlivePolicy is a policy used to control keep alive settings for every request.\n */\nclass KeepAlivePolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n *\n * @param nextPolicy -\n * @param options -\n * @param keepAliveOptions -\n */\n constructor(nextPolicy, options, keepAliveOptions) {\n super(nextPolicy, options);\n this.keepAliveOptions = keepAliveOptions;\n }\n /**\n * Sends out request.\n *\n * @param request -\n * @returns\n */\n async sendRequest(request) {\n request.keepAlive = this.keepAliveOptions.enable;\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\nconst DefaultRedirectOptions = {\n handleRedirects: true,\n maxRetries: 20,\n};\n/**\n * Creates a redirect policy, which sends a repeats the request to a new destination if a response arrives with a \"location\" header, and a status code between 300 and 307.\n * @param maximumRetries - Maximum number of redirects to follow.\n * @returns An instance of the {@link RedirectPolicy}\n */\nfunction redirectPolicy(maximumRetries = 20) {\n return {\n create: (nextPolicy, options) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n },\n };\n}\n/**\n * Resends the request to a new destination if a response arrives with a \"location\" header, and a status code between 300 and 307.\n */\nclass RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, maxRetries = 20) {\n super(nextPolicy, options);\n this.maxRetries = maxRetries;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request)\n .then((response) => handleRedirect(this, response, 0));\n }\n}\nfunction handleRedirect(policy, response, currentRetries) {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)) {\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n delete request.body;\n }\n return policy._nextPolicy\n .sendRequest(request)\n .then((res) => handleRedirect(policy, res, currentRetries + 1));\n }\n return Promise.resolve(response);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst DEFAULT_CLIENT_RETRY_COUNT = 3;\n// intervals are in ms\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nconst DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\nfunction isNumber(n) {\n return typeof n === \"number\";\n}\n/**\n * @internal\n * Determines if the operation should be retried.\n *\n * @param retryLimit - Specifies the max number of retries.\n * @param predicate - Initial chekck on whether to retry based on given responses or errors\n * @param retryData - The retry data.\n * @returns True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(retryLimit, predicate, retryData, response, error) {\n if (!predicate(response, error)) {\n return false;\n }\n return retryData.retryCount < retryLimit;\n}\n/**\n * @internal\n * Updates the retry data for the next attempt.\n *\n * @param retryOptions - specifies retry interval, and its lower bound and upper bound.\n * @param retryData - The retry data.\n * @param err - The operation\"s error, if any.\n */\nfunction updateRetryData(retryOptions, retryData = { retryCount: 0, retryInterval: 0 }, err) {\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n retryData.error = err;\n }\n // Adjust retry count\n retryData.retryCount++;\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount - 1) - 1;\n const boundedRandDelta = retryOptions.retryInterval * 0.8 +\n Math.floor(Math.random() * (retryOptions.retryInterval * 0.4));\n incrementDelta *= boundedRandDelta;\n retryData.retryInterval = Math.min(retryOptions.minRetryInterval + incrementDelta, retryOptions.maxRetryInterval);\n return retryData;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Policy that retries the request as many times as configured for as long as the max retry time interval specified, each retry waiting longer to begin than the last time.\n * @param retryCount - Maximum number of retries.\n * @param retryInterval - Base time between retries.\n * @param maxRetryInterval - Maximum time to wait between retries.\n */\nfunction exponentialRetryPolicy(retryCount, retryInterval, maxRetryInterval) {\n return {\n create: (nextPolicy, options) => {\n return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval);\n },\n };\n}\n/**\n * Describes the Retry Mode type. Currently supporting only Exponential.\n */\nexports.RetryMode = void 0;\n(function (RetryMode) {\n /**\n * Currently supported retry mode.\n * Each time a retry happens, it will take exponentially more time than the last time.\n */\n RetryMode[RetryMode[\"Exponential\"] = 0] = \"Exponential\";\n})(exports.RetryMode || (exports.RetryMode = {}));\nconst DefaultRetryOptions = {\n maxRetries: DEFAULT_CLIENT_RETRY_COUNT,\n retryDelayInMs: DEFAULT_CLIENT_RETRY_INTERVAL,\n maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL,\n};\n/**\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nclass ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * @param nextPolicy - The next RequestPolicy in the pipeline chain.\n * @param options - The options for this RequestPolicy.\n * @param retryCount - The client retry count.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n */\n constructor(nextPolicy, options, retryCount, retryInterval, maxRetryInterval) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => retry$1(this, request, response))\n .catch((error) => retry$1(this, request, error.response, undefined, error));\n }\n}\nasync function retry$1(policy, request, response, retryData, requestError) {\n function shouldPolicyRetry(responseParam) {\n const statusCode = responseParam === null || responseParam === void 0 ? void 0 : responseParam.status;\n if (statusCode === 503 && (response === null || response === void 0 ? void 0 : response.headers.get(Constants.HeaderConstants.RETRY_AFTER))) {\n return false;\n }\n if (statusCode === undefined ||\n (statusCode < 500 && statusCode !== 408) ||\n statusCode === 501 ||\n statusCode === 505) {\n return false;\n }\n return true;\n }\n retryData = updateRetryData({\n retryInterval: policy.retryInterval,\n minRetryInterval: 0,\n maxRetryInterval: policy.maxRetryInterval,\n }, retryData, requestError);\n const isAborted = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response)) {\n logger.info(`Retrying request in ${retryData.retryInterval}`);\n try {\n await coreUtil.delay(retryData.retryInterval);\n const res = await policy._nextPolicy.sendRequest(request.clone());\n return retry$1(policy, request, res, retryData);\n }\n catch (err) {\n return retry$1(policy, request, response, retryData, err);\n }\n }\n else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err = retryData.error ||\n new RestError(\"Failed to send the request.\", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response);\n throw err;\n }\n else {\n return response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that logs information about the outgoing request and the incoming responses.\n * @param loggingOptions - Logging options.\n * @returns An instance of the {@link LogPolicy}\n */\nfunction logPolicy(loggingOptions = {}) {\n return {\n create: (nextPolicy, options) => {\n return new LogPolicy(nextPolicy, options, loggingOptions);\n },\n };\n}\n/**\n * A policy that logs information about the outgoing request and the incoming responses.\n */\nclass LogPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, { logger: logger$1 = logger.info, allowedHeaderNames = [], allowedQueryParameters = [], } = {}) {\n super(nextPolicy, options);\n this.logger = logger$1;\n this.sanitizer = new Sanitizer({ allowedHeaderNames, allowedQueryParameters });\n }\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n get allowedHeaderNames() {\n return this.sanitizer.allowedHeaderNames;\n }\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n set allowedHeaderNames(allowedHeaderNames) {\n this.sanitizer.allowedHeaderNames = allowedHeaderNames;\n }\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n get allowedQueryParameters() {\n return this.sanitizer.allowedQueryParameters;\n }\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n set allowedQueryParameters(allowedQueryParameters) {\n this.sanitizer.allowedQueryParameters = allowedQueryParameters;\n }\n sendRequest(request) {\n if (!this.logger.enabled)\n return this._nextPolicy.sendRequest(request);\n this.logRequest(request);\n return this._nextPolicy.sendRequest(request).then((response) => this.logResponse(response));\n }\n logRequest(request) {\n this.logger(`Request: ${this.sanitizer.sanitize(request)}`);\n }\n logResponse(response) {\n this.logger(`Response status code: ${response.status}`);\n this.logger(`Headers: ${this.sanitizer.sanitize(response.headers)}`);\n return response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter - The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nfunction getPathStringFromParameter(parameter) {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\nfunction getPathStringFromParameterPath(parameterPath, mapper) {\n let result;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n }\n else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n }\n else {\n result = mapper.serializedName;\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Gets the list of status codes for streaming responses.\n * @internal\n */\nfunction getStreamResponseStatusCodes(operationSpec) {\n const result = new Set();\n for (const statusCode in operationSpec.responses) {\n const operationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper &&\n operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result.add(Number(statusCode));\n }\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getDefaultUserAgentKey() {\n return Constants.HeaderConstants.USER_AGENT;\n}\nfunction getPlatformSpecificData() {\n const runtimeInfo = {\n key: \"Node\",\n value: process.version,\n };\n const osInfo = {\n key: \"OS\",\n value: `(${os__namespace.arch()}-${os__namespace.type()}-${os__namespace.release()})`,\n };\n return [runtimeInfo, osInfo];\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getRuntimeInfo() {\n const msRestRuntime = {\n key: \"core-http\",\n value: Constants.coreHttpVersion,\n };\n return [msRestRuntime];\n}\nfunction getUserAgentString(telemetryInfo, keySeparator = \" \", valueSeparator = \"/\") {\n return telemetryInfo\n .map((info) => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n })\n .join(keySeparator);\n}\nconst getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n/**\n * The default approach to generate user agents.\n * Uses static information from this package, plus system information available from the runtime.\n */\nfunction getDefaultUserAgentValue() {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n/**\n * Returns a policy that adds the user agent header to outgoing requests based on the given {@link TelemetryInfo}.\n * @param userAgentData - Telemetry information.\n * @returns A new {@link UserAgentPolicy}.\n */\nfunction userAgentPolicy(userAgentData) {\n const key = !userAgentData || userAgentData.key === undefined || userAgentData.key === null\n ? getDefaultUserAgentKey()\n : userAgentData.key;\n const value = !userAgentData || userAgentData.value === undefined || userAgentData.value === null\n ? getDefaultUserAgentValue()\n : userAgentData.value;\n return {\n create: (nextPolicy, options) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n },\n };\n}\n/**\n * A policy that adds the user agent header to outgoing requests based on the given {@link TelemetryInfo}.\n */\nclass UserAgentPolicy extends BaseRequestPolicy {\n constructor(_nextPolicy, _options, headerKey, headerValue) {\n super(_nextPolicy, _options);\n this._nextPolicy = _nextPolicy;\n this._options = _options;\n this.headerKey = headerKey;\n this.headerValue = headerValue;\n }\n sendRequest(request) {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n /**\n * Adds the user agent header to the outgoing request.\n */\n addUserAgentHeader(request) {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexports.QueryCollectionFormat = void 0;\n(function (QueryCollectionFormat) {\n /**\n * CSV: Each pair of segments joined by a single comma.\n */\n QueryCollectionFormat[\"Csv\"] = \",\";\n /**\n * SSV: Each pair of segments joined by a single space character.\n */\n QueryCollectionFormat[\"Ssv\"] = \" \";\n /**\n * TSV: Each pair of segments joined by a single tab character.\n */\n QueryCollectionFormat[\"Tsv\"] = \"\\t\";\n /**\n * Pipes: Each pair of segments joined by a single pipe character.\n */\n QueryCollectionFormat[\"Pipes\"] = \"|\";\n /**\n * Denotes this is an array of values that should be passed to the server in multiple key/value pairs, e.g. `?queryParam=value1&queryParam=value2`\n */\n QueryCollectionFormat[\"Multi\"] = \"Multi\";\n})(exports.QueryCollectionFormat || (exports.QueryCollectionFormat = {}));\n\n// Copyright (c) Microsoft Corporation.\n// Default options for the cycler if none are provided\nconst DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000,\n retryIntervalInMs: 3000,\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - a function that produces a promise of an access\n * token that may fail by returning null\n * @param retryIntervalInMs - the time (in milliseconds) to wait between retry\n * attempts\n * @param timeoutInMs - the timestamp after which the refresh attempt will fail,\n * throwing an exception\n * @returns - a promise that, if it resolves, will resolve with an access token\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < timeoutInMs) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await coreUtil.delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param scopes - the scopes to request authorization for\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nfunction createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}\n// #endregion\n/**\n * Creates a new factory for a RequestPolicy that applies a bearer token to\n * the requests' `Authorization` headers.\n *\n * @param credential - The TokenCredential implementation that can supply the bearer token.\n * @param scopes - The scopes for which the bearer token applies.\n */\nfunction bearerTokenAuthenticationPolicy(credential, scopes) {\n // This simple function encapsulates the entire process of reliably retrieving the token\n const getToken = createTokenCycler(credential, scopes /* , options */);\n class BearerTokenAuthenticationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(webResource) {\n if (!webResource.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n const { token } = await getToken({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n });\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);\n return this._nextPolicy.sendRequest(webResource);\n }\n }\n return {\n create: (nextPolicy, options) => {\n return new BearerTokenAuthenticationPolicy(nextPolicy, options);\n },\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Returns a request policy factory that can be used to create an instance of\n * {@link DisableResponseDecompressionPolicy}.\n */\nfunction disableResponseDecompressionPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new DisableResponseDecompressionPolicy(nextPolicy, options);\n },\n };\n}\n/**\n * A policy to disable response decompression according to Accept-Encoding header\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding\n */\nclass DisableResponseDecompressionPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of DisableResponseDecompressionPolicy.\n *\n * @param nextPolicy -\n * @param options -\n */\n // The parent constructor is protected.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor */\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends out request.\n *\n * @param request -\n * @returns\n */\n async sendRequest(request) {\n request.decompressResponse = false;\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that assigns a unique request id to outgoing requests.\n * @param requestIdHeaderName - The name of the header to use when assigning the unique id to the request.\n */\nfunction generateClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\") {\n return {\n create: (nextPolicy, options) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n },\n };\n}\nclass GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _requestIdHeaderName) {\n super(nextPolicy, options);\n this._requestIdHeaderName = _requestIdHeaderName;\n }\n sendRequest(request) {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, request.requestId);\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nlet cachedHttpClient;\nfunction getCachedDefaultHttpClient() {\n if (!cachedHttpClient) {\n cachedHttpClient = new NodeFetchHttpClient();\n }\n return cachedHttpClient;\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction ndJsonPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new NdJsonPolicy(nextPolicy, options);\n },\n };\n}\n/**\n * NdJsonPolicy that formats a JSON array as newline-delimited JSON\n */\nclass NdJsonPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n */\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends a request.\n */\n async sendRequest(request) {\n // There currently isn't a good way to bypass the serializer\n if (typeof request.body === \"string\" && request.body.startsWith(\"[\")) {\n const body = JSON.parse(request.body);\n if (Array.isArray(body)) {\n request.body = body.map((item) => JSON.stringify(item) + \"\\n\").join(\"\");\n }\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Stores the patterns specified in NO_PROXY environment variable.\n * @internal\n */\nconst globalNoProxyList = [];\nlet noProxyListLoaded = false;\n/** A cache of whether a host should bypass the proxy. */\nconst globalBypassedMap = new Map();\nfunction loadEnvironmentProxyValue() {\n if (!process) {\n return undefined;\n }\n const httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY);\n const allProxy = getEnvironmentValue(Constants.ALL_PROXY);\n const httpProxy = getEnvironmentValue(Constants.HTTP_PROXY);\n return httpsProxy || allProxy || httpProxy;\n}\n/**\n * Check whether the host of a given `uri` matches any pattern in the no proxy list.\n * If there's a match, any request sent to the same host shouldn't have the proxy settings set.\n * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210\n */\nfunction isBypassed(uri, noProxyList, bypassedMap) {\n if (noProxyList.length === 0) {\n return false;\n }\n const host = URLBuilder.parse(uri).getHost();\n if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) {\n return bypassedMap.get(host);\n }\n let isBypassedFlag = false;\n for (const pattern of noProxyList) {\n if (pattern[0] === \".\") {\n // This should match either domain it self or any subdomain or host\n // .foo.com will match foo.com it self or *.foo.com\n if (host.endsWith(pattern)) {\n isBypassedFlag = true;\n }\n else {\n if (host.length === pattern.length - 1 && host === pattern.slice(1)) {\n isBypassedFlag = true;\n }\n }\n }\n else {\n if (host === pattern) {\n isBypassedFlag = true;\n }\n }\n }\n bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag);\n return isBypassedFlag;\n}\n/**\n * @internal\n */\nfunction loadNoProxy() {\n const noProxy = getEnvironmentValue(Constants.NO_PROXY);\n noProxyListLoaded = true;\n if (noProxy) {\n return noProxy\n .split(\",\")\n .map((item) => item.trim())\n .filter((item) => item.length);\n }\n return [];\n}\n/**\n * Converts a given URL of a proxy server into `ProxySettings` or attempts to retrieve `ProxySettings` from the current environment if one is not passed.\n * @param proxyUrl - URL of the proxy\n * @returns The default proxy settings, or undefined.\n */\nfunction getDefaultProxySettings(proxyUrl) {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n const { username, password, urlWithoutAuth } = extractAuthFromUrl(proxyUrl);\n const parsedUrl = URLBuilder.parse(urlWithoutAuth);\n const schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + \"://\" : \"\";\n return {\n host: schema + parsedUrl.getHost(),\n port: Number.parseInt(parsedUrl.getPort() || \"80\"),\n username,\n password,\n };\n}\n/**\n * A policy that allows one to apply proxy settings to all requests.\n * If not passed static settings, they will be retrieved from the HTTPS_PROXY\n * or HTTP_PROXY environment variables.\n * @param proxySettings - ProxySettings to use on each request.\n * @param options - additional settings, for example, custom NO_PROXY patterns\n */\nfunction proxyPolicy(proxySettings, options) {\n if (!proxySettings) {\n proxySettings = getDefaultProxySettings();\n }\n if (!noProxyListLoaded) {\n globalNoProxyList.push(...loadNoProxy());\n }\n return {\n create: (nextPolicy, requestPolicyOptions) => {\n return new ProxyPolicy(nextPolicy, requestPolicyOptions, proxySettings, options === null || options === void 0 ? void 0 : options.customNoProxyList);\n },\n };\n}\nfunction extractAuthFromUrl(url) {\n const atIndex = url.indexOf(\"@\");\n if (atIndex === -1) {\n return { urlWithoutAuth: url };\n }\n const schemeIndex = url.indexOf(\"://\");\n const authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0;\n const auth = url.substring(authStart, atIndex);\n const colonIndex = auth.indexOf(\":\");\n const hasPassword = colonIndex !== -1;\n const username = hasPassword ? auth.substring(0, colonIndex) : auth;\n const password = hasPassword ? auth.substring(colonIndex + 1) : undefined;\n const urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1);\n return {\n username,\n password,\n urlWithoutAuth,\n };\n}\nclass ProxyPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, proxySettings, customNoProxyList) {\n super(nextPolicy, options);\n this.proxySettings = proxySettings;\n this.customNoProxyList = customNoProxyList;\n }\n sendRequest(request) {\n var _a;\n if (!request.proxySettings &&\n !isBypassed(request.url, (_a = this.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, this.customNoProxyList ? undefined : globalBypassedMap)) {\n request.proxySettings = this.proxySettings;\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction rpRegistrationPolicy(retryTimeout = 30) {\n return {\n create: (nextPolicy, options) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n },\n };\n}\nclass RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _retryTimeout = 30) {\n super(nextPolicy, options);\n this._retryTimeout = _retryTimeout;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => registerIfNeeded(this, request, response));\n }\n}\nfunction registerIfNeeded(policy, request, response) {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return (registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then((registrationStatus) => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n }));\n }\n }\n return Promise.resolve(response);\n}\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param originalRequest - The original request\n * @param reuseUrlToo - Should the url from the original request be reused as well. Default false.\n * @returns A new request object with desired headers.\n */\nfunction getRequestEssentials(originalRequest, reuseUrlToo = false) {\n const reqOptions = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", generateUuid());\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n return reqOptions;\n}\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param body - The response body received after making the original request.\n * @returns The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body) {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n }\n catch (err) {\n // do nothing;\n }\n if (responseBody &&\n responseBody.error &&\n responseBody.error.message &&\n responseBody.error.code &&\n responseBody.error.code === \"MissingSubscriptionRegistration\") {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param url - The original request url\n * @returns The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url) {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//gi);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n }\n else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n/**\n * Registers the given provider.\n * @param policy - The RPRegistrationPolicy this function is being called against.\n * @param urlPrefix - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param provider - The provider name to be registered.\n * @param originalRequest - The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n */\nasync function registerRP(policy, urlPrefix, provider, originalRequest) {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n const response = await policy._nextPolicy.sendRequest(reqOptions);\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n}\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param policy - The RPRegistrationPolicy this function is being called against.\n * @param url - The request url for polling\n * @param originalRequest - The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns True if RP Registration is successful.\n */\nasync function getRegistrationStatus(policy, url, originalRequest) {\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n const res = await policy._nextPolicy.sendRequest(reqOptions);\n const obj = res.parsedBody;\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n }\n else {\n await coreUtil.delay(policy._retryTimeout * 1000);\n return getRegistrationStatus(policy, url, originalRequest);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that signs outgoing requests by calling to the provided `authenticationProvider`'s `signRequest` method.\n * @param authenticationProvider - The authentication provider.\n * @returns An instance of the {@link SigningPolicy}.\n */\nfunction signingPolicy(authenticationProvider) {\n return {\n create: (nextPolicy, options) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n },\n };\n}\n/**\n * A policy that signs outgoing requests by calling to the provided `authenticationProvider`'s `signRequest` method.\n */\nclass SigningPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, authenticationProvider) {\n super(nextPolicy, options);\n this.authenticationProvider = authenticationProvider;\n }\n signRequest(request) {\n return this.authenticationProvider.signRequest(request);\n }\n sendRequest(request) {\n return this.signRequest(request).then((nextRequest) => this._nextPolicy.sendRequest(nextRequest));\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A policy that retries when there's a system error, identified by the codes \"ETIMEDOUT\", \"ESOCKETTIMEDOUT\", \"ECONNREFUSED\", \"ECONNRESET\" or \"ENOENT\".\n * @param retryCount - Maximum number of retries.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n * @returns An instance of the {@link SystemErrorRetryPolicy}\n */\nfunction systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) {\n return {\n create: (nextPolicy, options) => {\n return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n },\n };\n}\n/**\n * A policy that retries when there's a system error, identified by the codes \"ETIMEDOUT\", \"ESOCKETTIMEDOUT\", \"ECONNREFUSED\", \"ECONNRESET\" or \"ENOENT\".\n * @param retryCount - The client retry count.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n */\nclass SystemErrorRetryPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval)\n ? minRetryInterval\n : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .catch((error) => retry(this, request, error.response, error));\n }\n}\nasync function retry(policy, request, operationResponse, err, retryData) {\n retryData = updateRetryData(policy, retryData, err);\n function shouldPolicyRetry(_response, error) {\n if (error &&\n error.code &&\n (error.code === \"ETIMEDOUT\" ||\n error.code === \"ESOCKETTIMEDOUT\" ||\n error.code === \"ECONNREFUSED\" ||\n error.code === \"ECONNRESET\" ||\n error.code === \"ENOENT\")) {\n return true;\n }\n return false;\n }\n if (shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) {\n // If previous operation ended with an error and the policy allows a retry, do that\n try {\n await coreUtil.delay(retryData.retryInterval);\n return policy._nextPolicy.sendRequest(request.clone());\n }\n catch (nestedErr) {\n return retry(policy, request, operationResponse, nestedErr, retryData);\n }\n }\n else {\n if (err) {\n // If the operation failed in the end, return all errors instead of just the last one\n return Promise.reject(retryData.error);\n }\n return operationResponse;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Maximum number of retries for the throttling retry policy\n */\nconst DEFAULT_CLIENT_MAX_RETRY_COUNT = 3;\n\n// Copyright (c) Microsoft Corporation.\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n/**\n * Creates a policy that re-sends the request if the response indicates the request failed because of throttling reasons.\n * For example, if the response contains a `Retry-After` header, it will retry sending the request based on the value of that header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n * @returns\n */\nfunction throttlingRetryPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n },\n };\n}\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * Creates a policy that re-sends the request if the response indicates the request failed because of throttling reasons.\n * For example, if the response contains a `Retry-After` header, it will retry sending the request based on the value of that header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nclass ThrottlingRetryPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _handleResponse) {\n super(nextPolicy, options);\n this.numberOfRetries = 0;\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n async sendRequest(httpRequest) {\n const response = await this._nextPolicy.sendRequest(httpRequest.clone());\n if (response.status !== StatusCodes.TooManyRequests &&\n response.status !== StatusCodes.ServiceUnavailable) {\n return response;\n }\n else {\n return this._handleResponse(httpRequest, response);\n }\n }\n async _defaultResponseHandler(httpRequest, httpResponse) {\n var _a;\n const retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);\n if (retryAfterHeader) {\n const delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);\n if (delayInMs) {\n this.numberOfRetries += 1;\n await coreUtil.delay(delayInMs, {\n abortSignal: httpRequest.abortSignal,\n abortErrorMsg: StandardAbortMessage,\n });\n if ((_a = httpRequest.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n throw new abortController.AbortError(StandardAbortMessage);\n }\n if (this.numberOfRetries < DEFAULT_CLIENT_MAX_RETRY_COUNT) {\n return this.sendRequest(httpRequest);\n }\n else {\n return this._nextPolicy.sendRequest(httpRequest);\n }\n }\n }\n return httpResponse;\n }\n static parseRetryAfterHeader(headerValue) {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n }\n else {\n return retryAfterInSeconds * 1000;\n }\n }\n static parseDateRetryAfterHeader(headerValue) {\n try {\n const now = Date.now();\n const date = Date.parse(headerValue);\n const diff = date - now;\n return Number.isNaN(diff) ? undefined : diff;\n }\n catch (error) {\n return undefined;\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createSpan = coreTracing.createSpanFunction({\n packagePrefix: \"\",\n namespace: \"\",\n});\n/**\n * Creates a policy that wraps outgoing requests with a tracing span.\n * @param tracingOptions - Tracing options.\n * @returns An instance of the {@link TracingPolicy} class.\n */\nfunction tracingPolicy(tracingOptions = {}) {\n return {\n create(nextPolicy, options) {\n return new TracingPolicy(nextPolicy, options, tracingOptions);\n },\n };\n}\n/**\n * A policy that wraps outgoing requests with a tracing span.\n */\nclass TracingPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, tracingOptions) {\n super(nextPolicy, options);\n this.userAgent = tracingOptions.userAgent;\n }\n async sendRequest(request) {\n if (!request.tracingContext) {\n return this._nextPolicy.sendRequest(request);\n }\n const span = this.tryCreateSpan(request);\n if (!span) {\n return this._nextPolicy.sendRequest(request);\n }\n try {\n const response = await this._nextPolicy.sendRequest(request);\n this.tryProcessResponse(span, response);\n return response;\n }\n catch (err) {\n this.tryProcessError(span, err);\n throw err;\n }\n }\n tryCreateSpan(request) {\n var _a;\n try {\n // Passing spanOptions as part of tracingOptions to maintain compatibility @azure/core-tracing@preview.13 and earlier.\n // We can pass this as a separate parameter once we upgrade to the latest core-tracing.\n const { span } = createSpan(`HTTP ${request.method}`, {\n tracingOptions: {\n spanOptions: Object.assign(Object.assign({}, request.spanOptions), { kind: coreTracing.SpanKind.CLIENT }),\n tracingContext: request.tracingContext,\n },\n });\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n const namespaceFromContext = (_a = request.tracingContext) === null || _a === void 0 ? void 0 : _a.getValue(Symbol.for(\"az.namespace\"));\n if (typeof namespaceFromContext === \"string\") {\n span.setAttribute(\"az.namespace\", namespaceFromContext);\n }\n span.setAttributes({\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId,\n });\n if (this.userAgent) {\n span.setAttribute(\"http.user_agent\", this.userAgent);\n }\n // set headers\n const spanContext = span.spanContext();\n const traceParentHeader = coreTracing.getTraceParentHeader(spanContext);\n if (traceParentHeader && coreTracing.isSpanContextValid(spanContext)) {\n request.headers.set(\"traceparent\", traceParentHeader);\n const traceState = spanContext.traceState && spanContext.traceState.serialize();\n // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent\n if (traceState) {\n request.headers.set(\"tracestate\", traceState);\n }\n }\n return span;\n }\n catch (error) {\n logger.warning(`Skipping creating a tracing span due to an error: ${error.message}`);\n return undefined;\n }\n }\n tryProcessError(span, err) {\n try {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: err.message,\n });\n if (err.statusCode) {\n span.setAttribute(\"http.status_code\", err.statusCode);\n }\n span.end();\n }\n catch (error) {\n logger.warning(`Skipping tracing span processing due to an error: ${error.message}`);\n }\n }\n tryProcessResponse(span, response) {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.OK,\n });\n span.end();\n }\n catch (error) {\n logger.warning(`Skipping tracing span processing due to an error: ${error.message}`);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ServiceClient sends service requests and receives responses.\n */\nclass ServiceClient {\n /**\n * The ServiceClient constructor\n * @param credentials - The credentials used for authentication with the service.\n * @param options - The service client options that govern the behavior of the client.\n */\n constructor(credentials, \n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options) {\n if (!options) {\n options = {};\n }\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || getCachedDefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n let requestPolicyFactories;\n if (Array.isArray(options.requestPolicyFactories)) {\n logger.info(\"ServiceClient: using custom request policies\");\n requestPolicyFactories = options.requestPolicyFactories;\n }\n else {\n let authPolicyFactory = undefined;\n if (coreAuth.isTokenCredential(credentials)) {\n logger.info(\"ServiceClient: creating bearer token authentication policy from provided credentials\");\n // Create a wrapped RequestPolicyFactory here so that we can provide the\n // correct scope to the BearerTokenAuthenticationPolicy at the first time\n // one is requested. This is needed because generated ServiceClient\n // implementations do not set baseUri until after ServiceClient's constructor\n // is finished, leaving baseUri empty at the time when it is needed to\n // build the correct scope name.\n const wrappedPolicyFactory = () => {\n let bearerTokenPolicyFactory = undefined;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const serviceClient = this;\n const serviceClientOptions = options;\n return {\n create(nextPolicy, createOptions) {\n const credentialScopes = getCredentialScopes(serviceClientOptions, serviceClient.baseUri);\n if (!credentialScopes) {\n throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`);\n }\n if (bearerTokenPolicyFactory === undefined || bearerTokenPolicyFactory === null) {\n bearerTokenPolicyFactory = bearerTokenAuthenticationPolicy(credentials, credentialScopes);\n }\n return bearerTokenPolicyFactory.create(nextPolicy, createOptions);\n },\n };\n };\n authPolicyFactory = wrappedPolicyFactory();\n }\n else if (credentials && typeof credentials.signRequest === \"function\") {\n logger.info(\"ServiceClient: creating signing policy from provided credentials\");\n authPolicyFactory = signingPolicy(credentials);\n }\n else if (credentials !== undefined && credentials !== null) {\n throw new Error(\"The credentials argument must implement the TokenCredential interface\");\n }\n logger.info(\"ServiceClient: using default request policies\");\n requestPolicyFactories = createDefaultRequestPolicyFactories(authPolicyFactory, options);\n if (options.requestPolicyFactories) {\n // options.requestPolicyFactories can also be a function that manipulates\n // the default requestPolicyFactories array\n const newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options) {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n let httpRequest;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n }\n else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n }\n catch (error) {\n return Promise.reject(error);\n }\n let httpPipeline = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions);\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param operationArguments - The arguments that the HTTP request's templated values will be populated from.\n * @param operationSpec - The OperationSpec to use to populate the httpRequest.\n * @param callback - The callback to call when the response is received.\n */\n async sendOperationRequest(operationArguments, operationSpec, callback) {\n var _a;\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n const httpRequest = new WebResource();\n let result;\n try {\n const baseUri = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\");\n }\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n const requestUrl = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter), serializerOptions);\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue);\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer);\n if (queryParameterValue !== undefined && queryParameterValue !== null) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter), serializerOptions);\n if (queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null) {\n if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n // The collection is empty, no need to try serializing the current queryParam\n continue;\n }\n else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] =\n item === undefined || item === null ? \"\" : item.toString();\n }\n }\n }\n else if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Ssv ||\n queryParameter.collectionFormat === exports.QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (queryParameterValue[index] !== undefined &&\n queryParameterValue[index] !== null) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Multi &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Ssv &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType && operationSpec.requestBody) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer);\n if (headerValue !== undefined && headerValue !== null) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter), serializerOptions);\n const headerCollectionPrefix = headerParameter.mapper\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n }\n else {\n httpRequest.headers.set(headerParameter.mapper.serializedName ||\n getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n const options = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n if (options.spanOptions) {\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n httpRequest.spanOptions = options.spanOptions;\n }\n if (options.tracingContext) {\n httpRequest.tracingContext = options.tracingContext;\n }\n if (options.shouldDeserialize !== undefined && options.shouldDeserialize !== null) {\n httpRequest.shouldDeserialize = options.shouldDeserialize;\n }\n }\n httpRequest.withCredentials = this._withCredentials;\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n if (httpRequest.streamResponseStatusCodes === undefined) {\n httpRequest.streamResponseStatusCodes = getStreamResponseStatusCodes(operationSpec);\n }\n let rawResponse;\n let sendRequestError;\n try {\n rawResponse = await this.sendRequest(httpRequest);\n }\n catch (error) {\n sendRequestError = error;\n }\n if (sendRequestError) {\n if (sendRequestError.response) {\n sendRequestError.details = flattenResponse(sendRequestError.response, operationSpec.responses[sendRequestError.statusCode] ||\n operationSpec.responses[\"default\"]);\n }\n result = Promise.reject(sendRequestError);\n }\n else {\n result = Promise.resolve(flattenResponse(rawResponse, operationSpec.responses[rawResponse.status]));\n }\n }\n catch (error) {\n result = Promise.reject(error);\n }\n const cb = callback;\n if (cb) {\n result\n .then((res) => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch((err) => cb(err));\n }\n return result;\n }\n}\nfunction serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) {\n var _a, _b, _c, _d, _e, _f;\n const serializerOptions = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions) !== null && _b !== void 0 ? _b : {};\n const updatedOptions = {\n rootName: (_c = serializerOptions.rootName) !== null && _c !== void 0 ? _c : \"\",\n includeRoot: (_d = serializerOptions.includeRoot) !== null && _d !== void 0 ? _d : false,\n xmlCharKey: (_e = serializerOptions.xmlCharKey) !== null && _e !== void 0 ? _e : XML_CHARKEY,\n };\n const xmlCharKey = serializerOptions.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer);\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, xmlName, xmlElementName, serializedName, xmlNamespace, xmlNamespacePrefix } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if ((httpRequest.body !== undefined && httpRequest.body !== null) || required) {\n const requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody);\n httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString, updatedOptions);\n const isStream = typeName === MapperType.Stream;\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, httpRequest.body, updatedOptions);\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n else if (!isStream) {\n httpRequest.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n }\n else if (typeName === MapperType.String &&\n (((_f = operationSpec.contentType) === null || _f === void 0 ? void 0 : _f.match(\"text/plain\")) || operationSpec.mediaType === \"text\")) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n }\n else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n }\n catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n }\n else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer);\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions);\n }\n }\n }\n}\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n return serializedValue;\n}\nfunction getValueOrFunctionResult(value, defaultValueCreator) {\n let result;\n if (typeof value === \"string\") {\n result = value;\n }\n else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\nfunction createDefaultRequestPolicyFactories(authPolicyFactory, options) {\n const factories = [];\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n if (authPolicyFactory) {\n factories.push(authPolicyFactory);\n }\n const userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName);\n const userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue);\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n if (coreUtil.isNode) {\n factories.push(proxyPolicy(options.proxySettings));\n }\n factories.push(logPolicy({ logger: logger.info }));\n return factories;\n}\n/**\n * Creates an HTTP pipeline based on the given options.\n * @param pipelineOptions - Defines options that are used to configure policies in the HTTP pipeline for an SDK client.\n * @param authPolicyFactory - An optional authentication policy factory to use for signing requests.\n * @returns A set of options that can be passed to create a new {@link ServiceClient}.\n */\nfunction createPipelineFromOptions(pipelineOptions, authPolicyFactory) {\n const requestPolicyFactories = [];\n if (pipelineOptions.sendStreamingJson) {\n requestPolicyFactories.push(ndJsonPolicy());\n }\n let userAgentValue = undefined;\n if (pipelineOptions.userAgentOptions && pipelineOptions.userAgentOptions.userAgentPrefix) {\n const userAgentInfo = [];\n userAgentInfo.push(pipelineOptions.userAgentOptions.userAgentPrefix);\n // Add the default user agent value if it isn't already specified\n // by the userAgentPrefix option.\n const defaultUserAgentInfo = getDefaultUserAgentValue();\n if (userAgentInfo.indexOf(defaultUserAgentInfo) === -1) {\n userAgentInfo.push(defaultUserAgentInfo);\n }\n userAgentValue = userAgentInfo.join(\" \");\n }\n const keepAliveOptions = Object.assign(Object.assign({}, DefaultKeepAliveOptions), pipelineOptions.keepAliveOptions);\n const retryOptions = Object.assign(Object.assign({}, DefaultRetryOptions), pipelineOptions.retryOptions);\n const redirectOptions = Object.assign(Object.assign({}, DefaultRedirectOptions), pipelineOptions.redirectOptions);\n if (coreUtil.isNode) {\n requestPolicyFactories.push(proxyPolicy(pipelineOptions.proxyOptions));\n }\n const deserializationOptions = Object.assign(Object.assign({}, DefaultDeserializationOptions), pipelineOptions.deserializationOptions);\n const loggingOptions = Object.assign({}, pipelineOptions.loggingOptions);\n requestPolicyFactories.push(tracingPolicy({ userAgent: userAgentValue }), keepAlivePolicy(keepAliveOptions), userAgentPolicy({ value: userAgentValue }), generateClientRequestIdPolicy(), deserializationPolicy(deserializationOptions.expectedContentTypes), throttlingRetryPolicy(), systemErrorRetryPolicy(), exponentialRetryPolicy(retryOptions.maxRetries, retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs));\n if (redirectOptions.handleRedirects) {\n requestPolicyFactories.push(redirectPolicy(redirectOptions.maxRetries));\n }\n if (authPolicyFactory) {\n requestPolicyFactories.push(authPolicyFactory);\n }\n requestPolicyFactories.push(logPolicy(loggingOptions));\n if (coreUtil.isNode && pipelineOptions.decompressResponse === false) {\n requestPolicyFactories.push(disableResponseDecompressionPolicy());\n }\n return {\n httpClient: pipelineOptions.httpClient,\n requestPolicyFactories,\n };\n}\nfunction getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) {\n return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer);\n}\nfunction getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) {\n var _a;\n let value;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n }\n else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n // Serialize just for validation purposes.\n const parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper);\n serializer.serialize(parameterMapper, value, parameterPathString, serializerOptions);\n }\n }\n else {\n if (parameterMapper.required) {\n value = {};\n }\n for (const propertyName in parameterPath) {\n const propertyMapper = parameterMapper.type.modelProperties[propertyName];\n const propertyPath = parameterPath[propertyName];\n const propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer);\n // Serialize just for validation purposes.\n const propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper);\n serializer.serialize(propertyMapper, propertyValue, propertyPathString, serializerOptions);\n if (propertyValue !== undefined && propertyValue !== null) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\nfunction getPropertyFromParameterPath(parent, parameterPath) {\n const result = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent !== undefined && parent !== null && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n }\n else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n/**\n * Parses an {@link HttpOperationResponse} into a normalized HTTP response object ({@link RestResponse}).\n * @param _response - Wrapper object for http response.\n * @param responseSpec - Mappers for how to parse the response properties.\n * @returns - A normalized response object.\n */\nfunction flattenResponse(_response, responseSpec) {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n const addOperationResponse = (obj) => {\n return Object.defineProperty(obj, \"_response\", {\n value: _response,\n });\n };\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody }));\n }\n const modelProperties = (typeName === \"Composite\" && bodyMapper.type.modelProperties) || {};\n const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === \"\");\n if (typeName === \"Sequence\" || isPageableResponse) {\n const arrayResponse = [...(_response.parsedBody || [])];\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), _response.parsedBody));\n }\n }\n if (bodyMapper ||\n _response.request.method === \"HEAD\" ||\n isPrimitiveType(_response.parsedBody)) {\n // primitive body types and HEAD booleans\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), { body: _response.parsedBody }));\n }\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), _response.parsedBody));\n}\nfunction getCredentialScopes(options, baseUri) {\n if (options === null || options === void 0 ? void 0 : options.credentialScopes) {\n return options.credentialScopes;\n }\n if (baseUri) {\n return `${baseUri}/.default`;\n }\n return undefined;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This function is only here for compatibility. Use createSpanFunction in core-tracing.\n *\n * @deprecated This function is only here for compatibility. Use createSpanFunction in core-tracing.\n * @hidden\n\n * @param spanConfig - The name of the operation being performed.\n * @param tracingOptions - The options for the underlying http request.\n */\nfunction createSpanFunction(args) {\n return coreTracing.createSpanFunction(args);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Defines the default token refresh buffer duration.\n */\nconst TokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes\n/**\n * Provides an {@link AccessTokenCache} implementation which clears\n * the cached {@link AccessToken}'s after the expiresOnTimestamp has\n * passed.\n *\n * @deprecated No longer used in the bearer authorization policy.\n */\nclass ExpiringAccessTokenCache {\n /**\n * Constructs an instance of {@link ExpiringAccessTokenCache} with\n * an optional expiration buffer time.\n */\n constructor(tokenRefreshBufferMs = TokenRefreshBufferMs) {\n this.cachedToken = undefined;\n this.tokenRefreshBufferMs = tokenRefreshBufferMs;\n }\n /**\n * Saves an access token into the internal in-memory cache.\n * @param accessToken - Access token or undefined to clear the cache.\n */\n setCachedToken(accessToken) {\n this.cachedToken = accessToken;\n }\n /**\n * Returns the cached access token, or `undefined` if one is not cached or the cached one is expiring soon.\n */\n getCachedToken() {\n if (this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) {\n this.cachedToken = undefined;\n }\n return this.cachedToken;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token.\n *\n * @deprecated No longer used in the bearer authorization policy.\n */\nclass AccessTokenRefresher {\n constructor(credential, scopes, requiredMillisecondsBeforeNewRefresh = 30000) {\n this.credential = credential;\n this.scopes = scopes;\n this.requiredMillisecondsBeforeNewRefresh = requiredMillisecondsBeforeNewRefresh;\n this.lastCalled = 0;\n }\n /**\n * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying\n * that we are ready for a new refresh.\n */\n isReady() {\n // We're only ready for a new refresh if the required milliseconds have passed.\n return (!this.lastCalled || Date.now() - this.lastCalled > this.requiredMillisecondsBeforeNewRefresh);\n }\n /**\n * Stores the time in which it is called,\n * then requests a new token,\n * then sets this.promise to undefined,\n * then returns the token.\n */\n async getToken(options) {\n this.lastCalled = Date.now();\n const token = await this.credential.getToken(this.scopes, options);\n this.promise = undefined;\n return token || undefined;\n }\n /**\n * Requests a new token if we're not currently waiting for a new token.\n * Returns null if the required time between each call hasn't been reached.\n */\n refresh(options) {\n if (!this.promise) {\n this.promise = this.getToken(options);\n }\n return this.promise;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n/**\n * A simple {@link ServiceClientCredential} that authenticates with a username and a password.\n */\nclass BasicAuthenticationCredentials {\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @param userName - User name.\n * @param password - Password.\n * @param authorizationScheme - The authorization scheme.\n */\n constructor(userName, password, authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME) {\n /**\n * Authorization scheme. Defaults to \"Basic\".\n * More information about authorization schemes is available here: https://developer.mozilla.org/docs/Web/HTTP/Authentication#authentication_schemes\n */\n this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME;\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n /**\n * Signs a request with the Authentication header.\n *\n * @param webResource - The WebResourceLike to be signed.\n * @returns The signed request object.\n */\n signRequest(webResource) {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${encodeString(credentials)}`;\n if (!webResource.headers)\n webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Authenticates to a service using an API key.\n */\nclass ApiKeyCredentials {\n /**\n * @param options - Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(`options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`);\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param webResource - The WebResourceLike to be signed.\n * @returns The signed request object.\n */\n signRequest(webResource) {\n if (!webResource) {\n return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type \"object\".`));\n }\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n return Promise.resolve(webResource);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A {@link TopicCredentials} object used for Azure Event Grid.\n */\nclass TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @param topicKey - The EventGrid topic key\n */\n constructor(topicKey) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options = {\n inHeader: {\n \"aeg-sas-key\": topicKey,\n },\n };\n super(options);\n }\n}\n\nObject.defineProperty(exports, 'delay', {\n enumerable: true,\n get: function () { return coreUtil.delay; }\n});\nObject.defineProperty(exports, 'isNode', {\n enumerable: true,\n get: function () { return coreUtil.isNode; }\n});\nObject.defineProperty(exports, 'isTokenCredential', {\n enumerable: true,\n get: function () { return coreAuth.isTokenCredential; }\n});\nexports.AccessTokenRefresher = AccessTokenRefresher;\nexports.ApiKeyCredentials = ApiKeyCredentials;\nexports.BaseRequestPolicy = BaseRequestPolicy;\nexports.BasicAuthenticationCredentials = BasicAuthenticationCredentials;\nexports.Constants = Constants;\nexports.DefaultHttpClient = NodeFetchHttpClient;\nexports.ExpiringAccessTokenCache = ExpiringAccessTokenCache;\nexports.HttpHeaders = HttpHeaders;\nexports.MapperType = MapperType;\nexports.RequestPolicyOptions = RequestPolicyOptions;\nexports.RestError = RestError;\nexports.Serializer = Serializer;\nexports.ServiceClient = ServiceClient;\nexports.TopicCredentials = TopicCredentials;\nexports.URLBuilder = URLBuilder;\nexports.URLQuery = URLQuery;\nexports.WebResource = WebResource;\nexports.XML_ATTRKEY = XML_ATTRKEY;\nexports.XML_CHARKEY = XML_CHARKEY;\nexports.applyMixins = applyMixins;\nexports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy;\nexports.createPipelineFromOptions = createPipelineFromOptions;\nexports.createSpanFunction = createSpanFunction;\nexports.deserializationPolicy = deserializationPolicy;\nexports.deserializeResponseBody = deserializeResponseBody;\nexports.disableResponseDecompressionPolicy = disableResponseDecompressionPolicy;\nexports.encodeUri = encodeUri;\nexports.executePromisesSequentially = executePromisesSequentially;\nexports.exponentialRetryPolicy = exponentialRetryPolicy;\nexports.flattenResponse = flattenResponse;\nexports.generateClientRequestIdPolicy = generateClientRequestIdPolicy;\nexports.generateUuid = generateUuid;\nexports.getDefaultProxySettings = getDefaultProxySettings;\nexports.getDefaultUserAgentValue = getDefaultUserAgentValue;\nexports.isDuration = isDuration;\nexports.isValidUuid = isValidUuid;\nexports.keepAlivePolicy = keepAlivePolicy;\nexports.logPolicy = logPolicy;\nexports.operationOptionsToRequestOptionsBase = operationOptionsToRequestOptionsBase;\nexports.parseXML = parseXML;\nexports.promiseToCallback = promiseToCallback;\nexports.promiseToServiceCallback = promiseToServiceCallback;\nexports.proxyPolicy = proxyPolicy;\nexports.redirectPolicy = redirectPolicy;\nexports.serializeObject = serializeObject;\nexports.signingPolicy = signingPolicy;\nexports.stringifyXML = stringifyXML;\nexports.stripRequest = stripRequest;\nexports.stripResponse = stripResponse;\nexports.systemErrorRetryPolicy = systemErrorRetryPolicy;\nexports.throttlingRetryPolicy = throttlingRetryPolicy;\nexports.tracingPolicy = tracingPolicy;\nexports.userAgentPolicy = userAgentPolicy;\n//# sourceMappingURL=index.js.map\n","var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n if (!(this instanceof FormData)) {\n return new FormData(options);\n }\n\n this._overheadLength = 0;\n this._valueLength = 0;\n this._valuesToMeasure = [];\n\n CombinedStream.call(this);\n\n options = options || {};\n for (var option in options) {\n this[option] = options[option];\n }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n options = options || {};\n\n // allow filename as single option\n if (typeof options == 'string') {\n options = {filename: options};\n }\n\n var append = CombinedStream.prototype.append.bind(this);\n\n // all that streamy business can't handle numbers\n if (typeof value == 'number') {\n value = '' + value;\n }\n\n // https://github.com/felixge/node-form-data/issues/38\n if (util.isArray(value)) {\n // Please convert your array into string\n // the way web server expects it\n this._error(new Error('Arrays are not supported.'));\n return;\n }\n\n var header = this._multiPartHeader(field, value, options);\n var footer = this._multiPartFooter();\n\n append(header);\n append(value);\n append(footer);\n\n // pass along options.knownLength\n this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n var valueLength = 0;\n\n // used w/ getLengthSync(), when length is known.\n // e.g. for streaming directly from a remote server,\n // w/ a known file a size, and not wanting to wait for\n // incoming file to finish to get its size.\n if (options.knownLength != null) {\n valueLength += +options.knownLength;\n } else if (Buffer.isBuffer(value)) {\n valueLength = value.length;\n } else if (typeof value === 'string') {\n valueLength = Buffer.byteLength(value);\n }\n\n this._valueLength += valueLength;\n\n // @check why add CRLF? does this account for custom/multiple CRLFs?\n this._overheadLength +=\n Buffer.byteLength(header) +\n FormData.LINE_BREAK.length;\n\n // empty or either doesn't have path or not an http response or not a stream\n if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {\n return;\n }\n\n // no need to bother with the length\n if (!options.knownLength) {\n this._valuesToMeasure.push(value);\n }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n\n if (value.hasOwnProperty('fd')) {\n\n // take read range into a account\n // `end` = Infinity –> read file till the end\n //\n // TODO: Looks like there is bug in Node fs.createReadStream\n // it doesn't respect `end` options without `start` options\n // Fix it when node fixes it.\n // https://github.com/joyent/node/issues/7819\n if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n // when end specified\n // no need to calculate range\n // inclusive, starts with 0\n callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n // not that fast snoopy\n } else {\n // still need to fetch file size from fs\n fs.stat(value.path, function(err, stat) {\n\n var fileSize;\n\n if (err) {\n callback(err);\n return;\n }\n\n // update final size based on the range options\n fileSize = stat.size - (value.start ? value.start : 0);\n callback(null, fileSize);\n });\n }\n\n // or http response\n } else if (value.hasOwnProperty('httpVersion')) {\n callback(null, +value.headers['content-length']);\n\n // or request stream http://github.com/mikeal/request\n } else if (value.hasOwnProperty('httpModule')) {\n // wait till response come back\n value.on('response', function(response) {\n value.pause();\n callback(null, +response.headers['content-length']);\n });\n value.resume();\n\n // something else\n } else {\n callback('Unknown stream');\n }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n // custom header specified (as string)?\n // it becomes responsible for boundary\n // (e.g. to handle extra CRLFs on .NET servers)\n if (typeof options.header == 'string') {\n return options.header;\n }\n\n var contentDisposition = this._getContentDisposition(value, options);\n var contentType = this._getContentType(value, options);\n\n var contents = '';\n var headers = {\n // add custom disposition as third element or keep it two elements if not\n 'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n // if no content type. allow it to be empty array\n 'Content-Type': [].concat(contentType || [])\n };\n\n // allow custom headers.\n if (typeof options.header == 'object') {\n populate(headers, options.header);\n }\n\n var header;\n for (var prop in headers) {\n if (!headers.hasOwnProperty(prop)) continue;\n header = headers[prop];\n\n // skip nullish headers.\n if (header == null) {\n continue;\n }\n\n // convert all headers to arrays.\n if (!Array.isArray(header)) {\n header = [header];\n }\n\n // add non-empty headers.\n if (header.length) {\n contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n }\n }\n\n return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n var filename\n , contentDisposition\n ;\n\n if (typeof options.filepath === 'string') {\n // custom filepath for relative paths\n filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n } else if (options.filename || value.name || value.path) {\n // custom filename take precedence\n // formidable and the browser add a name property\n // fs- and request- streams have path property\n filename = path.basename(options.filename || value.name || value.path);\n } else if (value.readable && value.hasOwnProperty('httpVersion')) {\n // or try http response\n filename = path.basename(value.client._httpMessage.path || '');\n }\n\n if (filename) {\n contentDisposition = 'filename=\"' + filename + '\"';\n }\n\n return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n // use custom content-type above all\n var contentType = options.contentType;\n\n // or try `name` from formidable, browser\n if (!contentType && value.name) {\n contentType = mime.lookup(value.name);\n }\n\n // or try `path` from fs-, request- streams\n if (!contentType && value.path) {\n contentType = mime.lookup(value.path);\n }\n\n // or if it's http-reponse\n if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {\n contentType = value.headers['content-type'];\n }\n\n // or guess it from the filepath or filename\n if (!contentType && (options.filepath || options.filename)) {\n contentType = mime.lookup(options.filepath || options.filename);\n }\n\n // fallback to the default content type if `value` is not simple value\n if (!contentType && typeof value == 'object') {\n contentType = FormData.DEFAULT_CONTENT_TYPE;\n }\n\n return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n return function(next) {\n var footer = FormData.LINE_BREAK;\n\n var lastPart = (this._streams.length === 0);\n if (lastPart) {\n footer += this._lastBoundary();\n }\n\n next(footer);\n }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n var header;\n var formHeaders = {\n 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n };\n\n for (header in userHeaders) {\n if (userHeaders.hasOwnProperty(header)) {\n formHeaders[header.toLowerCase()] = userHeaders[header];\n }\n }\n\n return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n if (!this._boundary) {\n this._generateBoundary();\n }\n\n return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n var dataBuffer = new Buffer.alloc( 0 );\n var boundary = this.getBoundary();\n\n // Create the form content. Add Line breaks to the end of data.\n for (var i = 0, len = this._streams.length; i < len; i++) {\n if (typeof this._streams[i] !== 'function') {\n\n // Add content to the buffer.\n if(Buffer.isBuffer(this._streams[i])) {\n dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n }else {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n }\n\n // Add break after content.\n if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n }\n }\n }\n\n // Add the footer and return the Buffer object.\n return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n // This generates a 50 character boundary similar to those used by Firefox.\n // They are optimized for boyer-moore parsing.\n var boundary = '--------------------------';\n for (var i = 0; i < 24; i++) {\n boundary += Math.floor(Math.random() * 10).toString(16);\n }\n\n this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n var knownLength = this._overheadLength + this._valueLength;\n\n // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n // so it basically checks if there is any value added to the form\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n // https://github.com/form-data/form-data/issues/40\n if (!this.hasKnownLength()) {\n // Some async length retrievers are present\n // therefore synchronous length calculation is false.\n // Please use getLength(callback) to get proper length\n this._error(new Error('Cannot calculate proper length in synchronous way.'));\n }\n\n return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n var hasKnownLength = true;\n\n if (this._valuesToMeasure.length) {\n hasKnownLength = false;\n }\n\n return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n var knownLength = this._overheadLength + this._valueLength;\n\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n if (!this._valuesToMeasure.length) {\n process.nextTick(cb.bind(this, null, knownLength));\n return;\n }\n\n asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n if (err) {\n cb(err);\n return;\n }\n\n values.forEach(function(length) {\n knownLength += length;\n });\n\n cb(null, knownLength);\n });\n};\n\nFormData.prototype.submit = function(params, cb) {\n var request\n , options\n , defaults = {method: 'post'}\n ;\n\n // parse provided url if it's string\n // or treat it as options object\n if (typeof params == 'string') {\n\n params = parseUrl(params);\n options = populate({\n port: params.port,\n path: params.pathname,\n host: params.hostname,\n protocol: params.protocol\n }, defaults);\n\n // use custom params\n } else {\n\n options = populate(params, defaults);\n // if no port provided use default one\n if (!options.port) {\n options.port = options.protocol == 'https:' ? 443 : 80;\n }\n }\n\n // put that good code in getHeaders to some use\n options.headers = this.getHeaders(params.headers);\n\n // https if specified, fallback to http in any other case\n if (options.protocol == 'https:') {\n request = https.request(options);\n } else {\n request = http.request(options);\n }\n\n // get content length and fire away\n this.getLength(function(err, length) {\n if (err && err !== 'Unknown stream') {\n this._error(err);\n return;\n }\n\n // add content length\n if (length) {\n request.setHeader('Content-Length', length);\n }\n\n this.pipe(request);\n if (cb) {\n var onResponse;\n\n var callback = function (error, responce) {\n request.removeListener('error', callback);\n request.removeListener('response', onResponse);\n\n return cb.call(this, error, responce);\n };\n\n onResponse = callback.bind(this, null);\n\n request.on('error', callback);\n request.on('response', onResponse);\n }\n }.bind(this));\n\n return request;\n};\n\nFormData.prototype._error = function(err) {\n if (!this.error) {\n this.error = err;\n this.pause();\n this.emit('error', err);\n }\n};\n\nFormData.prototype.toString = function () {\n return '[object FormData]';\n};\n","// populates missing values\nmodule.exports = function(dst, src) {\n\n Object.keys(src).forEach(function(prop)\n {\n dst[prop] = dst[prop] || src[prop];\n });\n\n return dst;\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar logger$1 = require('@azure/logger');\nvar abortController = require('@azure/abort-controller');\nvar coreUtil = require('@azure/core-util');\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The `@azure/logger` configuration for this package.\n * @internal\n */\nconst logger = logger$1.createClientLogger(\"core-lro\");\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The default time interval to wait before sending the next polling request.\n */\nconst POLL_INTERVAL_IN_MS = 2000;\n/**\n * The closed set of terminal states.\n */\nconst terminalStates = [\"succeeded\", \"canceled\", \"failed\"];\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Deserializes the state\n */\nfunction deserializeState(serializedState) {\n try {\n return JSON.parse(serializedState).state;\n }\n catch (e) {\n throw new Error(`Unable to deserialize input state: ${serializedState}`);\n }\n}\nfunction setStateError(inputs) {\n const { state, stateProxy, isOperationError } = inputs;\n return (error) => {\n if (isOperationError(error)) {\n stateProxy.setError(state, error);\n stateProxy.setFailed(state);\n }\n throw error;\n };\n}\nfunction appendReadableErrorMessage(currentMessage, innerMessage) {\n let message = currentMessage;\n if (message.slice(-1) !== \".\") {\n message = message + \".\";\n }\n return message + \" \" + innerMessage;\n}\nfunction simplifyError(err) {\n let message = err.message;\n let code = err.code;\n let curErr = err;\n while (curErr.innererror) {\n curErr = curErr.innererror;\n code = curErr.code;\n message = appendReadableErrorMessage(message, curErr.message);\n }\n return {\n code,\n message,\n };\n}\nfunction processOperationStatus(result) {\n const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result;\n switch (status) {\n case \"succeeded\": {\n stateProxy.setSucceeded(state);\n break;\n }\n case \"failed\": {\n const err = getError === null || getError === void 0 ? void 0 : getError(response);\n let postfix = \"\";\n if (err) {\n const { code, message } = simplifyError(err);\n postfix = `. ${code}. ${message}`;\n }\n const errStr = `The long-running operation has failed${postfix}`;\n stateProxy.setError(state, new Error(errStr));\n stateProxy.setFailed(state);\n logger.warning(errStr);\n break;\n }\n case \"canceled\": {\n stateProxy.setCanceled(state);\n break;\n }\n }\n if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) ||\n (isDone === undefined &&\n [\"succeeded\", \"canceled\"].concat(setErrorAsResult ? [] : [\"failed\"]).includes(status))) {\n stateProxy.setResult(state, buildResult({\n response,\n state,\n processResult,\n }));\n }\n}\nfunction buildResult(inputs) {\n const { processResult, response, state } = inputs;\n return processResult ? processResult(response, state) : response;\n}\n/**\n * Initiates the long-running operation.\n */\nasync function initOperation(inputs) {\n const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;\n const { operationLocation, resourceLocation, metadata, response } = await init();\n if (operationLocation)\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n const config = {\n metadata,\n operationLocation,\n resourceLocation,\n };\n logger.verbose(`LRO: Operation description:`, config);\n const state = stateProxy.initState(config);\n const status = getOperationStatus({ response, state, operationLocation });\n processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n return state;\n}\nasync function pollOperationHelper(inputs) {\n const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs;\n const response = await poll(operationLocation, options).catch(setStateError({\n state,\n stateProxy,\n isOperationError,\n }));\n const status = getOperationStatus(response, state);\n logger.verbose(`LRO: Status:\\n\\tPolling from: ${state.config.operationLocation}\\n\\tOperation status: ${status}\\n\\tPolling status: ${terminalStates.includes(status) ? \"Stopped\" : \"Running\"}`);\n if (status === \"succeeded\") {\n const resourceLocation = getResourceLocation(response, state);\n if (resourceLocation !== undefined) {\n return {\n response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })),\n status,\n };\n }\n }\n return { response, status };\n}\n/** Polls the long-running operation. */\nasync function pollOperation(inputs) {\n const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs;\n const { operationLocation } = state.config;\n if (operationLocation !== undefined) {\n const { response, status } = await pollOperationHelper({\n poll,\n getOperationStatus,\n state,\n stateProxy,\n operationLocation,\n getResourceLocation,\n isOperationError,\n options,\n });\n processOperationStatus({\n status,\n response,\n state,\n stateProxy,\n isDone,\n processResult,\n getError,\n setErrorAsResult,\n });\n if (!terminalStates.includes(status)) {\n const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response);\n if (intervalInMs)\n setDelay(intervalInMs);\n const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state);\n if (location !== undefined) {\n const isUpdated = operationLocation !== location;\n state.config.operationLocation = location;\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated);\n }\n else\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n }\n updateState === null || updateState === void 0 ? void 0 : updateState(state, response);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getOperationLocationPollingUrl(inputs) {\n const { azureAsyncOperation, operationLocation } = inputs;\n return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;\n}\nfunction getLocationHeader(rawResponse) {\n return rawResponse.headers[\"location\"];\n}\nfunction getOperationLocationHeader(rawResponse) {\n return rawResponse.headers[\"operation-location\"];\n}\nfunction getAzureAsyncOperationHeader(rawResponse) {\n return rawResponse.headers[\"azure-asyncoperation\"];\n}\nfunction findResourceLocation(inputs) {\n const { location, requestMethod, requestPath, resourceLocationConfig } = inputs;\n switch (requestMethod) {\n case \"PUT\": {\n return requestPath;\n }\n case \"DELETE\": {\n return undefined;\n }\n default: {\n switch (resourceLocationConfig) {\n case \"azure-async-operation\": {\n return undefined;\n }\n case \"original-uri\": {\n return requestPath;\n }\n case \"location\":\n default: {\n return location;\n }\n }\n }\n }\n}\nfunction inferLroMode(inputs) {\n const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs;\n const operationLocation = getOperationLocationHeader(rawResponse);\n const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse);\n const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation });\n const location = getLocationHeader(rawResponse);\n const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase();\n if (pollingUrl !== undefined) {\n return {\n mode: \"OperationLocation\",\n operationLocation: pollingUrl,\n resourceLocation: findResourceLocation({\n requestMethod: normalizedRequestMethod,\n location,\n requestPath,\n resourceLocationConfig,\n }),\n };\n }\n else if (location !== undefined) {\n return {\n mode: \"ResourceLocation\",\n operationLocation: location,\n };\n }\n else if (normalizedRequestMethod === \"PUT\" && requestPath) {\n return {\n mode: \"Body\",\n operationLocation: requestPath,\n };\n }\n else {\n return undefined;\n }\n}\nfunction transformStatus(inputs) {\n const { status, statusCode } = inputs;\n if (typeof status !== \"string\" && status !== undefined) {\n throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);\n }\n switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) {\n case undefined:\n return toOperationStatus(statusCode);\n case \"succeeded\":\n return \"succeeded\";\n case \"failed\":\n return \"failed\";\n case \"running\":\n case \"accepted\":\n case \"started\":\n case \"canceling\":\n case \"cancelling\":\n return \"running\";\n case \"canceled\":\n case \"cancelled\":\n return \"canceled\";\n default: {\n logger.verbose(`LRO: unrecognized operation status: ${status}`);\n return status;\n }\n }\n}\nfunction getStatus(rawResponse) {\n var _a;\n const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction getProvisioningState(rawResponse) {\n var _a, _b;\n const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction toOperationStatus(statusCode) {\n if (statusCode === 202) {\n return \"running\";\n }\n else if (statusCode < 300) {\n return \"succeeded\";\n }\n else {\n return \"failed\";\n }\n}\nfunction parseRetryAfter({ rawResponse }) {\n const retryAfter = rawResponse.headers[\"retry-after\"];\n if (retryAfter !== undefined) {\n // Retry-After header value is either in HTTP date format, or in seconds\n const retryAfterInSeconds = parseInt(retryAfter);\n return isNaN(retryAfterInSeconds)\n ? calculatePollingIntervalFromDate(new Date(retryAfter))\n : retryAfterInSeconds * 1000;\n }\n return undefined;\n}\nfunction getErrorFromResponse(response) {\n const error = response.flatResponse.error;\n if (!error) {\n logger.warning(`The long-running operation failed but there is no error property in the response's body`);\n return;\n }\n if (!error.code || !error.message) {\n logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);\n return;\n }\n return error;\n}\nfunction calculatePollingIntervalFromDate(retryAfterDate) {\n const timeNow = Math.floor(new Date().getTime());\n const retryAfterTime = retryAfterDate.getTime();\n if (timeNow < retryAfterTime) {\n return retryAfterTime - timeNow;\n }\n return undefined;\n}\nfunction getStatusFromInitialResponse(inputs) {\n const { response, state, operationLocation } = inputs;\n function helper() {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case undefined:\n return toOperationStatus(response.rawResponse.statusCode);\n case \"Body\":\n return getOperationStatus(response, state);\n default:\n return \"running\";\n }\n }\n const status = helper();\n return status === \"running\" && operationLocation === undefined ? \"succeeded\" : status;\n}\n/**\n * Initiates the long-running operation.\n */\nasync function initHttpOperation(inputs) {\n const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n return initOperation({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n stateProxy,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n getOperationStatus: getStatusFromInitialResponse,\n setErrorAsResult,\n });\n}\nfunction getOperationLocation({ rawResponse }, state) {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getOperationLocationPollingUrl({\n operationLocation: getOperationLocationHeader(rawResponse),\n azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse),\n });\n }\n case \"ResourceLocation\": {\n return getLocationHeader(rawResponse);\n }\n case \"Body\":\n default: {\n return undefined;\n }\n }\n}\nfunction getOperationStatus({ rawResponse }, state) {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getStatus(rawResponse);\n }\n case \"ResourceLocation\": {\n return toOperationStatus(rawResponse.statusCode);\n }\n case \"Body\": {\n return getProvisioningState(rawResponse);\n }\n default:\n throw new Error(`Internal error: Unexpected operation mode: ${mode}`);\n }\n}\nfunction getResourceLocation({ flatResponse }, state) {\n if (typeof flatResponse === \"object\") {\n const resourceLocation = flatResponse.resourceLocation;\n if (resourceLocation !== undefined) {\n state.config.resourceLocation = resourceLocation;\n }\n }\n return state.config.resourceLocation;\n}\nfunction isOperationError(e) {\n return e.name === \"RestError\";\n}\n/** Polls the long-running operation. */\nasync function pollHttpOperation(inputs) {\n const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs;\n return pollOperation({\n state,\n stateProxy,\n setDelay,\n processResult: processResult\n ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState)\n : ({ flatResponse }) => flatResponse,\n getError: getErrorFromResponse,\n updateState,\n getPollingInterval: parseRetryAfter,\n getOperationLocation,\n getOperationStatus,\n isOperationError,\n getResourceLocation,\n options,\n /**\n * The expansion here is intentional because `lro` could be an object that\n * references an inner this, so we need to preserve a reference to it.\n */\n poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions),\n setErrorAsResult,\n });\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createStateProxy$1 = () => ({\n /**\n * The state at this point is created to be of type OperationState.\n * It will be updated later to be of type TState when the\n * customer-provided callback, `updateState`, is called during polling.\n */\n initState: (config) => ({ status: \"running\", config }),\n setCanceled: (state) => (state.status = \"canceled\"),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.status = \"running\"),\n setSucceeded: (state) => (state.status = \"succeeded\"),\n setFailed: (state) => (state.status = \"failed\"),\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => state.status === \"canceled\",\n isFailed: (state) => state.status === \"failed\",\n isRunning: (state) => state.status === \"running\",\n isSucceeded: (state) => state.status === \"succeeded\",\n});\n/**\n * Returns a poller factory.\n */\nfunction buildCreatePoller(inputs) {\n const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs;\n return async ({ init, poll }, options) => {\n const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom, } = options || {};\n const stateProxy = createStateProxy$1();\n const withOperationLocation = withOperationLocationCallback\n ? (() => {\n let called = false;\n return (operationLocation, isUpdated) => {\n if (isUpdated)\n withOperationLocationCallback(operationLocation);\n else if (!called)\n withOperationLocationCallback(operationLocation);\n called = true;\n };\n })()\n : undefined;\n const state = restoreFrom\n ? deserializeState(restoreFrom)\n : await initOperation({\n init,\n stateProxy,\n processResult,\n getOperationStatus: getStatusFromInitialResponse,\n withOperationLocation,\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n let resultPromise;\n const abortController$1 = new abortController.AbortController();\n const handlers = new Map();\n const handleProgressEvents = async () => handlers.forEach((h) => h(state));\n const cancelErrMsg = \"Operation was canceled\";\n let currentPollIntervalInMs = intervalInMs;\n const poller = {\n getOperationState: () => state,\n getResult: () => state.result,\n isDone: () => [\"succeeded\", \"failed\", \"canceled\"].includes(state.status),\n isStopped: () => resultPromise === undefined,\n stopPolling: () => {\n abortController$1.abort();\n },\n toString: () => JSON.stringify({\n state,\n }),\n onProgress: (callback) => {\n const s = Symbol();\n handlers.set(s, callback);\n return () => handlers.delete(s);\n },\n pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n const { signal: abortSignal } = inputAbortSignal\n ? new abortController.AbortController([inputAbortSignal, abortController$1.signal])\n : abortController$1;\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await coreUtil.delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n if (resolveOnUnsuccessful) {\n return poller.getResult();\n }\n else {\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult();\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n }\n })().finally(() => {\n resultPromise = undefined;\n }))),\n async poll(pollOptions) {\n if (resolveOnUnsuccessful) {\n if (poller.isDone())\n return;\n }\n else {\n switch (state.status) {\n case \"succeeded\":\n return;\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n await pollOperation({\n poll,\n state,\n stateProxy,\n getOperationLocation,\n isOperationError,\n withOperationLocation,\n getPollingInterval,\n getOperationStatus: getStatusFromPollResponse,\n getResourceLocation,\n processResult,\n getError,\n updateState,\n options: pollOptions,\n setDelay: (pollIntervalInMs) => {\n currentPollIntervalInMs = pollIntervalInMs;\n },\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n await handleProgressEvents();\n if (!resolveOnUnsuccessful) {\n switch (state.status) {\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n },\n };\n return poller;\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a poller that can be used to poll a long-running operation.\n * @param lro - Description of the long-running operation\n * @param options - options to configure the poller\n * @returns an initialized poller\n */\nasync function createHttpPoller(lro, options) {\n const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {};\n return buildCreatePoller({\n getStatusFromInitialResponse,\n getStatusFromPollResponse: getOperationStatus,\n isOperationError,\n getOperationLocation,\n getResourceLocation,\n getPollingInterval: parseRetryAfter,\n getError: getErrorFromResponse,\n resolveOnUnsuccessful,\n })({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n poll: lro.sendPollRequest,\n }, {\n intervalInMs,\n withOperationLocation,\n restoreFrom,\n updateState,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n });\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createStateProxy = () => ({\n initState: (config) => ({ config, isStarted: true }),\n setCanceled: (state) => (state.isCancelled = true),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.isStarted = true),\n setSucceeded: (state) => (state.isCompleted = true),\n setFailed: () => {\n /** empty body */\n },\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => !!state.isCancelled,\n isFailed: (state) => !!state.error,\n isRunning: (state) => !!state.isStarted,\n isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error),\n});\nclass GenericPollOperation {\n constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) {\n this.state = state;\n this.lro = lro;\n this.setErrorAsResult = setErrorAsResult;\n this.lroResourceLocationConfig = lroResourceLocationConfig;\n this.processResult = processResult;\n this.updateState = updateState;\n this.isDone = isDone;\n }\n setPollerConfig(pollerConfig) {\n this.pollerConfig = pollerConfig;\n }\n async update(options) {\n var _a;\n const stateProxy = createStateProxy();\n if (!this.state.isStarted) {\n this.state = Object.assign(Object.assign({}, this.state), (await initHttpOperation({\n lro: this.lro,\n stateProxy,\n resourceLocationConfig: this.lroResourceLocationConfig,\n processResult: this.processResult,\n setErrorAsResult: this.setErrorAsResult,\n })));\n }\n const updateState = this.updateState;\n const isDone = this.isDone;\n if (!this.state.isCompleted && this.state.error === undefined) {\n await pollHttpOperation({\n lro: this.lro,\n state: this.state,\n stateProxy,\n processResult: this.processResult,\n updateState: updateState\n ? (state, { rawResponse }) => updateState(state, rawResponse)\n : undefined,\n isDone: isDone\n ? ({ flatResponse }, state) => isDone(flatResponse, state)\n : undefined,\n options,\n setDelay: (intervalInMs) => {\n this.pollerConfig.intervalInMs = intervalInMs;\n },\n setErrorAsResult: this.setErrorAsResult,\n });\n }\n (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state);\n return this;\n }\n async cancel() {\n logger.error(\"`cancelOperation` is deprecated because it wasn't implemented\");\n return this;\n }\n /**\n * Serializes the Poller operation.\n */\n toString() {\n return JSON.stringify({\n state: this.state,\n });\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nclass PollerStoppedError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n/**\n * When the operation is cancelled, the poller will be rejected with an instance\n * of the PollerCancelledError.\n */\nclass PollerCancelledError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\n// eslint-disable-next-line no-use-before-define\nclass Poller {\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation - Must contain the basic properties of `PollOperation`.\n */\n constructor(operation) {\n /** controls whether to throw an error if the operation failed or was canceled. */\n this.resolveOnUnsuccessful = false;\n this.stopped = true;\n this.pollProgressCallbacks = [];\n this.operation = operation;\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {\n /* intentionally blank */\n });\n }\n /**\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n async startPolling(pollOptions = {}) {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll(pollOptions);\n await this.delay();\n }\n }\n /**\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n async pollOnce(options = {}) {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this),\n });\n }\n this.processUpdatedState();\n }\n /**\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state - The current operation state.\n */\n fireProgress(state) {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n /**\n * Invokes the underlying operation's cancel method.\n */\n async cancelOnce(options = {}) {\n this.operation = await this.operation.cancel(options);\n }\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n poll(options = {}) {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = () => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);\n }\n return this.pollOncePromise;\n }\n processUpdatedState() {\n if (this.operation.state.error) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n this.reject(this.operation.state.error);\n throw this.operation.state.error;\n }\n }\n if (this.operation.state.isCancelled) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n const error = new PollerCancelledError(\"Operation was canceled\");\n this.reject(error);\n throw error;\n }\n }\n if (this.isDone() && this.resolve) {\n // If the poller has finished polling, this means we now have a result.\n // However, it can be the case that TResult is instantiated to void, so\n // we are not expecting a result anyway. To assert that we might not\n // have a result eventually after finishing polling, we cast the result\n // to TResult.\n this.resolve(this.getResult());\n }\n }\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n async pollUntilDone(pollOptions = {}) {\n if (this.stopped) {\n this.startPolling(pollOptions).catch(this.reject);\n }\n // This is needed because the state could have been updated by\n // `cancelOperation`, e.g. the operation is canceled or an error occurred.\n this.processUpdatedState();\n return this.promise;\n }\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback) {\n this.pollProgressCallbacks.push(callback);\n return () => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n /**\n * Returns true if the poller has finished polling.\n */\n isDone() {\n const state = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n /**\n * Stops the poller from continuing to poll.\n */\n stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n /**\n * Returns true if the poller is stopped.\n */\n isStopped() {\n return this.stopped;\n }\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n cancelOperation(options = {}) {\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n }\n else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n getOperationState() {\n return this.operation.state;\n }\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult() {\n const state = this.operation.state;\n return state.result;\n }\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n toString() {\n return this.operation.toString();\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The LRO Engine, a class that performs polling.\n */\nclass LroEngine extends Poller {\n constructor(lro, options) {\n const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {};\n const state = resumeFrom\n ? deserializeState(resumeFrom)\n : {};\n const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone);\n super(operation);\n this.resolveOnUnsuccessful = resolveOnUnsuccessful;\n this.config = { intervalInMs: intervalInMs };\n operation.setPollerConfig(this.config);\n }\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n delay() {\n return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs));\n }\n}\n\nexports.LroEngine = LroEngine;\nexports.Poller = Poller;\nexports.PollerCancelledError = PollerCancelledError;\nexports.PollerStoppedError = PollerStoppedError;\nexports.createHttpPoller = createHttpPoller;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar tslib = require('tslib');\n\n// Copyright (c) Microsoft Corporation.\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator(pagedResult) {\n var _a;\n const iter = getItemAsyncIterator(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {\n const { continuationToken, maxPageSize } = settings !== null && settings !== void 0 ? settings : {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n maxPageSize,\n });\n }),\n };\n}\nfunction getItemAsyncIterator(pagedResult) {\n return tslib.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {\n var e_1, _a, e_2, _b;\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = yield tslib.__await(pages.next());\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(firstVal.value))));\n try {\n for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) {\n const page = pages_1_1.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(page))));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1));\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n yield yield tslib.__await(firstVal.value);\n // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages)));\n }\n }\n else {\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstVal.value)));\n try {\n for (var pages_2 = tslib.__asyncValues(pages), pages_2_1; pages_2_1 = yield tslib.__await(pages_2.next()), !pages_2_1.done;) {\n const page = pages_2_1.value;\n // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (pages_2_1 && !pages_2_1.done && (_b = pages_2.return)) yield tslib.__await(_b.call(pages_2));\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n });\n}\nfunction getPageAsyncIterator(pagedResult, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() {\n const { pageLink, maxPageSize } = options;\n let response = yield tslib.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize));\n if (!response) {\n return yield tslib.__await(void 0);\n }\n yield yield tslib.__await(response.page);\n while (response.nextPageLink) {\n response = yield tslib.__await(pagedResult.getPage(response.nextPageLink, maxPageSize));\n if (!response) {\n return yield tslib.__await(void 0);\n }\n yield yield tslib.__await(response.page);\n }\n });\n}\n\nexports.getPagedAsyncIterator = getPagedAsyncIterator;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar api = require('@opentelemetry/api');\n\n// Copyright (c) Microsoft Corporation.\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(exports.SpanKind || (exports.SpanKind = {}));\n/**\n * Return the span if one exists\n *\n * @param context - context to get span from\n */\nfunction getSpan(context) {\n return api.trace.getSpan(context);\n}\n/**\n * Set the span on a context\n *\n * @param context - context to use as parent\n * @param span - span to set active\n */\nfunction setSpan(context, span) {\n return api.trace.setSpan(context, span);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context - context to set active span on\n * @param spanContext - span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return api.trace.setSpanContext(context, spanContext);\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context - context to get values from\n */\nfunction getSpanContext(context) {\n return api.trace.getSpanContext(context);\n}\n/**\n * Returns true of the given {@link SpanContext} is valid.\n * A valid {@link SpanContext} is one which has a valid trace ID and span ID as per the spec.\n *\n * @param context - the {@link SpanContext} to validate.\n *\n * @returns true if the {@link SpanContext} is valid, false otherwise.\n */\nfunction isSpanContextValid(context) {\n return api.trace.isSpanContextValid(context);\n}\nfunction getTracer(name, version) {\n return api.trace.getTracer(name || \"azure/core-tracing\", version);\n}\n/** Entrypoint for context API */\nconst context = api.context;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n\n// Copyright (c) Microsoft Corporation.\nfunction isTracingDisabled() {\n var _a;\n if (typeof process === \"undefined\") {\n // not supported in browser for now without polyfills\n return false;\n }\n const azureTracingDisabledValue = (_a = process.env.AZURE_TRACING_DISABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (azureTracingDisabledValue === \"false\" || azureTracingDisabledValue === \"0\") {\n return false;\n }\n return Boolean(azureTracingDisabledValue);\n}\n/**\n * Creates a function that can be used to create spans using the global tracer.\n *\n * Usage:\n *\n * ```typescript\n * // once\n * const createSpan = createSpanFunction({ packagePrefix: \"Azure.Data.AppConfiguration\", namespace: \"Microsoft.AppConfiguration\" });\n *\n * // in each operation\n * const span = createSpan(\"deleteConfigurationSetting\", operationOptions);\n * // code...\n * span.end();\n * ```\n *\n * @hidden\n * @param args - allows configuration of the prefix for each span as well as the az.namespace field.\n */\nfunction createSpanFunction(args) {\n return function (operationName, operationOptions) {\n const tracer = getTracer();\n const tracingOptions = (operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) || {};\n const spanOptions = Object.assign({ kind: exports.SpanKind.INTERNAL }, tracingOptions.spanOptions);\n const spanName = args.packagePrefix ? `${args.packagePrefix}.${operationName}` : operationName;\n let span;\n if (isTracingDisabled()) {\n span = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n }\n else {\n span = tracer.startSpan(spanName, spanOptions, tracingOptions.tracingContext);\n }\n if (args.namespace) {\n span.setAttribute(\"az.namespace\", args.namespace);\n }\n let newSpanOptions = tracingOptions.spanOptions || {};\n if (span.isRecording() && args.namespace) {\n newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { attributes: Object.assign(Object.assign({}, spanOptions.attributes), { \"az.namespace\": args.namespace }) });\n }\n const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions, tracingContext: setSpan(tracingOptions.tracingContext || context.active(), span) });\n const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });\n return {\n span,\n updatedOptions: newOperationOptions\n };\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst VERSION = \"00\";\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent - Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nfunction extractSpanContextFromTraceParentHeader(traceParentHeader) {\n const parts = traceParentHeader.split(\"-\");\n if (parts.length !== 4) {\n return;\n }\n const [version, traceId, spanId, traceOptions] = parts;\n if (version !== VERSION) {\n return;\n }\n const traceFlags = parseInt(traceOptions, 16);\n const spanContext = {\n spanId,\n traceId,\n traceFlags\n };\n return spanContext;\n}\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext - Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nfunction getTraceParentHeader(spanContext) {\n const missingFields = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n if (missingFields.length) {\n return;\n }\n const flags = spanContext.traceFlags || 0 /* NONE */;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n\nexports.context = context;\nexports.createSpanFunction = createSpanFunction;\nexports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader;\nexports.getSpan = getSpan;\nexports.getSpanContext = getSpanContext;\nexports.getTraceParentHeader = getTraceParentHeader;\nexports.getTracer = getTracer;\nexports.isSpanContextValid = isSpanContextValid;\nexports.setSpan = setSpan;\nexports.setSpanContext = setSpanContext;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar abortController = require('@azure/abort-controller');\nvar crypto = require('crypto');\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a$1;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nconst isNode = typeof process !== \"undefined\" && Boolean(process.version) && Boolean((_a$1 = process.versions) === null || _a$1 === void 0 ? void 0 : _a$1.node);\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nfunction createAbortablePromise(buildPromise, options) {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort() {\n reject(new abortController.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : \"The operation was aborted.\"));\n }\n function removeListeners() {\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener(\"abort\", onAbort);\n }\n function onAbort() {\n cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise((x) => {\n removeListeners();\n resolve(x);\n }, (x) => {\n removeListeners();\n reject(x);\n });\n }\n catch (err) {\n reject(err);\n }\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener(\"abort\", onAbort);\n });\n}\n\n// Copyright (c) Microsoft Corporation.\nconst StandardAbortMessage = \"The delay was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nfunction delay(timeInMs, options) {\n let token;\n const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return createAbortablePromise((resolve) => {\n token = setTimeout(resolve, timeInMs);\n }, {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,\n });\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nfunction getRandomIntegerInclusive(min, max) {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nfunction isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nfunction isError(e) {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nfunction getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nasync function computeSha256Hmac(key, stringToSign, encoding) {\n const decodedKey = Buffer.from(key, \"base64\");\n return crypto.createHmac(\"sha256\", decodedKey).update(stringToSign).digest(encoding);\n}\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nasync function computeSha256Hash(content, encoding) {\n return crypto.createHash(\"sha256\").update(content).digest(encoding);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nfunction isDefined(thing) {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nfunction isObjectWithProperties(thing, properties) {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nfunction objectHasProperty(thing, property) {\n return (isDefined(thing) && typeof thing === \"object\" && property in thing);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nfunction generateUUID() {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n }\n else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n }\n else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a;\n// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+.\nlet uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : crypto.randomUUID;\n// Not defined in earlier versions of Node.js 14\nif (!uuidFunction) {\n uuidFunction = generateUUID;\n}\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nfunction randomUUID() {\n return uuidFunction();\n}\n\nexports.computeSha256Hash = computeSha256Hash;\nexports.computeSha256Hmac = computeSha256Hmac;\nexports.createAbortablePromise = createAbortablePromise;\nexports.delay = delay;\nexports.getErrorMessage = getErrorMessage;\nexports.getRandomIntegerInclusive = getRandomIntegerInclusive;\nexports.isDefined = isDefined;\nexports.isError = isError;\nexports.isNode = isNode;\nexports.isObject = isObject;\nexports.isObjectWithProperties = isObjectWithProperties;\nexports.objectHasProperty = objectHasProperty;\nexports.randomUUID = randomUUID;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar os = require('os');\nvar util = require('util');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar util__default = /*#__PURE__*/_interopDefaultLegacy(util);\n\n// Copyright (c) Microsoft Corporation.\nfunction log(message, ...args) {\n process.stderr.write(`${util__default[\"default\"].format(message, ...args)}${os.EOL}`);\n}\n\n// Copyright (c) Microsoft Corporation.\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n return createDebugger(namespace);\n}, {\n enable,\n enabled,\n disable,\n log,\n});\nfunction enable(namespaces) {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n }\n else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\nfunction enabled(namespace) {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\nfunction disable() {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\nfunction createDebugger(namespace) {\n const newDebugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n function debug(...args) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n debuggers.push(newDebugger);\n return newDebugger;\n}\nfunction destroy() {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction extend(namespace) {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\nvar debug = debugObj;\n\n// Copyright (c) Microsoft Corporation.\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nconst AzureLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n }\n else {\n console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n }\n}\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nfunction setLogLevel(level) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n }\n azureLogLevel = level;\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n debug.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nfunction getLogLevel() {\n return azureLogLevel;\n}\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nfunction createClientLogger(namespace) {\n const clientRootLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\nfunction patchLogMethod(parent, child) {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\nfunction createLogger(parent, level) {\n const logger = Object.assign(parent.extend(level), {\n level,\n });\n patchLogMethod(parent, logger);\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n registeredLoggers.add(logger);\n return logger;\n}\nfunction shouldEnable(logger) {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\nfunction isAzureLogLevel(logLevel) {\n return AZURE_LOG_LEVELS.includes(logLevel);\n}\n\nexports.AzureLogger = AzureLogger;\nexports.createClientLogger = createClientLogger;\nexports.getLogLevel = getLogLevel;\nexports.setLogLevel = setLogLevel;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar coreHttp = require('@azure/core-http');\nvar tslib = require('tslib');\nvar coreTracing = require('@azure/core-tracing');\nvar logger$1 = require('@azure/logger');\nvar abortController = require('@azure/abort-controller');\nvar os = require('os');\nvar crypto = require('crypto');\nvar stream = require('stream');\nrequire('@azure/core-paging');\nvar coreLro = require('@azure/core-lro');\nvar events = require('events');\nvar fs = require('fs');\nvar util = require('util');\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n[\"default\"] = e;\n return Object.freeze(n);\n}\n\nvar coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);\nvar os__namespace = /*#__PURE__*/_interopNamespace(os);\nvar fs__namespace = /*#__PURE__*/_interopNamespace(fs);\nvar util__namespace = /*#__PURE__*/_interopNamespace(util);\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst BlobServiceProperties = {\n serializedName: \"BlobServiceProperties\",\n xmlName: \"StorageServiceProperties\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceProperties\",\n modelProperties: {\n blobAnalyticsLogging: {\n serializedName: \"Logging\",\n xmlName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\"\n }\n },\n hourMetrics: {\n serializedName: \"HourMetrics\",\n xmlName: \"HourMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n minuteMetrics: {\n serializedName: \"MinuteMetrics\",\n xmlName: \"MinuteMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n cors: {\n serializedName: \"Cors\",\n xmlName: \"Cors\",\n xmlIsWrapped: true,\n xmlElementName: \"CorsRule\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CorsRule\"\n }\n }\n }\n },\n defaultServiceVersion: {\n serializedName: \"DefaultServiceVersion\",\n xmlName: \"DefaultServiceVersion\",\n type: {\n name: \"String\"\n }\n },\n deleteRetentionPolicy: {\n serializedName: \"DeleteRetentionPolicy\",\n xmlName: \"DeleteRetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n },\n staticWebsite: {\n serializedName: \"StaticWebsite\",\n xmlName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\"\n }\n }\n }\n }\n};\nconst Logging = {\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\",\n modelProperties: {\n version: {\n serializedName: \"Version\",\n required: true,\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n deleteProperty: {\n serializedName: \"Delete\",\n required: true,\n xmlName: \"Delete\",\n type: {\n name: \"Boolean\"\n }\n },\n read: {\n serializedName: \"Read\",\n required: true,\n xmlName: \"Read\",\n type: {\n name: \"Boolean\"\n }\n },\n write: {\n serializedName: \"Write\",\n required: true,\n xmlName: \"Write\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n serializedName: \"RetentionPolicy\",\n xmlName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\nconst RetentionPolicy = {\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\",\n modelProperties: {\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n days: {\n constraints: {\n InclusiveMinimum: 1\n },\n serializedName: \"Days\",\n xmlName: \"Days\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst Metrics = {\n serializedName: \"Metrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\",\n modelProperties: {\n version: {\n serializedName: \"Version\",\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n includeAPIs: {\n serializedName: \"IncludeAPIs\",\n xmlName: \"IncludeAPIs\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n serializedName: \"RetentionPolicy\",\n xmlName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\nconst CorsRule = {\n serializedName: \"CorsRule\",\n type: {\n name: \"Composite\",\n className: \"CorsRule\",\n modelProperties: {\n allowedOrigins: {\n serializedName: \"AllowedOrigins\",\n required: true,\n xmlName: \"AllowedOrigins\",\n type: {\n name: \"String\"\n }\n },\n allowedMethods: {\n serializedName: \"AllowedMethods\",\n required: true,\n xmlName: \"AllowedMethods\",\n type: {\n name: \"String\"\n }\n },\n allowedHeaders: {\n serializedName: \"AllowedHeaders\",\n required: true,\n xmlName: \"AllowedHeaders\",\n type: {\n name: \"String\"\n }\n },\n exposedHeaders: {\n serializedName: \"ExposedHeaders\",\n required: true,\n xmlName: \"ExposedHeaders\",\n type: {\n name: \"String\"\n }\n },\n maxAgeInSeconds: {\n constraints: {\n InclusiveMinimum: 0\n },\n serializedName: \"MaxAgeInSeconds\",\n required: true,\n xmlName: \"MaxAgeInSeconds\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst StaticWebsite = {\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\",\n modelProperties: {\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n indexDocument: {\n serializedName: \"IndexDocument\",\n xmlName: \"IndexDocument\",\n type: {\n name: \"String\"\n }\n },\n errorDocument404Path: {\n serializedName: \"ErrorDocument404Path\",\n xmlName: \"ErrorDocument404Path\",\n type: {\n name: \"String\"\n }\n },\n defaultIndexDocumentPath: {\n serializedName: \"DefaultIndexDocumentPath\",\n xmlName: \"DefaultIndexDocumentPath\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst StorageError = {\n serializedName: \"StorageError\",\n type: {\n name: \"Composite\",\n className: \"StorageError\",\n modelProperties: {\n message: {\n serializedName: \"Message\",\n xmlName: \"Message\",\n type: {\n name: \"String\"\n }\n },\n code: {\n serializedName: \"Code\",\n xmlName: \"Code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobServiceStatistics = {\n serializedName: \"BlobServiceStatistics\",\n xmlName: \"StorageServiceStats\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceStatistics\",\n modelProperties: {\n geoReplication: {\n serializedName: \"GeoReplication\",\n xmlName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\"\n }\n }\n }\n }\n};\nconst GeoReplication = {\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\",\n modelProperties: {\n status: {\n serializedName: \"Status\",\n required: true,\n xmlName: \"Status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"live\", \"bootstrap\", \"unavailable\"]\n }\n },\n lastSyncOn: {\n serializedName: \"LastSyncTime\",\n required: true,\n xmlName: \"LastSyncTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ListContainersSegmentResponse = {\n serializedName: \"ListContainersSegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListContainersSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n containerItems: {\n serializedName: \"ContainerItems\",\n required: true,\n xmlName: \"Containers\",\n xmlIsWrapped: true,\n xmlElementName: \"Container\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ContainerItem\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerItem = {\n serializedName: \"ContainerItem\",\n xmlName: \"Container\",\n type: {\n name: \"Composite\",\n className: \"ContainerItem\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n serializedName: \"Deleted\",\n xmlName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n version: {\n serializedName: \"Version\",\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n properties: {\n serializedName: \"Properties\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\"\n }\n },\n metadata: {\n serializedName: \"Metadata\",\n xmlName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n }\n }\n }\n};\nconst ContainerProperties = {\n serializedName: \"ContainerProperties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\",\n modelProperties: {\n lastModified: {\n serializedName: \"Last-Modified\",\n required: true,\n xmlName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"Etag\",\n required: true,\n xmlName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n leaseStatus: {\n serializedName: \"LeaseStatus\",\n xmlName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n leaseState: {\n serializedName: \"LeaseState\",\n xmlName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"LeaseDuration\",\n xmlName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n publicAccess: {\n serializedName: \"PublicAccess\",\n xmlName: \"PublicAccess\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"HasImmutabilityPolicy\",\n xmlName: \"HasImmutabilityPolicy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"HasLegalHold\",\n xmlName: \"HasLegalHold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"DefaultEncryptionScope\",\n xmlName: \"DefaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n serializedName: \"DenyEncryptionScopeOverride\",\n xmlName: \"DenyEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n },\n deletedOn: {\n serializedName: \"DeletedTime\",\n xmlName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n serializedName: \"RemainingRetentionDays\",\n xmlName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n isImmutableStorageWithVersioningEnabled: {\n serializedName: \"ImmutableStorageWithVersioningEnabled\",\n xmlName: \"ImmutableStorageWithVersioningEnabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst KeyInfo = {\n serializedName: \"KeyInfo\",\n type: {\n name: \"Composite\",\n className: \"KeyInfo\",\n modelProperties: {\n startsOn: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry\",\n required: true,\n xmlName: \"Expiry\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst UserDelegationKey = {\n serializedName: \"UserDelegationKey\",\n type: {\n name: \"Composite\",\n className: \"UserDelegationKey\",\n modelProperties: {\n signedObjectId: {\n serializedName: \"SignedOid\",\n required: true,\n xmlName: \"SignedOid\",\n type: {\n name: \"String\"\n }\n },\n signedTenantId: {\n serializedName: \"SignedTid\",\n required: true,\n xmlName: \"SignedTid\",\n type: {\n name: \"String\"\n }\n },\n signedStartsOn: {\n serializedName: \"SignedStart\",\n required: true,\n xmlName: \"SignedStart\",\n type: {\n name: \"String\"\n }\n },\n signedExpiresOn: {\n serializedName: \"SignedExpiry\",\n required: true,\n xmlName: \"SignedExpiry\",\n type: {\n name: \"String\"\n }\n },\n signedService: {\n serializedName: \"SignedService\",\n required: true,\n xmlName: \"SignedService\",\n type: {\n name: \"String\"\n }\n },\n signedVersion: {\n serializedName: \"SignedVersion\",\n required: true,\n xmlName: \"SignedVersion\",\n type: {\n name: \"String\"\n }\n },\n value: {\n serializedName: \"Value\",\n required: true,\n xmlName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst FilterBlobSegment = {\n serializedName: \"FilterBlobSegment\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobSegment\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n where: {\n serializedName: \"Where\",\n required: true,\n xmlName: \"Where\",\n type: {\n name: \"String\"\n }\n },\n blobs: {\n serializedName: \"Blobs\",\n required: true,\n xmlName: \"Blobs\",\n xmlIsWrapped: true,\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst FilterBlobItem = {\n serializedName: \"FilterBlobItem\",\n xmlName: \"Blob\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n tags: {\n serializedName: \"Tags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n }\n }\n }\n};\nconst BlobTags = {\n serializedName: \"BlobTags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\",\n modelProperties: {\n blobTagSet: {\n serializedName: \"BlobTagSet\",\n required: true,\n xmlName: \"TagSet\",\n xmlIsWrapped: true,\n xmlElementName: \"Tag\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobTag\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobTag = {\n serializedName: \"BlobTag\",\n xmlName: \"Tag\",\n type: {\n name: \"Composite\",\n className: \"BlobTag\",\n modelProperties: {\n key: {\n serializedName: \"Key\",\n required: true,\n xmlName: \"Key\",\n type: {\n name: \"String\"\n }\n },\n value: {\n serializedName: \"Value\",\n required: true,\n xmlName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst SignedIdentifier = {\n serializedName: \"SignedIdentifier\",\n xmlName: \"SignedIdentifier\",\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\",\n modelProperties: {\n id: {\n serializedName: \"Id\",\n required: true,\n xmlName: \"Id\",\n type: {\n name: \"String\"\n }\n },\n accessPolicy: {\n serializedName: \"AccessPolicy\",\n xmlName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\"\n }\n }\n }\n }\n};\nconst AccessPolicy = {\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\",\n modelProperties: {\n startsOn: {\n serializedName: \"Start\",\n xmlName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry\",\n xmlName: \"Expiry\",\n type: {\n name: \"String\"\n }\n },\n permissions: {\n serializedName: \"Permission\",\n xmlName: \"Permission\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ListBlobsFlatSegmentResponse = {\n serializedName: \"ListBlobsFlatSegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsFlatSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n segment: {\n serializedName: \"Segment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\"\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobFlatListSegment = {\n serializedName: \"BlobFlatListSegment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\",\n modelProperties: {\n blobItems: {\n serializedName: \"BlobItems\",\n required: true,\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobItemInternal = {\n serializedName: \"BlobItemInternal\",\n xmlName: \"Blob\",\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"Composite\",\n className: \"BlobName\"\n }\n },\n deleted: {\n serializedName: \"Deleted\",\n required: true,\n xmlName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n snapshot: {\n serializedName: \"Snapshot\",\n required: true,\n xmlName: \"Snapshot\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"VersionId\",\n xmlName: \"VersionId\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"IsCurrentVersion\",\n xmlName: \"IsCurrentVersion\",\n type: {\n name: \"Boolean\"\n }\n },\n properties: {\n serializedName: \"Properties\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\"\n }\n },\n metadata: {\n serializedName: \"Metadata\",\n xmlName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n blobTags: {\n serializedName: \"BlobTags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n },\n objectReplicationMetadata: {\n serializedName: \"ObjectReplicationMetadata\",\n xmlName: \"OrMetadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n hasVersionsOnly: {\n serializedName: \"HasVersionsOnly\",\n xmlName: \"HasVersionsOnly\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst BlobName = {\n serializedName: \"BlobName\",\n type: {\n name: \"Composite\",\n className: \"BlobName\",\n modelProperties: {\n encoded: {\n serializedName: \"Encoded\",\n xmlName: \"Encoded\",\n xmlIsAttribute: true,\n type: {\n name: \"Boolean\"\n }\n },\n content: {\n serializedName: \"content\",\n xmlName: \"content\",\n xmlIsMsText: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobPropertiesInternal = {\n serializedName: \"BlobPropertiesInternal\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\",\n modelProperties: {\n createdOn: {\n serializedName: \"Creation-Time\",\n xmlName: \"Creation-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n lastModified: {\n serializedName: \"Last-Modified\",\n required: true,\n xmlName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"Etag\",\n required: true,\n xmlName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"Content-Length\",\n xmlName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"Content-Type\",\n xmlName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n serializedName: \"Content-Encoding\",\n xmlName: \"Content-Encoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"Content-Language\",\n xmlName: \"Content-Language\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"Content-MD5\",\n xmlName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentDisposition: {\n serializedName: \"Content-Disposition\",\n xmlName: \"Content-Disposition\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"Cache-Control\",\n xmlName: \"Cache-Control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"BlobType\",\n xmlName: \"BlobType\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n leaseStatus: {\n serializedName: \"LeaseStatus\",\n xmlName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n leaseState: {\n serializedName: \"LeaseState\",\n xmlName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"LeaseDuration\",\n xmlName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n copyId: {\n serializedName: \"CopyId\",\n xmlName: \"CopyId\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"CopyStatus\",\n xmlName: \"CopyStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n copySource: {\n serializedName: \"CopySource\",\n xmlName: \"CopySource\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"CopyProgress\",\n xmlName: \"CopyProgress\",\n type: {\n name: \"String\"\n }\n },\n copyCompletedOn: {\n serializedName: \"CopyCompletionTime\",\n xmlName: \"CopyCompletionTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"CopyStatusDescription\",\n xmlName: \"CopyStatusDescription\",\n type: {\n name: \"String\"\n }\n },\n serverEncrypted: {\n serializedName: \"ServerEncrypted\",\n xmlName: \"ServerEncrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n incrementalCopy: {\n serializedName: \"IncrementalCopy\",\n xmlName: \"IncrementalCopy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"DestinationSnapshot\",\n xmlName: \"DestinationSnapshot\",\n type: {\n name: \"String\"\n }\n },\n deletedOn: {\n serializedName: \"DeletedTime\",\n xmlName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n serializedName: \"RemainingRetentionDays\",\n xmlName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n accessTier: {\n serializedName: \"AccessTier\",\n xmlName: \"AccessTier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\",\n \"Cold\"\n ]\n }\n },\n accessTierInferred: {\n serializedName: \"AccessTierInferred\",\n xmlName: \"AccessTierInferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"ArchiveStatus\",\n xmlName: \"ArchiveStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"rehydrate-pending-to-hot\",\n \"rehydrate-pending-to-cool\"\n ]\n }\n },\n customerProvidedKeySha256: {\n serializedName: \"CustomerProvidedKeySha256\",\n xmlName: \"CustomerProvidedKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"EncryptionScope\",\n xmlName: \"EncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"AccessTierChangeTime\",\n xmlName: \"AccessTierChangeTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n tagCount: {\n serializedName: \"TagCount\",\n xmlName: \"TagCount\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry-Time\",\n xmlName: \"Expiry-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"Sealed\",\n xmlName: \"Sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"RehydratePriority\",\n xmlName: \"RehydratePriority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n },\n lastAccessedOn: {\n serializedName: \"LastAccessTime\",\n xmlName: \"LastAccessTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"ImmutabilityPolicyUntilDate\",\n xmlName: \"ImmutabilityPolicyUntilDate\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"ImmutabilityPolicyMode\",\n xmlName: \"ImmutabilityPolicyMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"LegalHold\",\n xmlName: \"LegalHold\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst ListBlobsHierarchySegmentResponse = {\n serializedName: \"ListBlobsHierarchySegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsHierarchySegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n delimiter: {\n serializedName: \"Delimiter\",\n xmlName: \"Delimiter\",\n type: {\n name: \"String\"\n }\n },\n segment: {\n serializedName: \"Segment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\"\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobHierarchyListSegment = {\n serializedName: \"BlobHierarchyListSegment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\",\n modelProperties: {\n blobPrefixes: {\n serializedName: \"BlobPrefixes\",\n xmlName: \"BlobPrefixes\",\n xmlElementName: \"BlobPrefix\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\"\n }\n }\n }\n },\n blobItems: {\n serializedName: \"BlobItems\",\n required: true,\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobPrefix = {\n serializedName: \"BlobPrefix\",\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"Composite\",\n className: \"BlobName\"\n }\n }\n }\n }\n};\nconst BlockLookupList = {\n serializedName: \"BlockLookupList\",\n xmlName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockLookupList\",\n modelProperties: {\n committed: {\n serializedName: \"Committed\",\n xmlName: \"Committed\",\n xmlElementName: \"Committed\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n uncommitted: {\n serializedName: \"Uncommitted\",\n xmlName: \"Uncommitted\",\n xmlElementName: \"Uncommitted\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n latest: {\n serializedName: \"Latest\",\n xmlName: \"Latest\",\n xmlElementName: \"Latest\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\nconst BlockList = {\n serializedName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockList\",\n modelProperties: {\n committedBlocks: {\n serializedName: \"CommittedBlocks\",\n xmlName: \"CommittedBlocks\",\n xmlIsWrapped: true,\n xmlElementName: \"Block\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n },\n uncommittedBlocks: {\n serializedName: \"UncommittedBlocks\",\n xmlName: \"UncommittedBlocks\",\n xmlIsWrapped: true,\n xmlElementName: \"Block\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n }\n }\n }\n};\nconst Block = {\n serializedName: \"Block\",\n type: {\n name: \"Composite\",\n className: \"Block\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n size: {\n serializedName: \"Size\",\n required: true,\n xmlName: \"Size\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst PageList = {\n serializedName: \"PageList\",\n type: {\n name: \"Composite\",\n className: \"PageList\",\n modelProperties: {\n pageRange: {\n serializedName: \"PageRange\",\n xmlName: \"PageRange\",\n xmlElementName: \"PageRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"PageRange\"\n }\n }\n }\n },\n clearRange: {\n serializedName: \"ClearRange\",\n xmlName: \"ClearRange\",\n xmlElementName: \"ClearRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ClearRange\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageRange = {\n serializedName: \"PageRange\",\n xmlName: \"PageRange\",\n type: {\n name: \"Composite\",\n className: \"PageRange\",\n modelProperties: {\n start: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n serializedName: \"End\",\n required: true,\n xmlName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst ClearRange = {\n serializedName: \"ClearRange\",\n xmlName: \"ClearRange\",\n type: {\n name: \"Composite\",\n className: \"ClearRange\",\n modelProperties: {\n start: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n serializedName: \"End\",\n required: true,\n xmlName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst QueryRequest = {\n serializedName: \"QueryRequest\",\n xmlName: \"QueryRequest\",\n type: {\n name: \"Composite\",\n className: \"QueryRequest\",\n modelProperties: {\n queryType: {\n serializedName: \"QueryType\",\n required: true,\n xmlName: \"QueryType\",\n type: {\n name: \"String\"\n }\n },\n expression: {\n serializedName: \"Expression\",\n required: true,\n xmlName: \"Expression\",\n type: {\n name: \"String\"\n }\n },\n inputSerialization: {\n serializedName: \"InputSerialization\",\n xmlName: \"InputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n },\n outputSerialization: {\n serializedName: \"OutputSerialization\",\n xmlName: \"OutputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n }\n }\n }\n};\nconst QuerySerialization = {\n serializedName: \"QuerySerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\",\n modelProperties: {\n format: {\n serializedName: \"Format\",\n xmlName: \"Format\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\"\n }\n }\n }\n }\n};\nconst QueryFormat = {\n serializedName: \"QueryFormat\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\",\n modelProperties: {\n type: {\n serializedName: \"Type\",\n required: true,\n xmlName: \"Type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"delimited\", \"json\", \"arrow\", \"parquet\"]\n }\n },\n delimitedTextConfiguration: {\n serializedName: \"DelimitedTextConfiguration\",\n xmlName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\"\n }\n },\n jsonTextConfiguration: {\n serializedName: \"JsonTextConfiguration\",\n xmlName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\"\n }\n },\n arrowConfiguration: {\n serializedName: \"ArrowConfiguration\",\n xmlName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\"\n }\n },\n parquetTextConfiguration: {\n serializedName: \"ParquetTextConfiguration\",\n xmlName: \"ParquetTextConfiguration\",\n type: {\n name: \"any\"\n }\n }\n }\n }\n};\nconst DelimitedTextConfiguration = {\n serializedName: \"DelimitedTextConfiguration\",\n xmlName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\",\n modelProperties: {\n columnSeparator: {\n serializedName: \"ColumnSeparator\",\n xmlName: \"ColumnSeparator\",\n type: {\n name: \"String\"\n }\n },\n fieldQuote: {\n serializedName: \"FieldQuote\",\n xmlName: \"FieldQuote\",\n type: {\n name: \"String\"\n }\n },\n recordSeparator: {\n serializedName: \"RecordSeparator\",\n xmlName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n },\n escapeChar: {\n serializedName: \"EscapeChar\",\n xmlName: \"EscapeChar\",\n type: {\n name: \"String\"\n }\n },\n headersPresent: {\n serializedName: \"HeadersPresent\",\n xmlName: \"HasHeaders\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst JsonTextConfiguration = {\n serializedName: \"JsonTextConfiguration\",\n xmlName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\",\n modelProperties: {\n recordSeparator: {\n serializedName: \"RecordSeparator\",\n xmlName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ArrowConfiguration = {\n serializedName: \"ArrowConfiguration\",\n xmlName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\",\n modelProperties: {\n schema: {\n serializedName: \"Schema\",\n required: true,\n xmlName: \"Schema\",\n xmlIsWrapped: true,\n xmlElementName: \"Field\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ArrowField\"\n }\n }\n }\n }\n }\n }\n};\nconst ArrowField = {\n serializedName: \"ArrowField\",\n xmlName: \"Field\",\n type: {\n name: \"Composite\",\n className: \"ArrowField\",\n modelProperties: {\n type: {\n serializedName: \"Type\",\n required: true,\n xmlName: \"Type\",\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n precision: {\n serializedName: \"Precision\",\n xmlName: \"Precision\",\n type: {\n name: \"Number\"\n }\n },\n scale: {\n serializedName: \"Scale\",\n xmlName: \"Scale\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst ServiceSetPropertiesHeaders = {\n serializedName: \"Service_setPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSetPropertiesExceptionHeaders = {\n serializedName: \"Service_setPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetPropertiesHeaders = {\n serializedName: \"Service_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetPropertiesExceptionHeaders = {\n serializedName: \"Service_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetStatisticsHeaders = {\n serializedName: \"Service_getStatisticsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetStatisticsExceptionHeaders = {\n serializedName: \"Service_getStatisticsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceListContainersSegmentHeaders = {\n serializedName: \"Service_listContainersSegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceListContainersSegmentExceptionHeaders = {\n serializedName: \"Service_listContainersSegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetUserDelegationKeyHeaders = {\n serializedName: \"Service_getUserDelegationKeyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetUserDelegationKeyExceptionHeaders = {\n serializedName: \"Service_getUserDelegationKeyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetAccountInfoHeaders = {\n serializedName: \"Service_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n isHierarchicalNamespaceEnabled: {\n serializedName: \"x-ms-is-hns-enabled\",\n xmlName: \"x-ms-is-hns-enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetAccountInfoExceptionHeaders = {\n serializedName: \"Service_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSubmitBatchHeaders = {\n serializedName: \"Service_submitBatchHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSubmitBatchExceptionHeaders = {\n serializedName: \"Service_submitBatchExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceFilterBlobsHeaders = {\n serializedName: \"Service_filterBlobsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceFilterBlobsExceptionHeaders = {\n serializedName: \"Service_filterBlobsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerCreateHeaders = {\n serializedName: \"Container_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerCreateExceptionHeaders = {\n serializedName: \"Container_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetPropertiesHeaders = {\n serializedName: \"Container_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesHeaders\",\n modelProperties: {\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"x-ms-has-immutability-policy\",\n xmlName: \"x-ms-has-immutability-policy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"x-ms-has-legal-hold\",\n xmlName: \"x-ms-has-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"x-ms-default-encryption-scope\",\n xmlName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n denyEncryptionScopeOverride: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n xmlName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n },\n isImmutableStorageWithVersioningEnabled: {\n serializedName: \"x-ms-immutable-storage-with-versioning-enabled\",\n xmlName: \"x-ms-immutable-storage-with-versioning-enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetPropertiesExceptionHeaders = {\n serializedName: \"Container_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerDeleteHeaders = {\n serializedName: \"Container_deleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerDeleteExceptionHeaders = {\n serializedName: \"Container_deleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetMetadataHeaders = {\n serializedName: \"Container_setMetadataHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetMetadataExceptionHeaders = {\n serializedName: \"Container_setMetadataExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccessPolicyHeaders = {\n serializedName: \"Container_getAccessPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyHeaders\",\n modelProperties: {\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccessPolicyExceptionHeaders = {\n serializedName: \"Container_getAccessPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetAccessPolicyHeaders = {\n serializedName: \"Container_setAccessPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetAccessPolicyExceptionHeaders = {\n serializedName: \"Container_setAccessPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRestoreHeaders = {\n serializedName: \"Container_restoreHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRestoreExceptionHeaders = {\n serializedName: \"Container_restoreExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenameHeaders = {\n serializedName: \"Container_renameHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenameHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenameExceptionHeaders = {\n serializedName: \"Container_renameExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenameExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSubmitBatchHeaders = {\n serializedName: \"Container_submitBatchHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSubmitBatchExceptionHeaders = {\n serializedName: \"Container_submitBatchExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSubmitBatchExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerFilterBlobsHeaders = {\n serializedName: \"Container_filterBlobsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerFilterBlobsExceptionHeaders = {\n serializedName: \"Container_filterBlobsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerFilterBlobsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerAcquireLeaseHeaders = {\n serializedName: \"Container_acquireLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerAcquireLeaseExceptionHeaders = {\n serializedName: \"Container_acquireLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerReleaseLeaseHeaders = {\n serializedName: \"Container_releaseLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerReleaseLeaseExceptionHeaders = {\n serializedName: \"Container_releaseLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenewLeaseHeaders = {\n serializedName: \"Container_renewLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerRenewLeaseExceptionHeaders = {\n serializedName: \"Container_renewLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerBreakLeaseHeaders = {\n serializedName: \"Container_breakLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n xmlName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerBreakLeaseExceptionHeaders = {\n serializedName: \"Container_breakLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerChangeLeaseHeaders = {\n serializedName: \"Container_changeLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerChangeLeaseExceptionHeaders = {\n serializedName: \"Container_changeLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobFlatSegmentHeaders = {\n serializedName: \"Container_listBlobFlatSegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobFlatSegmentExceptionHeaders = {\n serializedName: \"Container_listBlobFlatSegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobHierarchySegmentHeaders = {\n serializedName: \"Container_listBlobHierarchySegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobHierarchySegmentExceptionHeaders = {\n serializedName: \"Container_listBlobHierarchySegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccountInfoHeaders = {\n serializedName: \"Container_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n }\n }\n }\n};\nconst ContainerGetAccountInfoExceptionHeaders = {\n serializedName: \"Container_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDownloadHeaders = {\n serializedName: \"Blob_downloadHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n createdOn: {\n serializedName: \"x-ms-creation-time\",\n xmlName: \"x-ms-creation-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n xmlName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n xmlName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n xmlName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n xmlName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n xmlName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n xmlName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n }\n }\n};\nconst BlobDownloadExceptionHeaders = {\n serializedName: \"Blob_downloadExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetPropertiesHeaders = {\n serializedName: \"Blob_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n createdOn: {\n serializedName: \"x-ms-creation-time\",\n xmlName: \"x-ms-creation-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n xmlName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n xmlName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n isIncrementalCopy: {\n serializedName: \"x-ms-incremental-copy\",\n xmlName: \"x-ms-incremental-copy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"x-ms-copy-destination-snapshot\",\n xmlName: \"x-ms-copy-destination-snapshot\",\n type: {\n name: \"String\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n accessTier: {\n serializedName: \"x-ms-access-tier\",\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n serializedName: \"x-ms-access-tier-inferred\",\n xmlName: \"x-ms-access-tier-inferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"x-ms-archive-status\",\n xmlName: \"x-ms-archive-status\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"x-ms-access-tier-change-time\",\n xmlName: \"x-ms-access-tier-change-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n xmlName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n xmlName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"x-ms-expiry-time\",\n xmlName: \"x-ms-expiry-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"x-ms-rehydrate-priority\",\n xmlName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n xmlName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetPropertiesExceptionHeaders = {\n serializedName: \"Blob_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteHeaders = {\n serializedName: \"Blob_deleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteExceptionHeaders = {\n serializedName: \"Blob_deleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobUndeleteHeaders = {\n serializedName: \"Blob_undeleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobUndeleteExceptionHeaders = {\n serializedName: \"Blob_undeleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetExpiryHeaders = {\n serializedName: \"Blob_setExpiryHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobSetExpiryExceptionHeaders = {\n serializedName: \"Blob_setExpiryExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetHttpHeadersHeaders = {\n serializedName: \"Blob_setHttpHeadersHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHttpHeadersHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetHttpHeadersExceptionHeaders = {\n serializedName: \"Blob_setHttpHeadersExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHttpHeadersExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetImmutabilityPolicyHeaders = {\n serializedName: \"Blob_setImmutabilityPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetImmutabilityPolicyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiry: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n }\n }\n }\n};\nconst BlobSetImmutabilityPolicyExceptionHeaders = {\n serializedName: \"Blob_setImmutabilityPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetImmutabilityPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteImmutabilityPolicyHeaders = {\n serializedName: \"Blob_deleteImmutabilityPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteImmutabilityPolicyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobDeleteImmutabilityPolicyExceptionHeaders = {\n serializedName: \"Blob_deleteImmutabilityPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteImmutabilityPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetLegalHoldHeaders = {\n serializedName: \"Blob_setLegalHoldHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetLegalHoldHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst BlobSetLegalHoldExceptionHeaders = {\n serializedName: \"Blob_setLegalHoldExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetLegalHoldExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetMetadataHeaders = {\n serializedName: \"Blob_setMetadataHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetMetadataExceptionHeaders = {\n serializedName: \"Blob_setMetadataExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAcquireLeaseHeaders = {\n serializedName: \"Blob_acquireLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobAcquireLeaseExceptionHeaders = {\n serializedName: \"Blob_acquireLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobReleaseLeaseHeaders = {\n serializedName: \"Blob_releaseLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobReleaseLeaseExceptionHeaders = {\n serializedName: \"Blob_releaseLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobRenewLeaseHeaders = {\n serializedName: \"Blob_renewLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobRenewLeaseExceptionHeaders = {\n serializedName: \"Blob_renewLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobChangeLeaseHeaders = {\n serializedName: \"Blob_changeLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobChangeLeaseExceptionHeaders = {\n serializedName: \"Blob_changeLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobBreakLeaseHeaders = {\n serializedName: \"Blob_breakLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n xmlName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobBreakLeaseExceptionHeaders = {\n serializedName: \"Blob_breakLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCreateSnapshotHeaders = {\n serializedName: \"Blob_createSnapshotHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotHeaders\",\n modelProperties: {\n snapshot: {\n serializedName: \"x-ms-snapshot\",\n xmlName: \"x-ms-snapshot\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCreateSnapshotExceptionHeaders = {\n serializedName: \"Blob_createSnapshotExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobStartCopyFromURLHeaders = {\n serializedName: \"Blob_startCopyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobStartCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_startCopyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCopyFromURLHeaders = {\n serializedName: \"Blob_copyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n defaultValue: \"success\",\n isConstant: true,\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_copyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAbortCopyFromURLHeaders = {\n serializedName: \"Blob_abortCopyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAbortCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_abortCopyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTierHeaders = {\n serializedName: \"Blob_setTierHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTierExceptionHeaders = {\n serializedName: \"Blob_setTierExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetAccountInfoHeaders = {\n serializedName: \"Blob_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n }\n }\n }\n};\nconst BlobGetAccountInfoExceptionHeaders = {\n serializedName: \"Blob_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobQueryHeaders = {\n serializedName: \"Blob_queryHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n xmlName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletionTime: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n }\n }\n};\nconst BlobQueryExceptionHeaders = {\n serializedName: \"Blob_queryExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetTagsHeaders = {\n serializedName: \"Blob_getTagsHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetTagsExceptionHeaders = {\n serializedName: \"Blob_getTagsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTagsHeaders = {\n serializedName: \"Blob_setTagsHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTagsExceptionHeaders = {\n serializedName: \"Blob_setTagsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCreateHeaders = {\n serializedName: \"PageBlob_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCreateExceptionHeaders = {\n serializedName: \"PageBlob_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesHeaders = {\n serializedName: \"PageBlob_uploadPagesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesExceptionHeaders = {\n serializedName: \"PageBlob_uploadPagesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobClearPagesHeaders = {\n serializedName: \"PageBlob_clearPagesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobClearPagesExceptionHeaders = {\n serializedName: \"PageBlob_clearPagesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesFromURLHeaders = {\n serializedName: \"PageBlob_uploadPagesFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesFromURLExceptionHeaders = {\n serializedName: \"PageBlob_uploadPagesFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesHeaders = {\n serializedName: \"PageBlob_getPageRangesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesExceptionHeaders = {\n serializedName: \"PageBlob_getPageRangesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesDiffHeaders = {\n serializedName: \"PageBlob_getPageRangesDiffHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesDiffExceptionHeaders = {\n serializedName: \"PageBlob_getPageRangesDiffExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobResizeHeaders = {\n serializedName: \"PageBlob_resizeHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobResizeExceptionHeaders = {\n serializedName: \"PageBlob_resizeExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUpdateSequenceNumberHeaders = {\n serializedName: \"PageBlob_updateSequenceNumberHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUpdateSequenceNumberExceptionHeaders = {\n serializedName: \"PageBlob_updateSequenceNumberExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCopyIncrementalHeaders = {\n serializedName: \"PageBlob_copyIncrementalHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCopyIncrementalExceptionHeaders = {\n serializedName: \"PageBlob_copyIncrementalExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobCreateHeaders = {\n serializedName: \"AppendBlob_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobCreateExceptionHeaders = {\n serializedName: \"AppendBlob_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockHeaders = {\n serializedName: \"AppendBlob_appendBlockHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n xmlName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockExceptionHeaders = {\n serializedName: \"AppendBlob_appendBlockExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockFromUrlHeaders = {\n serializedName: \"AppendBlob_appendBlockFromUrlHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n xmlName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockFromUrlExceptionHeaders = {\n serializedName: \"AppendBlob_appendBlockFromUrlExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobSealHeaders = {\n serializedName: \"AppendBlob_sealHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst AppendBlobSealExceptionHeaders = {\n serializedName: \"AppendBlob_sealExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobUploadHeaders = {\n serializedName: \"BlockBlob_uploadHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobUploadExceptionHeaders = {\n serializedName: \"BlockBlob_uploadExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobPutBlobFromUrlHeaders = {\n serializedName: \"BlockBlob_putBlobFromUrlHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobPutBlobFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobPutBlobFromUrlExceptionHeaders = {\n serializedName: \"BlockBlob_putBlobFromUrlExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobPutBlobFromUrlExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockHeaders = {\n serializedName: \"BlockBlob_stageBlockHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockExceptionHeaders = {\n serializedName: \"BlockBlob_stageBlockExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockFromURLHeaders = {\n serializedName: \"BlockBlob_stageBlockFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockFromURLExceptionHeaders = {\n serializedName: \"BlockBlob_stageBlockFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobCommitBlockListHeaders = {\n serializedName: \"BlockBlob_commitBlockListHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobCommitBlockListExceptionHeaders = {\n serializedName: \"BlockBlob_commitBlockListExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobGetBlockListHeaders = {\n serializedName: \"BlockBlob_getBlockListHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobGetBlockListExceptionHeaders = {\n serializedName: \"BlockBlob_getBlockListExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nvar Mappers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n BlobServiceProperties: BlobServiceProperties,\n Logging: Logging,\n RetentionPolicy: RetentionPolicy,\n Metrics: Metrics,\n CorsRule: CorsRule,\n StaticWebsite: StaticWebsite,\n StorageError: StorageError,\n BlobServiceStatistics: BlobServiceStatistics,\n GeoReplication: GeoReplication,\n ListContainersSegmentResponse: ListContainersSegmentResponse,\n ContainerItem: ContainerItem,\n ContainerProperties: ContainerProperties,\n KeyInfo: KeyInfo,\n UserDelegationKey: UserDelegationKey,\n FilterBlobSegment: FilterBlobSegment,\n FilterBlobItem: FilterBlobItem,\n BlobTags: BlobTags,\n BlobTag: BlobTag,\n SignedIdentifier: SignedIdentifier,\n AccessPolicy: AccessPolicy,\n ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,\n BlobFlatListSegment: BlobFlatListSegment,\n BlobItemInternal: BlobItemInternal,\n BlobName: BlobName,\n BlobPropertiesInternal: BlobPropertiesInternal,\n ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,\n BlobHierarchyListSegment: BlobHierarchyListSegment,\n BlobPrefix: BlobPrefix,\n BlockLookupList: BlockLookupList,\n BlockList: BlockList,\n Block: Block,\n PageList: PageList,\n PageRange: PageRange,\n ClearRange: ClearRange,\n QueryRequest: QueryRequest,\n QuerySerialization: QuerySerialization,\n QueryFormat: QueryFormat,\n DelimitedTextConfiguration: DelimitedTextConfiguration,\n JsonTextConfiguration: JsonTextConfiguration,\n ArrowConfiguration: ArrowConfiguration,\n ArrowField: ArrowField,\n ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,\n ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,\n ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,\n ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,\n ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,\n ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,\n ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,\n ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,\n ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,\n ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,\n ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,\n ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,\n ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,\n ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,\n ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,\n ContainerCreateHeaders: ContainerCreateHeaders,\n ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,\n ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,\n ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,\n ContainerDeleteHeaders: ContainerDeleteHeaders,\n ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,\n ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,\n ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,\n ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,\n ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,\n ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,\n ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,\n ContainerRestoreHeaders: ContainerRestoreHeaders,\n ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,\n ContainerRenameHeaders: ContainerRenameHeaders,\n ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,\n ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,\n ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,\n ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,\n ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,\n ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,\n ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,\n ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,\n ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,\n ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,\n ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,\n ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,\n ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,\n ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,\n ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,\n ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,\n ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,\n ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,\n ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,\n ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,\n BlobDownloadHeaders: BlobDownloadHeaders,\n BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,\n BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,\n BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,\n BlobDeleteHeaders: BlobDeleteHeaders,\n BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,\n BlobUndeleteHeaders: BlobUndeleteHeaders,\n BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,\n BlobSetExpiryHeaders: BlobSetExpiryHeaders,\n BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,\n BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,\n BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,\n BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,\n BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,\n BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,\n BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,\n BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,\n BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,\n BlobSetMetadataHeaders: BlobSetMetadataHeaders,\n BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,\n BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,\n BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,\n BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,\n BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,\n BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,\n BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,\n BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,\n BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,\n BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,\n BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,\n BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,\n BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,\n BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,\n BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,\n BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,\n BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,\n BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,\n BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,\n BlobSetTierHeaders: BlobSetTierHeaders,\n BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,\n BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,\n BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,\n BlobQueryHeaders: BlobQueryHeaders,\n BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,\n BlobGetTagsHeaders: BlobGetTagsHeaders,\n BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,\n BlobSetTagsHeaders: BlobSetTagsHeaders,\n BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,\n PageBlobCreateHeaders: PageBlobCreateHeaders,\n PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,\n PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,\n PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,\n PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,\n PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,\n PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,\n PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,\n PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,\n PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,\n PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,\n PageBlobResizeHeaders: PageBlobResizeHeaders,\n PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,\n PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,\n PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,\n PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,\n PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,\n AppendBlobCreateHeaders: AppendBlobCreateHeaders,\n AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,\n AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,\n AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,\n AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,\n AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,\n AppendBlobSealHeaders: AppendBlobSealHeaders,\n AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,\n BlockBlobUploadHeaders: BlockBlobUploadHeaders,\n BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,\n BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,\n BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,\n BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,\n BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,\n BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,\n BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,\n BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,\n BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,\n BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,\n BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders\n});\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst contentType = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobServiceProperties = {\n parameterPath: \"blobServiceProperties\",\n mapper: BlobServiceProperties\n};\nconst accept = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst url = {\n parameterPath: \"url\",\n mapper: {\n serializedName: \"url\",\n required: true,\n xmlName: \"url\",\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nconst restype = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"service\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"properties\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst timeoutInSeconds = {\n parameterPath: [\"options\", \"timeoutInSeconds\"],\n mapper: {\n constraints: {\n InclusiveMinimum: 0\n },\n serializedName: \"timeout\",\n xmlName: \"timeout\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst version = {\n parameterPath: \"version\",\n mapper: {\n defaultValue: \"2022-11-02\",\n isConstant: true,\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n }\n};\nconst requestId = {\n parameterPath: [\"options\", \"requestId\"],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst accept1 = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp1 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"stats\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp2 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"list\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prefix = {\n parameterPath: [\"options\", \"prefix\"],\n mapper: {\n serializedName: \"prefix\",\n xmlName: \"prefix\",\n type: {\n name: \"String\"\n }\n }\n};\nconst marker = {\n parameterPath: [\"options\", \"marker\"],\n mapper: {\n serializedName: \"marker\",\n xmlName: \"marker\",\n type: {\n name: \"String\"\n }\n }\n};\nconst maxPageSize = {\n parameterPath: [\"options\", \"maxPageSize\"],\n mapper: {\n constraints: {\n InclusiveMinimum: 1\n },\n serializedName: \"maxresults\",\n xmlName: \"maxresults\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst include = {\n parameterPath: [\"options\", \"include\"],\n mapper: {\n serializedName: \"include\",\n xmlName: \"include\",\n xmlElementName: \"ListContainersIncludeType\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\"metadata\", \"deleted\", \"system\"]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nconst keyInfo = {\n parameterPath: \"keyInfo\",\n mapper: KeyInfo\n};\nconst comp3 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"userdelegationkey\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst restype1 = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"account\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst body = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n xmlName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n};\nconst comp4 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"batch\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst contentLength = {\n parameterPath: \"contentLength\",\n mapper: {\n serializedName: \"Content-Length\",\n required: true,\n xmlName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst multipartContentType = {\n parameterPath: \"multipartContentType\",\n mapper: {\n serializedName: \"Content-Type\",\n required: true,\n xmlName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp5 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"blobs\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst where = {\n parameterPath: [\"options\", \"where\"],\n mapper: {\n serializedName: \"where\",\n xmlName: \"where\",\n type: {\n name: \"String\"\n }\n }\n};\nconst restype2 = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"container\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst metadata = {\n parameterPath: [\"options\", \"metadata\"],\n mapper: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n }\n};\nconst access = {\n parameterPath: [\"options\", \"access\"],\n mapper: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n }\n};\nconst defaultEncryptionScope = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"defaultEncryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-default-encryption-scope\",\n xmlName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nconst preventEncryptionScopeOverride = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"preventEncryptionScopeOverride\"\n ],\n mapper: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n xmlName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst leaseId = {\n parameterPath: [\"options\", \"leaseAccessConditions\", \"leaseId\"],\n mapper: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifModifiedSince = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifModifiedSince\"],\n mapper: {\n serializedName: \"If-Modified-Since\",\n xmlName: \"If-Modified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst ifUnmodifiedSince = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifUnmodifiedSince\"],\n mapper: {\n serializedName: \"If-Unmodified-Since\",\n xmlName: \"If-Unmodified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst comp6 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"metadata\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp7 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"acl\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst containerAcl = {\n parameterPath: [\"options\", \"containerAcl\"],\n mapper: {\n serializedName: \"containerAcl\",\n xmlName: \"SignedIdentifiers\",\n xmlIsWrapped: true,\n xmlElementName: \"SignedIdentifier\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n }\n};\nconst comp8 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"undelete\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deletedContainerName = {\n parameterPath: [\"options\", \"deletedContainerName\"],\n mapper: {\n serializedName: \"x-ms-deleted-container-name\",\n xmlName: \"x-ms-deleted-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deletedContainerVersion = {\n parameterPath: [\"options\", \"deletedContainerVersion\"],\n mapper: {\n serializedName: \"x-ms-deleted-container-version\",\n xmlName: \"x-ms-deleted-container-version\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp9 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"rename\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContainerName = {\n parameterPath: \"sourceContainerName\",\n mapper: {\n serializedName: \"x-ms-source-container-name\",\n required: true,\n xmlName: \"x-ms-source-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceLeaseId = {\n parameterPath: [\"options\", \"sourceLeaseId\"],\n mapper: {\n serializedName: \"x-ms-source-lease-id\",\n xmlName: \"x-ms-source-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp10 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"lease\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"acquire\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst duration = {\n parameterPath: [\"options\", \"duration\"],\n mapper: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst proposedLeaseId = {\n parameterPath: [\"options\", \"proposedLeaseId\"],\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n xmlName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action1 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"release\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst leaseId1 = {\n parameterPath: \"leaseId\",\n mapper: {\n serializedName: \"x-ms-lease-id\",\n required: true,\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action2 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"renew\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action3 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"break\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst breakPeriod = {\n parameterPath: [\"options\", \"breakPeriod\"],\n mapper: {\n serializedName: \"x-ms-lease-break-period\",\n xmlName: \"x-ms-lease-break-period\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst action4 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"change\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst proposedLeaseId1 = {\n parameterPath: \"proposedLeaseId\",\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n required: true,\n xmlName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst include1 = {\n parameterPath: [\"options\", \"include\"],\n mapper: {\n serializedName: \"include\",\n xmlName: \"include\",\n xmlElementName: \"ListBlobsIncludeItem\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"copy\",\n \"deleted\",\n \"metadata\",\n \"snapshots\",\n \"uncommittedblobs\",\n \"versions\",\n \"tags\",\n \"immutabilitypolicy\",\n \"legalhold\",\n \"deletedwithversions\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nconst delimiter = {\n parameterPath: \"delimiter\",\n mapper: {\n serializedName: \"delimiter\",\n required: true,\n xmlName: \"delimiter\",\n type: {\n name: \"String\"\n }\n }\n};\nconst snapshot = {\n parameterPath: [\"options\", \"snapshot\"],\n mapper: {\n serializedName: \"snapshot\",\n xmlName: \"snapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nconst versionId = {\n parameterPath: [\"options\", \"versionId\"],\n mapper: {\n serializedName: \"versionid\",\n xmlName: \"versionid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst range = {\n parameterPath: [\"options\", \"range\"],\n mapper: {\n serializedName: \"x-ms-range\",\n xmlName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst rangeGetContentMD5 = {\n parameterPath: [\"options\", \"rangeGetContentMD5\"],\n mapper: {\n serializedName: \"x-ms-range-get-content-md5\",\n xmlName: \"x-ms-range-get-content-md5\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst rangeGetContentCRC64 = {\n parameterPath: [\"options\", \"rangeGetContentCRC64\"],\n mapper: {\n serializedName: \"x-ms-range-get-content-crc64\",\n xmlName: \"x-ms-range-get-content-crc64\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst encryptionKey = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionKey\"],\n mapper: {\n serializedName: \"x-ms-encryption-key\",\n xmlName: \"x-ms-encryption-key\",\n type: {\n name: \"String\"\n }\n }\n};\nconst encryptionKeySha256 = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionKeySha256\"],\n mapper: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n }\n};\nconst encryptionAlgorithm = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionAlgorithm\"],\n mapper: {\n serializedName: \"x-ms-encryption-algorithm\",\n xmlName: \"x-ms-encryption-algorithm\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifMatch = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifMatch\"],\n mapper: {\n serializedName: \"If-Match\",\n xmlName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifNoneMatch = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifNoneMatch\"],\n mapper: {\n serializedName: \"If-None-Match\",\n xmlName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifTags = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifTags\"],\n mapper: {\n serializedName: \"x-ms-if-tags\",\n xmlName: \"x-ms-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deleteSnapshots = {\n parameterPath: [\"options\", \"deleteSnapshots\"],\n mapper: {\n serializedName: \"x-ms-delete-snapshots\",\n xmlName: \"x-ms-delete-snapshots\",\n type: {\n name: \"Enum\",\n allowedValues: [\"include\", \"only\"]\n }\n }\n};\nconst blobDeleteType = {\n parameterPath: [\"options\", \"blobDeleteType\"],\n mapper: {\n serializedName: \"deletetype\",\n xmlName: \"deletetype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp11 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"expiry\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst expiryOptions = {\n parameterPath: \"expiryOptions\",\n mapper: {\n serializedName: \"x-ms-expiry-option\",\n required: true,\n xmlName: \"x-ms-expiry-option\",\n type: {\n name: \"String\"\n }\n }\n};\nconst expiresOn = {\n parameterPath: [\"options\", \"expiresOn\"],\n mapper: {\n serializedName: \"x-ms-expiry-time\",\n xmlName: \"x-ms-expiry-time\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobCacheControl = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobCacheControl\"],\n mapper: {\n serializedName: \"x-ms-blob-cache-control\",\n xmlName: \"x-ms-blob-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentType = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentType\"],\n mapper: {\n serializedName: \"x-ms-blob-content-type\",\n xmlName: \"x-ms-blob-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentMD5 = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentMD5\"],\n mapper: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst blobContentEncoding = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentEncoding\"],\n mapper: {\n serializedName: \"x-ms-blob-content-encoding\",\n xmlName: \"x-ms-blob-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentLanguage = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentLanguage\"],\n mapper: {\n serializedName: \"x-ms-blob-content-language\",\n xmlName: \"x-ms-blob-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentDisposition = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentDisposition\"],\n mapper: {\n serializedName: \"x-ms-blob-content-disposition\",\n xmlName: \"x-ms-blob-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp12 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"immutabilityPolicies\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst immutabilityPolicyExpiry = {\n parameterPath: [\"options\", \"immutabilityPolicyExpiry\"],\n mapper: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst immutabilityPolicyMode = {\n parameterPath: [\"options\", \"immutabilityPolicyMode\"],\n mapper: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n }\n};\nconst comp13 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"legalhold\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst legalHold = {\n parameterPath: \"legalHold\",\n mapper: {\n serializedName: \"x-ms-legal-hold\",\n required: true,\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst encryptionScope = {\n parameterPath: [\"options\", \"encryptionScope\"],\n mapper: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp14 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"snapshot\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tier = {\n parameterPath: [\"options\", \"tier\"],\n mapper: {\n serializedName: \"x-ms-access-tier\",\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\",\n \"Cold\"\n ]\n }\n }\n};\nconst rehydratePriority = {\n parameterPath: [\"options\", \"rehydratePriority\"],\n mapper: {\n serializedName: \"x-ms-rehydrate-priority\",\n xmlName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n }\n};\nconst sourceIfModifiedSince = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfModifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-modified-since\",\n xmlName: \"x-ms-source-if-modified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst sourceIfUnmodifiedSince = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-unmodified-since\",\n xmlName: \"x-ms-source-if-unmodified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst sourceIfMatch = {\n parameterPath: [\"options\", \"sourceModifiedAccessConditions\", \"sourceIfMatch\"],\n mapper: {\n serializedName: \"x-ms-source-if-match\",\n xmlName: \"x-ms-source-if-match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceIfNoneMatch = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfNoneMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-none-match\",\n xmlName: \"x-ms-source-if-none-match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceIfTags = {\n parameterPath: [\"options\", \"sourceModifiedAccessConditions\", \"sourceIfTags\"],\n mapper: {\n serializedName: \"x-ms-source-if-tags\",\n xmlName: \"x-ms-source-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySource = {\n parameterPath: \"copySource\",\n mapper: {\n serializedName: \"x-ms-copy-source\",\n required: true,\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobTagsString = {\n parameterPath: [\"options\", \"blobTagsString\"],\n mapper: {\n serializedName: \"x-ms-tags\",\n xmlName: \"x-ms-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sealBlob = {\n parameterPath: [\"options\", \"sealBlob\"],\n mapper: {\n serializedName: \"x-ms-seal-blob\",\n xmlName: \"x-ms-seal-blob\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst legalHold1 = {\n parameterPath: [\"options\", \"legalHold\"],\n mapper: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst xMsRequiresSync = {\n parameterPath: \"xMsRequiresSync\",\n mapper: {\n defaultValue: \"true\",\n isConstant: true,\n serializedName: \"x-ms-requires-sync\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContentMD5 = {\n parameterPath: [\"options\", \"sourceContentMD5\"],\n mapper: {\n serializedName: \"x-ms-source-content-md5\",\n xmlName: \"x-ms-source-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst copySourceAuthorization = {\n parameterPath: [\"options\", \"copySourceAuthorization\"],\n mapper: {\n serializedName: \"x-ms-copy-source-authorization\",\n xmlName: \"x-ms-copy-source-authorization\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySourceTags = {\n parameterPath: [\"options\", \"copySourceTags\"],\n mapper: {\n serializedName: \"x-ms-copy-source-tag-option\",\n xmlName: \"x-ms-copy-source-tag-option\",\n type: {\n name: \"Enum\",\n allowedValues: [\"REPLACE\", \"COPY\"]\n }\n }\n};\nconst comp15 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"copy\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copyActionAbortConstant = {\n parameterPath: \"copyActionAbortConstant\",\n mapper: {\n defaultValue: \"abort\",\n isConstant: true,\n serializedName: \"x-ms-copy-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copyId = {\n parameterPath: \"copyId\",\n mapper: {\n serializedName: \"copyid\",\n required: true,\n xmlName: \"copyid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp16 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"tier\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tier1 = {\n parameterPath: \"tier\",\n mapper: {\n serializedName: \"x-ms-access-tier\",\n required: true,\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\",\n \"Cold\"\n ]\n }\n }\n};\nconst queryRequest = {\n parameterPath: [\"options\", \"queryRequest\"],\n mapper: QueryRequest\n};\nconst comp17 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"query\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp18 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"tags\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tags = {\n parameterPath: [\"options\", \"tags\"],\n mapper: BlobTags\n};\nconst transactionalContentMD5 = {\n parameterPath: [\"options\", \"transactionalContentMD5\"],\n mapper: {\n serializedName: \"Content-MD5\",\n xmlName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst transactionalContentCrc64 = {\n parameterPath: [\"options\", \"transactionalContentCrc64\"],\n mapper: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst blobType = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"PageBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentLength = {\n parameterPath: \"blobContentLength\",\n mapper: {\n serializedName: \"x-ms-blob-content-length\",\n required: true,\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst blobSequenceNumber = {\n parameterPath: [\"options\", \"blobSequenceNumber\"],\n mapper: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst contentType1 = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/octet-stream\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst body1 = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n xmlName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n};\nconst accept2 = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp19 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"page\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst pageWrite = {\n parameterPath: \"pageWrite\",\n mapper: {\n defaultValue: \"update\",\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifSequenceNumberLessThanOrEqualTo = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThanOrEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-le\",\n xmlName: \"x-ms-if-sequence-number-le\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst ifSequenceNumberLessThan = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThan\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-lt\",\n xmlName: \"x-ms-if-sequence-number-lt\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst ifSequenceNumberEqualTo = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-eq\",\n xmlName: \"x-ms-if-sequence-number-eq\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst pageWrite1 = {\n parameterPath: \"pageWrite\",\n mapper: {\n defaultValue: \"clear\",\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceUrl = {\n parameterPath: \"sourceUrl\",\n mapper: {\n serializedName: \"x-ms-copy-source\",\n required: true,\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceRange = {\n parameterPath: \"sourceRange\",\n mapper: {\n serializedName: \"x-ms-source-range\",\n required: true,\n xmlName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContentCrc64 = {\n parameterPath: [\"options\", \"sourceContentCrc64\"],\n mapper: {\n serializedName: \"x-ms-source-content-crc64\",\n xmlName: \"x-ms-source-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst range1 = {\n parameterPath: \"range\",\n mapper: {\n serializedName: \"x-ms-range\",\n required: true,\n xmlName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp20 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"pagelist\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prevsnapshot = {\n parameterPath: [\"options\", \"prevsnapshot\"],\n mapper: {\n serializedName: \"prevsnapshot\",\n xmlName: \"prevsnapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prevSnapshotUrl = {\n parameterPath: [\"options\", \"prevSnapshotUrl\"],\n mapper: {\n serializedName: \"x-ms-previous-snapshot-url\",\n xmlName: \"x-ms-previous-snapshot-url\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sequenceNumberAction = {\n parameterPath: \"sequenceNumberAction\",\n mapper: {\n serializedName: \"x-ms-sequence-number-action\",\n required: true,\n xmlName: \"x-ms-sequence-number-action\",\n type: {\n name: \"Enum\",\n allowedValues: [\"max\", \"update\", \"increment\"]\n }\n }\n};\nconst comp21 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"incrementalcopy\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobType1 = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"AppendBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp22 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"appendblock\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst maxSize = {\n parameterPath: [\"options\", \"appendPositionAccessConditions\", \"maxSize\"],\n mapper: {\n serializedName: \"x-ms-blob-condition-maxsize\",\n xmlName: \"x-ms-blob-condition-maxsize\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst appendPosition = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"appendPosition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-appendpos\",\n xmlName: \"x-ms-blob-condition-appendpos\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst sourceRange1 = {\n parameterPath: [\"options\", \"sourceRange\"],\n mapper: {\n serializedName: \"x-ms-source-range\",\n xmlName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp23 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"seal\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobType2 = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"BlockBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySourceBlobProperties = {\n parameterPath: [\"options\", \"copySourceBlobProperties\"],\n mapper: {\n serializedName: \"x-ms-copy-source-blob-properties\",\n xmlName: \"x-ms-copy-source-blob-properties\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst comp24 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"block\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blockId = {\n parameterPath: \"blockId\",\n mapper: {\n serializedName: \"blockid\",\n required: true,\n xmlName: \"blockid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blocks = {\n parameterPath: \"blocks\",\n mapper: BlockLookupList\n};\nconst comp25 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"blocklist\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst listType = {\n parameterPath: \"listType\",\n mapper: {\n defaultValue: \"committed\",\n serializedName: \"blocklisttype\",\n required: true,\n xmlName: \"blocklisttype\",\n type: {\n name: \"Enum\",\n allowedValues: [\"committed\", \"uncommitted\", \"all\"]\n }\n }\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Service. */\nclass Service {\n /**\n * Initialize a new instance of the class Service class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * Sets properties for a storage account's Blob service endpoint, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules\n * @param blobServiceProperties The StorageService properties.\n * @param options The options parameters.\n */\n setProperties(blobServiceProperties, options) {\n const operationArguments = {\n blobServiceProperties,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);\n }\n /**\n * gets the properties of a storage account's Blob service, including properties for Storage Analytics\n * and CORS (Cross-Origin Resource Sharing) rules.\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);\n }\n /**\n * Retrieves statistics related to replication for the Blob service. It is only available on the\n * secondary location endpoint when read-access geo-redundant replication is enabled for the storage\n * account.\n * @param options The options parameters.\n */\n getStatistics(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);\n }\n /**\n * The List Containers Segment operation returns a list of the containers under the specified account\n * @param options The options parameters.\n */\n listContainersSegment(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);\n }\n /**\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n * @param keyInfo Key information\n * @param options The options parameters.\n */\n getUserDelegationKey(keyInfo, options) {\n const operationArguments = {\n keyInfo,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);\n }\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch\n * boundary. Example header value: multipart/mixed; boundary=batch_\n * @param body Initial data\n * @param options The options parameters.\n */\n submitBatch(contentLength, multipartContentType, body, options) {\n const operationArguments = {\n contentLength,\n multipartContentType,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);\n }\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a\n * given search expression. Filter blobs searches across all containers within a storage account but\n * can be scoped within the expression to a single container.\n * @param options The options parameters.\n */\n filterBlobs(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);\n }\n}\n// Operation Specifications\nconst xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst setPropertiesOperationSpec = {\n path: \"/\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: ServiceSetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceSetPropertiesExceptionHeaders\n }\n },\n requestBody: blobServiceProperties,\n queryParameters: [\n restype,\n comp,\n timeoutInSeconds\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst getPropertiesOperationSpec$2 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobServiceProperties,\n headersMapper: ServiceGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [\n restype,\n comp,\n timeoutInSeconds\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst getStatisticsOperationSpec = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobServiceStatistics,\n headersMapper: ServiceGetStatisticsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetStatisticsExceptionHeaders\n }\n },\n queryParameters: [\n restype,\n timeoutInSeconds,\n comp1\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst listContainersSegmentOperationSpec = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListContainersSegmentResponse,\n headersMapper: ServiceListContainersSegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceListContainersSegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n include\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst getUserDelegationKeyOperationSpec = {\n path: \"/\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: UserDelegationKey,\n headersMapper: ServiceGetUserDelegationKeyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetUserDelegationKeyExceptionHeaders\n }\n },\n requestBody: keyInfo,\n queryParameters: [\n restype,\n timeoutInSeconds,\n comp3\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst getAccountInfoOperationSpec$2 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ServiceGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst submitBatchOperationSpec$1 = {\n path: \"/\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: ServiceSubmitBatchHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceSubmitBatchExceptionHeaders\n }\n },\n requestBody: body,\n queryParameters: [timeoutInSeconds, comp4],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n contentLength,\n multipartContentType\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst filterBlobsOperationSpec$1 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: FilterBlobSegment,\n headersMapper: ServiceFilterBlobsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceFilterBlobsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n comp5,\n where\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Container. */\nclass Container {\n /**\n * Initialize a new instance of the class Container class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * creates a new container under the specified account. If the container with the same name already\n * exists, the operation fails\n * @param options The options parameters.\n */\n create(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);\n }\n /**\n * returns all user-defined metadata and system properties for the specified container. The data\n * returned does not include the container's list of blobs\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);\n }\n /**\n * operation marks the specified container for deletion. The container and any blobs contained within\n * it are later deleted during garbage collection\n * @param options The options parameters.\n */\n delete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);\n }\n /**\n * operation sets one or more user-defined name-value pairs for the specified container.\n * @param options The options parameters.\n */\n setMetadata(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);\n }\n /**\n * gets the permissions for the specified container. The permissions indicate whether container data\n * may be accessed publicly.\n * @param options The options parameters.\n */\n getAccessPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);\n }\n /**\n * sets the permissions for the specified container. The permissions indicate whether blobs in a\n * container may be accessed publicly.\n * @param options The options parameters.\n */\n setAccessPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);\n }\n /**\n * Restores a previously-deleted container.\n * @param options The options parameters.\n */\n restore(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);\n }\n /**\n * Renames an existing container.\n * @param sourceContainerName Required. Specifies the name of the container to rename.\n * @param options The options parameters.\n */\n rename(sourceContainerName, options) {\n const operationArguments = {\n sourceContainerName,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renameOperationSpec);\n }\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch\n * boundary. Example header value: multipart/mixed; boundary=batch_\n * @param body Initial data\n * @param options The options parameters.\n */\n submitBatch(contentLength, multipartContentType, body, options) {\n const operationArguments = {\n contentLength,\n multipartContentType,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);\n }\n /**\n * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given\n * search expression. Filter blobs searches within the given container.\n * @param options The options parameters.\n */\n filterBlobs(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param options The options parameters.\n */\n acquireLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n releaseLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n renewLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param options The options parameters.\n */\n breakLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The options parameters.\n */\n changeLease(leaseId, proposedLeaseId, options) {\n const operationArguments = {\n leaseId,\n proposedLeaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);\n }\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param options The options parameters.\n */\n listBlobFlatSegment(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);\n }\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param options The options parameters.\n */\n listBlobHierarchySegment(delimiter, options) {\n const operationArguments = {\n delimiter,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);\n }\n}\n// Operation Specifications\nconst xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst createOperationSpec$2 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n access,\n defaultEncryptionScope,\n preventEncryptionScopeOverride\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getPropertiesOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ContainerGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst deleteOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: ContainerDeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerDeleteExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst setMetadataOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerSetMetadataHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSetMetadataExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp6\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getAccessPolicyOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: {\n name: \"Sequence\",\n element: {\n type: { name: \"Composite\", className: \"SignedIdentifier\" }\n }\n },\n serializedName: \"SignedIdentifiers\",\n xmlName: \"SignedIdentifiers\",\n xmlIsWrapped: true,\n xmlElementName: \"SignedIdentifier\"\n },\n headersMapper: ContainerGetAccessPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetAccessPolicyExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp7\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst setAccessPolicyOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerSetAccessPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSetAccessPolicyExceptionHeaders\n }\n },\n requestBody: containerAcl,\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp7\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n access,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$4\n};\nconst restoreOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerRestoreHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRestoreExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp8\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n deletedContainerName,\n deletedContainerVersion\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst renameOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerRenameHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRenameExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp9\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n sourceContainerName,\n sourceLeaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst submitBatchOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: ContainerSubmitBatchHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSubmitBatchExceptionHeaders\n }\n },\n requestBody: body,\n queryParameters: [\n timeoutInSeconds,\n comp4,\n restype2\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n contentLength,\n multipartContentType\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$4\n};\nconst filterBlobsOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: FilterBlobSegment,\n headersMapper: ContainerFilterBlobsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerFilterBlobsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n comp5,\n where,\n restype2\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst acquireLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerAcquireLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerAcquireLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action,\n duration,\n proposedLeaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst releaseLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerReleaseLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerReleaseLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action1,\n leaseId1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst renewLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerRenewLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRenewLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action2\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst breakLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: ContainerBreakLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerBreakLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action3,\n breakPeriod\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst changeLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerChangeLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerChangeLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action4,\n proposedLeaseId1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst listBlobFlatSegmentOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListBlobsFlatSegmentResponse,\n headersMapper: ContainerListBlobFlatSegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerListBlobFlatSegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n restype2,\n include1\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst listBlobHierarchySegmentOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListBlobsHierarchySegmentResponse,\n headersMapper: ContainerListBlobHierarchySegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n restype2,\n include1,\n delimiter\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getAccountInfoOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ContainerGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$4\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Blob. */\nclass Blob$1 {\n /**\n * Initialize a new instance of the class Blob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Download operation reads or downloads a blob from the system, including its metadata and\n * properties. You can also call Download to read a snapshot.\n * @param options The options parameters.\n */\n download(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);\n }\n /**\n * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system\n * properties for the blob. It does not return the content of the blob.\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);\n }\n /**\n * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is\n * permanently removed from the storage account. If the storage account's soft delete feature is\n * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible\n * immediately. However, the blob service retains the blob or snapshot for the number of days specified\n * by the DeleteRetentionPolicy section of [Storage service properties]\n * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is\n * permanently removed from the storage account. Note that you continue to be charged for the\n * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the\n * \"include=deleted\" query parameter to discover which blobs and snapshots have been soft deleted. You\n * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a\n * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404\n * (ResourceNotFound).\n * @param options The options parameters.\n */\n delete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);\n }\n /**\n * Undelete a blob that was previously soft deleted\n * @param options The options parameters.\n */\n undelete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);\n }\n /**\n * Sets the time a blob will expire and be deleted.\n * @param expiryOptions Required. Indicates mode of the expiry time\n * @param options The options parameters.\n */\n setExpiry(expiryOptions, options) {\n const operationArguments = {\n expiryOptions,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);\n }\n /**\n * The Set HTTP Headers operation sets system properties on the blob\n * @param options The options parameters.\n */\n setHttpHeaders(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);\n }\n /**\n * The Set Immutability Policy operation sets the immutability policy on the blob\n * @param options The options parameters.\n */\n setImmutabilityPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);\n }\n /**\n * The Delete Immutability Policy operation deletes the immutability policy on the blob\n * @param options The options parameters.\n */\n deleteImmutabilityPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);\n }\n /**\n * The Set Legal Hold operation sets a legal hold on the blob.\n * @param legalHold Specified if a legal hold should be set on the blob.\n * @param options The options parameters.\n */\n setLegalHold(legalHold, options) {\n const operationArguments = {\n legalHold,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);\n }\n /**\n * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more\n * name-value pairs\n * @param options The options parameters.\n */\n setMetadata(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param options The options parameters.\n */\n acquireLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n releaseLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n renewLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The options parameters.\n */\n changeLease(leaseId, proposedLeaseId, options) {\n const operationArguments = {\n leaseId,\n proposedLeaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param options The options parameters.\n */\n breakLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);\n }\n /**\n * The Create Snapshot operation creates a read-only snapshot of a blob\n * @param options The options parameters.\n */\n createSnapshot(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);\n }\n /**\n * The Start Copy From URL operation copies a blob or an internet resource to a new blob.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n startCopyFromURL(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);\n }\n /**\n * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return\n * a response until the copy is complete.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n copyFromURL(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);\n }\n /**\n * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination\n * blob with zero length and full metadata.\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param options The options parameters.\n */\n abortCopyFromURL(copyId, options) {\n const operationArguments = {\n copyId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);\n }\n /**\n * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant storage only). A\n * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block\n * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's\n * ETag.\n * @param tier Indicates the tier to be set on the blob.\n * @param options The options parameters.\n */\n setTier(tier, options) {\n const operationArguments = {\n tier,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);\n }\n /**\n * The Query operation enables users to select/project on blob data by providing simple query\n * expressions.\n * @param options The options parameters.\n */\n query(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, queryOperationSpec);\n }\n /**\n * The Get Tags operation enables users to get the tags associated with a blob.\n * @param options The options parameters.\n */\n getTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);\n }\n /**\n * The Set Tags operation enables users to set tags on a blob.\n * @param options The options parameters.\n */\n setTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst downloadOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobDownloadHeaders\n },\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobDownloadHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDownloadExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n rangeGetContentMD5,\n rangeGetContentCRC64,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst getPropertiesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: BlobGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst deleteOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: BlobDeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDeleteExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n blobDeleteType\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n deleteSnapshots\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst undeleteOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobUndeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobUndeleteExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp8],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setExpiryOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetExpiryHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetExpiryExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp11],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n expiryOptions,\n expiresOn\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setHttpHeadersOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetHttpHeadersHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetHttpHeadersExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setImmutabilityPolicyOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetImmutabilityPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetImmutabilityPolicyExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp12],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifUnmodifiedSince,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst deleteImmutabilityPolicyOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: BlobDeleteImmutabilityPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp12],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setLegalHoldOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetLegalHoldHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetLegalHoldExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp13],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n legalHold\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setMetadataOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetMetadataHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetMetadataExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp6],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst acquireLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlobAcquireLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobAcquireLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action,\n duration,\n proposedLeaseId,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst releaseLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobReleaseLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobReleaseLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action1,\n leaseId1,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst renewLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobRenewLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobRenewLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action2,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst changeLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobChangeLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobChangeLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action4,\n proposedLeaseId1,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst breakLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobBreakLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobBreakLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action3,\n breakPeriod,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst createSnapshotOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlobCreateSnapshotHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobCreateSnapshotExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp14],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst startCopyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobStartCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobStartCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n tier,\n rehydratePriority,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceIfTags,\n copySource,\n blobTagsString,\n sealBlob,\n legalHold1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst copyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n copySource,\n blobTagsString,\n legalHold1,\n xMsRequiresSync,\n sourceContentMD5,\n copySourceAuthorization,\n copySourceTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst abortCopyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {\n headersMapper: BlobAbortCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobAbortCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp15,\n copyId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n copyActionAbortConstant\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setTierOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetTierHeaders\n },\n 202: {\n headersMapper: BlobSetTierHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetTierExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n comp16\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags,\n rehydratePriority,\n tier1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst getAccountInfoOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: BlobGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst queryOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobQueryHeaders\n },\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobQueryHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobQueryExceptionHeaders\n }\n },\n requestBody: queryRequest,\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n comp17\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$3\n};\nconst getTagsOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobTags,\n headersMapper: BlobGetTagsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetTagsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n comp18\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setTagsOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {\n headersMapper: BlobSetTagsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetTagsExceptionHeaders\n }\n },\n requestBody: tags,\n queryParameters: [\n timeoutInSeconds,\n versionId,\n comp18\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n leaseId,\n ifTags,\n transactionalContentMD5,\n transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$3\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a PageBlob. */\nclass PageBlob {\n /**\n * Initialize a new instance of the class PageBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Create operation creates a new page blob.\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The\n * page blob size must be aligned to a 512-byte boundary.\n * @param options The options parameters.\n */\n create(contentLength, blobContentLength, options) {\n const operationArguments = {\n contentLength,\n blobContentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n uploadPages(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);\n }\n /**\n * The Clear Pages operation clears a set of pages from a page blob\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n clearPages(contentLength, options) {\n const operationArguments = {\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a\n * URL\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be 512\n * aligned and range-end is required.\n * @param options The options parameters.\n */\n uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) {\n const operationArguments = {\n sourceUrl,\n sourceRange,\n contentLength,\n range,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);\n }\n /**\n * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a\n * page blob\n * @param options The options parameters.\n */\n getPageRanges(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);\n }\n /**\n * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were\n * changed between target blob and previous snapshot.\n * @param options The options parameters.\n */\n getPageRangesDiff(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);\n }\n /**\n * Resize the Blob\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The\n * page blob size must be aligned to a 512-byte boundary.\n * @param options The options parameters.\n */\n resize(blobContentLength, options) {\n const operationArguments = {\n blobContentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);\n }\n /**\n * Update the sequence number of the blob\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request.\n * This property applies to page blobs only. This property indicates how the service should modify the\n * blob's sequence number\n * @param options The options parameters.\n */\n updateSequenceNumber(sequenceNumberAction, options) {\n const operationArguments = {\n sequenceNumberAction,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);\n }\n /**\n * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob.\n * The snapshot is copied such that only the differential changes between the previously copied\n * snapshot are transferred to the destination. The copied snapshots are complete copies of the\n * original snapshot and can be read or copied from as usual. This API is supported since REST version\n * 2016-05-31.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n copyIncremental(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst createOperationSpec$1 = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n blobType,\n blobContentLength,\n blobSequenceNumber\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst uploadPagesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobUploadPagesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUploadPagesExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2,\n pageWrite,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo\n ],\n mediaType: \"binary\",\n serializer: serializer$2\n};\nconst clearPagesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobClearPagesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobClearPagesExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo,\n pageWrite1\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst uploadPagesFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobUploadPagesFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUploadPagesFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n pageWrite,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo,\n sourceUrl,\n sourceRange,\n sourceContentCrc64,\n range1\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst getPageRangesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: PageList,\n headersMapper: PageBlobGetPageRangesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobGetPageRangesExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n snapshot,\n comp20\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst getPageRangesDiffOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: PageList,\n headersMapper: PageBlobGetPageRangesDiffHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobGetPageRangesDiffExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n snapshot,\n comp20,\n prevsnapshot\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n ifMatch,\n ifNoneMatch,\n ifTags,\n prevSnapshotUrl\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst resizeOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: PageBlobResizeHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobResizeExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n blobContentLength\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst updateSequenceNumberOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: PageBlobUpdateSequenceNumberHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobSequenceNumber,\n sequenceNumberAction\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst copyIncrementalOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: PageBlobCopyIncrementalHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobCopyIncrementalExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp21],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n copySource\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a AppendBlob. */\nclass AppendBlob {\n /**\n * Initialize a new instance of the class AppendBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Create Append Blob operation creates a new append blob.\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n create(contentLength, options) {\n const operationArguments = {\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec);\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob. The\n * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to\n * AppendBlob. Append Block is supported only on version 2015-02-21 version or later.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n appendBlock(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob where\n * the contents are read from a source url. The Append Block operation is permitted only if the blob\n * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version\n * 2015-02-21 version or later.\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n appendBlockFromUrl(sourceUrl, contentLength, options) {\n const operationArguments = {\n sourceUrl,\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);\n }\n /**\n * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version\n * 2019-12-12 version or later.\n * @param options The options parameters.\n */\n seal(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, sealOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst createOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n blobTagsString,\n legalHold1,\n blobType1\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\nconst appendBlockOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobAppendBlockHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobAppendBlockExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds, comp22],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2,\n maxSize,\n appendPosition\n ],\n mediaType: \"binary\",\n serializer: serializer$1\n};\nconst appendBlockFromUrlOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobAppendBlockFromUrlHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp22],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n transactionalContentMD5,\n sourceUrl,\n sourceContentCrc64,\n maxSize,\n appendPosition,\n sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\nconst sealOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: AppendBlobSealHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobSealExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp23],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n appendPosition\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a BlockBlob. */\nclass BlockBlob {\n /**\n * Initialize a new instance of the class BlockBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing\n * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put\n * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a\n * partial update of the content of a block blob, use the Put Block List operation.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n upload(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);\n }\n /**\n * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read\n * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are\n * not supported with Put Blob from URL; the content of an existing blob is overwritten with the\n * content of the new blob. To perform partial updates to a block blob’s contents using a source URL,\n * use the Put Block from URL API in conjunction with Put Block List.\n * @param contentLength The length of the request.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n putBlobFromUrl(contentLength, copySource, options) {\n const operationArguments = {\n contentLength,\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);\n }\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n stageBlock(blockId, contentLength, body, options) {\n const operationArguments = {\n blockId,\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);\n }\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the contents\n * are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The options parameters.\n */\n stageBlockFromURL(blockId, contentLength, sourceUrl, options) {\n const operationArguments = {\n blockId,\n contentLength,\n sourceUrl,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);\n }\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the\n * blob. In order to be written as part of a blob, a block must have been successfully written to the\n * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading\n * only those blocks that have changed, then committing the new and existing blocks together. You can\n * do this by specifying whether to commit a block from the committed block list or from the\n * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list\n * it may belong to.\n * @param blocks Blob Blocks.\n * @param options The options parameters.\n */\n commitBlockList(blocks, options) {\n const operationArguments = {\n blocks,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);\n }\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block\n * blob\n * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted\n * blocks, or both lists together.\n * @param options The options parameters.\n */\n getBlockList(listType, options) {\n const operationArguments = {\n listType,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst uploadOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobUploadExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2,\n blobType2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst putBlobFromUrlOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobPutBlobFromUrlHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n encryptionScope,\n tier,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceIfTags,\n copySource,\n blobTagsString,\n sourceContentMD5,\n copySourceAuthorization,\n copySourceTags,\n transactionalContentMD5,\n blobType2,\n copySourceBlobProperties\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst stageBlockOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobStageBlockExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [\n timeoutInSeconds,\n comp24,\n blockId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst stageBlockFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobStageBlockFromURLExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp24,\n blockId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n sourceUrl,\n sourceContentCrc64,\n sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst commitBlockListOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobCommitBlockListExceptionHeaders\n }\n },\n requestBody: blocks,\n queryParameters: [timeoutInSeconds, comp25],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n transactionalContentMD5,\n transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer\n};\nconst getBlockListOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlockList,\n headersMapper: BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobGetBlockListExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n comp25,\n listType\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer\n};\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The `@azure/logger` configuration for this package.\n */\nconst logger = logger$1.createClientLogger(\"storage-blob\");\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst SDK_VERSION = \"12.14.0\";\nconst SERVICE_VERSION = \"2022-11-02\";\nconst BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB\nconst BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB\nconst BLOCK_BLOB_MAX_BLOCKS = 50000;\nconst DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB\nconst DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB\nconst DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;\nconst REQUEST_TIMEOUT = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nconst StorageOAuthScopes = \"https://storage.azure.com/.default\";\nconst URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\",\n },\n};\nconst HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\nconst HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n};\nconst ETagNone = \"\";\nconst ETagAny = \"*\";\nconst SIZE_1_MB = 1 * 1024 * 1024;\nconst BATCH_MAX_REQUEST = 256;\nconst BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nconst HTTP_LINE_ENDING = \"\\r\\n\";\nconst HTTP_VERSION_1_1 = \"HTTP/1.1\";\nconst EncryptionAlgorithmAES25 = \"AES256\";\nconst DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\nconst StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\",\n];\nconst StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\nconst BlobUsesCustomerSpecifiedEncryptionMsg = \"BlobUsesCustomerSpecifiedEncryption\";\nconst BlobDoesNotUseCustomerSpecifiedEncryption = \"BlobDoesNotUseCustomerSpecifiedEncryption\";\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nconst PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nfunction escapeURLPath(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let path = urlParsed.getPath();\n path = path || \"/\";\n path = escape(path);\n urlParsed.setPath(path);\n return urlParsed.toString();\n}\nfunction getProxyUriFromDevConnString(connectionString) {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")[1];\n }\n }\n }\n return proxyUri;\n}\nfunction getValueInConnString(connectionString, argument) {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")[1];\n }\n }\n return \"\";\n}\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nfunction extractConnectionStringParts(connectionString) {\n let proxyUri = \"\";\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n if (connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1) {\n // Account connection string\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\");\n }\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n }\n else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri,\n };\n }\n else {\n // SAS connection string\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n const accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n }\n else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\nfunction escape(text) {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nfunction appendToURLPath(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n const normalizedUrl = new URL(urlParsed.toString());\n return normalizedUrl.toString();\n}\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nfunction setURLParameter(url, name, value) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nfunction getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nfunction setURLHost(url, host) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLPath(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n/**\n * Get URL scheme from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLScheme(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n/**\n * Get URL path and query from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLPathAndQuery(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString !== \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n return `${pathString}${queryString}`;\n}\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nfunction getURLQueries(url) {\n let queryString = coreHttp.URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n let querySubStrings = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1);\n });\n const queries = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key = splitResults[0];\n const value = splitResults[1];\n queries[key] = value;\n }\n return queries;\n}\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nfunction appendToURLQuery(url, queryParts) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let query = urlParsed.getQuery();\n if (query) {\n query += \"&\" + queryParts;\n }\n else {\n query = queryParts;\n }\n urlParsed.setQuery(query);\n return urlParsed.toString();\n}\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nfunction truncatedISO8061Date(date, withMilliseconds = true) {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n/**\n * Base64 encode.\n *\n * @param content -\n */\nfunction base64encode(content) {\n return !coreHttp.isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @param blockIndex -\n */\nfunction generateBlockID(blockIDPrefix, blockIndex) {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res = blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nasync function delay(timeInMs, aborter, abortError) {\n return new Promise((resolve, reject) => {\n /* eslint-disable-next-line prefer-const */\n let timeout;\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n/**\n * String.prototype.padStart()\n *\n * @param currentString -\n * @param targetLength -\n * @param padString -\n */\nfunction padStart(currentString, targetLength, padString = \" \") {\n // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes\n if (String.prototype.padStart) {\n return currentString.padStart(targetLength, padString);\n }\n padString = padString || \" \";\n if (currentString.length > targetLength) {\n return currentString;\n }\n else {\n targetLength = targetLength - currentString.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + currentString;\n }\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @param str1 -\n * @param str2 -\n */\nfunction iEqual(str1, str2) {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n/**\n * Extracts account name from the url\n * @param url - url to extract the account name from\n * @returns with the account name\n */\nfunction getAccountNameFromUrl(url) {\n const parsedUrl = coreHttp.URLBuilder.parse(url);\n let accountName;\n try {\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost().split(\".\")[0];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath().split(\"/\")[1];\n }\n else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n }\n catch (error) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\nfunction isIpEndpointStyle(parsedUrl) {\n if (parsedUrl.getHost() === undefined) {\n return false;\n }\n const host = parsedUrl.getHost() + (parsedUrl.getPort() === undefined ? \"\" : \":\" + parsedUrl.getPort());\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||\n (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort())));\n}\n/**\n * Convert Tags to encoded string.\n *\n * @param tags -\n */\nfunction toBlobTagsString(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const tagPairs = [];\n for (const key in tags) {\n if (Object.prototype.hasOwnProperty.call(tags, key)) {\n const value = tags[key];\n tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n }\n }\n return tagPairs.join(\"&\");\n}\n/**\n * Convert Tags type to BlobTags.\n *\n * @param tags -\n */\nfunction toBlobTags(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const res = {\n blobTagSet: [],\n };\n for (const key in tags) {\n if (Object.prototype.hasOwnProperty.call(tags, key)) {\n const value = tags[key];\n res.blobTagSet.push({\n key,\n value,\n });\n }\n }\n return res;\n}\n/**\n * Covert BlobTags to Tags type.\n *\n * @param tags -\n */\nfunction toTags(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const res = {};\n for (const blobTag of tags.blobTagSet) {\n res[blobTag.key] = blobTag.value;\n }\n return res;\n}\n/**\n * Convert BlobQueryTextConfiguration to QuerySerialization type.\n *\n * @param textConfiguration -\n */\nfunction toQuerySerialization(textConfiguration) {\n if (textConfiguration === undefined) {\n return undefined;\n }\n switch (textConfiguration.kind) {\n case \"csv\":\n return {\n format: {\n type: \"delimited\",\n delimitedTextConfiguration: {\n columnSeparator: textConfiguration.columnSeparator || \",\",\n fieldQuote: textConfiguration.fieldQuote || \"\",\n recordSeparator: textConfiguration.recordSeparator,\n escapeChar: textConfiguration.escapeCharacter || \"\",\n headersPresent: textConfiguration.hasHeaders || false,\n },\n },\n };\n case \"json\":\n return {\n format: {\n type: \"json\",\n jsonTextConfiguration: {\n recordSeparator: textConfiguration.recordSeparator,\n },\n },\n };\n case \"arrow\":\n return {\n format: {\n type: \"arrow\",\n arrowConfiguration: {\n schema: textConfiguration.schema,\n },\n },\n };\n case \"parquet\":\n return {\n format: {\n type: \"parquet\",\n },\n };\n default:\n throw Error(\"Invalid BlobQueryTextConfiguration.\");\n }\n}\nfunction parseObjectReplicationRecord(objectReplicationRecord) {\n if (!objectReplicationRecord) {\n return undefined;\n }\n if (\"policy-id\" in objectReplicationRecord) {\n // If the dictionary contains a key with policy id, we are not required to do any parsing since\n // the policy id should already be stored in the ObjectReplicationDestinationPolicyId.\n return undefined;\n }\n const orProperties = [];\n for (const key in objectReplicationRecord) {\n const ids = key.split(\"_\");\n const policyPrefix = \"or-\";\n if (ids[0].startsWith(policyPrefix)) {\n ids[0] = ids[0].substring(policyPrefix.length);\n }\n const rule = {\n ruleId: ids[1],\n replicationStatus: objectReplicationRecord[key],\n };\n const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);\n if (policyIndex > -1) {\n orProperties[policyIndex].rules.push(rule);\n }\n else {\n orProperties.push({\n policyId: ids[0],\n rules: [rule],\n });\n }\n }\n return orProperties;\n}\n/**\n * Attach a TokenCredential to an object.\n *\n * @param thing -\n * @param credential -\n */\nfunction attachCredential(thing, credential) {\n thing.credential = credential;\n return thing;\n}\nfunction httpAuthorizationToString(httpAuthorization) {\n return httpAuthorization ? httpAuthorization.scheme + \" \" + httpAuthorization.value : undefined;\n}\nfunction BlobNameToString(name) {\n if (name.encoded) {\n return decodeURIComponent(name.content);\n }\n else {\n return name.content;\n }\n}\nfunction ConvertInternalResponseOfListBlobFlat(internalResponse) {\n return Object.assign(Object.assign({}, internalResponse), { segment: {\n blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });\n return blobItem;\n }),\n } });\n}\nfunction ConvertInternalResponseOfListBlobHierarchy(internalResponse) {\n var _a;\n return Object.assign(Object.assign({}, internalResponse), { segment: {\n blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {\n const blobPrefix = {\n name: BlobNameToString(blobPrefixInternal.name),\n };\n return blobPrefix;\n }),\n blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });\n return blobItem;\n }),\n } });\n}\nfunction* ExtractPageRangeInfoItems(getPageRangesSegment) {\n let pageRange = [];\n let clearRange = [];\n if (getPageRangesSegment.pageRange)\n pageRange = getPageRangesSegment.pageRange;\n if (getPageRangesSegment.clearRange)\n clearRange = getPageRangesSegment.clearRange;\n let pageRangeIndex = 0;\n let clearRangeIndex = 0;\n while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) {\n if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) {\n yield {\n start: pageRange[pageRangeIndex].start,\n end: pageRange[pageRangeIndex].end,\n isClear: false,\n };\n ++pageRangeIndex;\n }\n else {\n yield {\n start: clearRange[clearRangeIndex].start,\n end: clearRange[clearRangeIndex].end,\n isClear: true,\n };\n ++clearRangeIndex;\n }\n }\n for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) {\n yield {\n start: pageRange[pageRangeIndex].start,\n end: pageRange[pageRangeIndex].end,\n isClear: false,\n };\n }\n for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) {\n yield {\n start: clearRange[clearRangeIndex].start,\n end: clearRange[clearRangeIndex].end,\n isClear: true,\n };\n }\n}\n/**\n * Escape the blobName but keep path separator ('/').\n */\nfunction EscapePath(blobName) {\n const split = blobName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:\n *\n * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.\n * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL\n * thus avoid the browser cache.\n *\n * 2. Remove cookie header for security\n *\n * 3. Remove content-length header to avoid browsers warning\n */\nclass StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of StorageBrowserPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends out request.\n *\n * @param request -\n */\n async sendRequest(request) {\n if (coreHttp.isNode) {\n return this._nextPolicy.sendRequest(request);\n }\n if (request.method.toUpperCase() === \"GET\" || request.method.toUpperCase() === \"HEAD\") {\n request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());\n }\n request.headers.remove(HeaderConstants.COOKIE);\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.remove(HeaderConstants.CONTENT_LENGTH);\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.\n */\nclass StorageBrowserPolicyFactory {\n /**\n * Creates a StorageBrowserPolicyFactory object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageBrowserPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * RetryPolicy types.\n */\nexports.StorageRetryPolicyType = void 0;\n(function (StorageRetryPolicyType) {\n /**\n * Exponential retry. Retry time delay grows exponentially.\n */\n StorageRetryPolicyType[StorageRetryPolicyType[\"EXPONENTIAL\"] = 0] = \"EXPONENTIAL\";\n /**\n * Linear retry. Retry time delay grows linearly.\n */\n StorageRetryPolicyType[StorageRetryPolicyType[\"FIXED\"] = 1] = \"FIXED\";\n})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {}));\n// Default values of StorageRetryOptions\nconst DEFAULT_RETRY_OPTIONS = {\n maxRetryDelayInMs: 120 * 1000,\n maxTries: 4,\n retryDelayInMs: 4 * 1000,\n retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,\n secondaryHost: \"\",\n tryTimeoutInMs: undefined, // Use server side default timeout strategy\n};\nconst RETRY_ABORT_ERROR = new abortController.AbortError(\"The operation was aborted.\");\n/**\n * Retry policy with exponential retry and linear retry implemented.\n */\nclass StorageRetryPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of RetryPolicy.\n *\n * @param nextPolicy -\n * @param options -\n * @param retryOptions -\n */\n constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) {\n super(nextPolicy, options);\n // Initialize retry options\n this.retryOptions = {\n retryPolicyType: retryOptions.retryPolicyType\n ? retryOptions.retryPolicyType\n : DEFAULT_RETRY_OPTIONS.retryPolicyType,\n maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1\n ? Math.floor(retryOptions.maxTries)\n : DEFAULT_RETRY_OPTIONS.maxTries,\n tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0\n ? retryOptions.tryTimeoutInMs\n : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs,\n retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0\n ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs)\n : DEFAULT_RETRY_OPTIONS.retryDelayInMs,\n maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,\n secondaryHost: retryOptions.secondaryHost\n ? retryOptions.secondaryHost\n : DEFAULT_RETRY_OPTIONS.secondaryHost,\n };\n }\n /**\n * Sends request.\n *\n * @param request -\n */\n async sendRequest(request) {\n return this.attemptSendRequest(request, false, 1);\n }\n /**\n * Decide and perform next retry. Won't mutate request parameter.\n *\n * @param request -\n * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then\n * the resource was not found. This may be due to replication delay. So, in this\n * case, we'll never try the secondary again for this operation.\n * @param attempt - How many retries has been attempted to performed, starting from 1, which includes\n * the attempt will be performed by this method call.\n */\n async attemptSendRequest(request, secondaryHas404, attempt) {\n const newRequest = request.clone();\n const isPrimaryRetry = secondaryHas404 ||\n !this.retryOptions.secondaryHost ||\n !(request.method === \"GET\" || request.method === \"HEAD\" || request.method === \"OPTIONS\") ||\n attempt % 2 === 1;\n if (!isPrimaryRetry) {\n newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost);\n }\n // Set the server-side timeout query parameter \"timeout=[seconds]\"\n if (this.retryOptions.tryTimeoutInMs) {\n newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString());\n }\n let response;\n try {\n logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? \"Primary\" : \"Secondary\"}`);\n response = await this._nextPolicy.sendRequest(newRequest);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {\n return response;\n }\n secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);\n }\n catch (err) {\n logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {\n throw err;\n }\n }\n await this.delay(isPrimaryRetry, attempt, request.abortSignal);\n return this.attemptSendRequest(request, secondaryHas404, ++attempt);\n }\n /**\n * Decide whether to retry according to last HTTP response and retry counters.\n *\n * @param isPrimaryRetry -\n * @param attempt -\n * @param response -\n * @param err -\n */\n shouldRetry(isPrimaryRetry, attempt, response, err) {\n if (attempt >= this.retryOptions.maxTries) {\n logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions\n .maxTries}, no further try.`);\n return false;\n }\n // Handle network failures, you may need to customize the list when you implement\n // your own http client\n const retriableErrors = [\n \"ETIMEDOUT\",\n \"ESOCKETTIMEDOUT\",\n \"ECONNREFUSED\",\n \"ECONNRESET\",\n \"ENOENT\",\n \"ENOTFOUND\",\n \"TIMEOUT\",\n \"EPIPE\",\n \"REQUEST_SEND_ERROR\", // For default xhr based http client provided in ms-rest-js\n ];\n if (err) {\n for (const retriableError of retriableErrors) {\n if (err.name.toUpperCase().includes(retriableError) ||\n err.message.toUpperCase().includes(retriableError) ||\n (err.code && err.code.toString().toUpperCase() === retriableError)) {\n logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);\n return true;\n }\n }\n }\n // If attempt was against the secondary & it returned a StatusNotFound (404), then\n // the resource was not found. This may be due to replication delay. So, in this\n // case, we'll never try the secondary again for this operation.\n if (response || err) {\n const statusCode = response ? response.status : err ? err.statusCode : 0;\n if (!isPrimaryRetry && statusCode === 404) {\n logger.info(`RetryPolicy: Secondary access with 404, will retry.`);\n return true;\n }\n // Server internal error or server timeout\n if (statusCode === 503 || statusCode === 500) {\n logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);\n return true;\n }\n }\n if ((err === null || err === void 0 ? void 0 : err.code) === \"PARSE_ERROR\" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error \"Error: Unclosed root tag`))) {\n logger.info(\"RetryPolicy: Incomplete XML response likely due to service timeout, will retry.\");\n return true;\n }\n return false;\n }\n /**\n * Delay a calculated time between retries.\n *\n * @param isPrimaryRetry -\n * @param attempt -\n * @param abortSignal -\n */\n async delay(isPrimaryRetry, attempt, abortSignal) {\n let delayTimeInMs = 0;\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case exports.StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);\n break;\n case exports.StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs;\n break;\n }\n }\n else {\n delayTimeInMs = Math.random() * 1000;\n }\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nclass StorageRetryPolicyFactory {\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions) {\n this.retryOptions = retryOptions;\n }\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Credential policy used to sign HTTP(S) requests before sending. This is an\n * abstract class.\n */\nclass CredentialPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Sends out request.\n *\n * @param request -\n */\n sendRequest(request) {\n return this._nextPolicy.sendRequest(this.signRequest(request));\n }\n /**\n * Child classes must implement this method with request signing. This method\n * will be executed in {@link sendRequest}.\n *\n * @param request -\n */\n signRequest(request) {\n // Child classes must override this method with request signing. This method\n // will be executed in sendRequest().\n return request;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources\n * or for use with Shared Access Signatures (SAS).\n */\nclass AnonymousCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of AnonymousCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Credential is an abstract class for Azure Storage HTTP requests signing. This\n * class will host an credentialPolicyCreator factory which generates CredentialPolicy.\n */\nclass Credential {\n /**\n * Creates a RequestPolicy object.\n *\n * @param _nextPolicy -\n * @param _options -\n */\n create(_nextPolicy, _options) {\n throw new Error(\"Method should be implemented in children classes.\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * AnonymousCredential provides a credentialPolicyCreator member used to create\n * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with\n * HTTP(S) requests that read public resources or for use with Shared Access\n * Signatures (SAS).\n */\nclass AnonymousCredential extends Credential {\n /**\n * Creates an {@link AnonymousCredentialPolicy} object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new AnonymousCredentialPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * TelemetryPolicy is a policy used to tag user-agent header for every requests.\n */\nclass TelemetryPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of TelemetryPolicy.\n * @param nextPolicy -\n * @param options -\n * @param telemetry -\n */\n constructor(nextPolicy, options, telemetry) {\n super(nextPolicy, options);\n this.telemetry = telemetry;\n }\n /**\n * Sends out request.\n *\n * @param request -\n */\n async sendRequest(request) {\n if (coreHttp.isNode) {\n if (!request.headers) {\n request.headers = new coreHttp.HttpHeaders();\n }\n if (!request.headers.get(HeaderConstants.USER_AGENT)) {\n request.headers.set(HeaderConstants.USER_AGENT, this.telemetry);\n }\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects.\n */\nclass TelemetryPolicyFactory {\n /**\n * Creates an instance of TelemetryPolicyFactory.\n * @param telemetry -\n */\n constructor(telemetry) {\n const userAgentInfo = [];\n if (coreHttp.isNode) {\n if (telemetry) {\n const telemetryString = telemetry.userAgentPrefix || \"\";\n if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {\n userAgentInfo.push(telemetryString);\n }\n }\n // e.g. azsdk-js-storageblob/10.0.0\n const libInfo = `azsdk-js-storageblob/${SDK_VERSION}`;\n if (userAgentInfo.indexOf(libInfo) === -1) {\n userAgentInfo.push(libInfo);\n }\n // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)\n let runtimeInfo = `(NODE-VERSION ${process.version})`;\n if (os__namespace) {\n runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;\n }\n if (userAgentInfo.indexOf(runtimeInfo) === -1) {\n userAgentInfo.push(runtimeInfo);\n }\n }\n this.telemetryString = userAgentInfo.join(\" \");\n }\n /**\n * Creates a TelemetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new TelemetryPolicy(nextPolicy, options, this.telemetryString);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst _defaultHttpClient = new coreHttp.DefaultHttpClient();\nfunction getCachedDefaultHttpClient() {\n return _defaultHttpClient;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A set of constants used internally when processing requests.\n */\nconst Constants = {\n DefaultScope: \"/.default\",\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n */\n AUTHORIZATION: \"authorization\",\n },\n};\n// Default options for the cycler if none are provided\nconst DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000,\n retryIntervalInMs: 3000,\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - a function that produces a promise of an access\n * token that may fail by returning null\n * @param retryIntervalInMs - the time (in milliseconds) to wait between retry\n * attempts\n * @param timeoutInMs - the timestamp after which the refresh attempt will fail,\n * throwing an exception\n * @returns - a promise that, if it resolves, will resolve with an access token\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < timeoutInMs) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await coreHttp.delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param scopes - the scopes to request authorization for\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nfunction createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction getChallenge(response) {\n const challenge = response.headers.get(\"WWW-Authenticate\");\n if (response.status === 401 && challenge) {\n return challenge;\n }\n return;\n}\n/**\n * Converts: `Bearer a=\"b\" c=\"d\"`.\n * Into: `[ { a: 'b', c: 'd' }]`.\n *\n * @internal\n */\nfunction parseChallenge(challenge) {\n const bearerChallenge = challenge.slice(\"Bearer \".length);\n const challengeParts = `${bearerChallenge.trim()} `.split(\" \").filter((x) => x);\n const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split(\"=\")));\n // Key-value pairs to plain object:\n return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});\n}\n// #endregion\n/**\n * Creates a new factory for a RequestPolicy that applies a bearer token to\n * the requests' `Authorization` headers.\n *\n * @param credential - The TokenCredential implementation that can supply the bearer token.\n * @param scopes - The scopes for which the bearer token applies.\n */\nfunction storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {\n // This simple function encapsulates the entire process of reliably retrieving the token\n let getToken = createTokenCycler(credential, scopes);\n class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(webResource) {\n if (!webResource.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n const getTokenInternal = getToken;\n const token = (await getTokenInternal({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n })).token;\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);\n const response = await this._nextPolicy.sendRequest(webResource);\n if ((response === null || response === void 0 ? void 0 : response.status) === 401) {\n const challenge = getChallenge(response);\n if (challenge) {\n const challengeInfo = parseChallenge(challenge);\n const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;\n const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);\n const pathSegments = parsedAuthUri.getPath().split(\"/\");\n const tenantId = pathSegments[1];\n const getTokenForChallenge = createTokenCycler(credential, challengeScopes);\n const tokenForChallenge = (await getTokenForChallenge({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n tenantId: tenantId,\n })).token;\n getToken = getTokenForChallenge;\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);\n return this._nextPolicy.sendRequest(webResource);\n }\n }\n return response;\n }\n }\n return {\n create: (nextPolicy, options) => {\n return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);\n },\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nfunction isPipelineLike(pipeline) {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n const castPipeline = pipeline;\n return (Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\");\n}\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nclass Pipeline {\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories, options = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = Object.assign(Object.assign({}, options), { httpClient: options.httpClient || getCachedDefaultHttpClient() });\n }\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions() {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nfunction newPipeline(credential, pipelineOptions = {}) {\n var _a;\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories = [\n coreHttp.tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n coreHttp.keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n coreHttp.generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions),\n // Default deserializationPolicy is provided by protocol layer\n // Use customized XML char key of \"#\" so we could deserialize metadata\n // with \"_\" key\n coreHttp.deserializationPolicy(undefined, { xmlCharKey: \"#\" }),\n coreHttp.logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\n }),\n ];\n if (coreHttp.isNode) {\n // policies only available in Node.js runtime, not in browsers\n factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));\n factories.push(coreHttp.disableResponseDecompressionPolicy());\n }\n factories.push(coreHttp.isTokenCredential(credential)\n ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)\n : credential);\n return new Pipeline(factories, pipelineOptions);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.\n */\nclass StorageSharedKeyCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of StorageSharedKeyCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n * @param factory -\n */\n constructor(nextPolicy, options, factory) {\n super(nextPolicy, options);\n this.factory = factory;\n }\n /**\n * Signs request.\n *\n * @param request -\n */\n signRequest(request) {\n request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());\n if (request.body &&\n (typeof request.body === \"string\" || request.body !== undefined) &&\n request.body.length > 0) {\n request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));\n }\n const stringToSign = [\n request.method.toUpperCase(),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),\n this.getHeaderValueToSign(request, HeaderConstants.DATE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.RANGE),\n ].join(\"\\n\") +\n \"\\n\" +\n this.getCanonicalizedHeadersString(request) +\n this.getCanonicalizedResourceString(request);\n const signature = this.factory.computeHMACSHA256(stringToSign);\n request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`);\n // console.log(`[URL]:${request.url}`);\n // console.log(`[HEADERS]:${request.headers.toString()}`);\n // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);\n // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);\n return request;\n }\n /**\n * Retrieve header value according to shared key sign rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n *\n * @param request -\n * @param headerName -\n */\n getHeaderValueToSign(request, headerName) {\n const value = request.headers.get(headerName);\n if (!value) {\n return \"\";\n }\n // When using version 2015-02-21 or later, if Content-Length is zero, then\n // set the Content-Length part of the StringToSign to an empty string.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n if (headerName === HeaderConstants.CONTENT_LENGTH && value === \"0\") {\n return \"\";\n }\n return value;\n }\n /**\n * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:\n * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.\n * 2. Convert each HTTP header name to lowercase.\n * 3. Sort the headers lexicographically by header name, in ascending order.\n * Each header may appear only once in the string.\n * 4. Replace any linear whitespace in the header value with a single space.\n * 5. Trim any whitespace around the colon in the header.\n * 6. Finally, append a new-line character to each canonicalized header in the resulting list.\n * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.\n *\n * @param request -\n */\n getCanonicalizedHeadersString(request) {\n let headersArray = request.headers.headersArray().filter((value) => {\n return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);\n });\n headersArray.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n // Remove duplicate headers\n headersArray = headersArray.filter((value, index, array) => {\n if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {\n return false;\n }\n return true;\n });\n let canonicalizedHeadersStringToSign = \"\";\n headersArray.forEach((header) => {\n canonicalizedHeadersStringToSign += `${header.name\n .toLowerCase()\n .trimRight()}:${header.value.trimLeft()}\\n`;\n });\n return canonicalizedHeadersStringToSign;\n }\n /**\n * Retrieves the webResource canonicalized resource string.\n *\n * @param request -\n */\n getCanonicalizedResourceString(request) {\n const path = getURLPath(request.url) || \"/\";\n let canonicalizedResourceString = \"\";\n canonicalizedResourceString += `/${this.factory.accountName}${path}`;\n const queries = getURLQueries(request.url);\n const lowercaseQueries = {};\n if (queries) {\n const queryKeys = [];\n for (const key in queries) {\n if (Object.prototype.hasOwnProperty.call(queries, key)) {\n const lowercaseKey = key.toLowerCase();\n lowercaseQueries[lowercaseKey] = queries[key];\n queryKeys.push(lowercaseKey);\n }\n }\n queryKeys.sort();\n for (const key of queryKeys) {\n canonicalizedResourceString += `\\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;\n }\n }\n return canonicalizedResourceString;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n */\nclass StorageSharedKeyCredential extends Credential {\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param accountName -\n * @param accountKey -\n */\n constructor(accountName, accountKey) {\n super();\n this.accountName = accountName;\n this.accountKey = Buffer.from(accountKey, \"base64\");\n }\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);\n }\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n computeHMACSHA256(stringToSign) {\n return crypto.createHmac(\"sha256\", this.accountKey).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst packageName = \"azure-storage-blob\";\nconst packageVersion = \"12.14.0\";\nclass StorageClientContext extends coreHttp__namespace.ServiceClient {\n /**\n * Initializes a new instance of the StorageClientContext class.\n * @param url The URL of the service account, container, or blob that is the target of the desired\n * operation.\n * @param options The parameter options\n */\n constructor(url, options) {\n if (url === undefined) {\n throw new Error(\"'url' cannot be null\");\n }\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n if (!options.userAgent) {\n const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();\n options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;\n }\n super(undefined, options);\n this.requestContentType = \"application/json; charset=utf-8\";\n this.baseUri = options.endpoint || \"{url}\";\n // Parameter assignments\n this.url = url;\n // Assigning values to Constant parameters\n this.version = options.version || \"2022-11-02\";\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n */\nclass StorageClient {\n /**\n * Creates an instance of StorageClient.\n * @param url - url to resource\n * @param pipeline - request policy pipeline.\n */\n constructor(url, pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageClientContext(this.url, pipeline.toServiceClientOptions());\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n this.credential = new AnonymousCredential();\n for (const factory of this.pipeline.factories) {\n if ((coreHttp.isNode && factory instanceof StorageSharedKeyCredential) ||\n factory instanceof AnonymousCredential) {\n this.credential = factory;\n }\n else if (coreHttp.isTokenCredential(factory.credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n this.credential = factory.credential;\n }\n }\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext;\n storageClientContext.requestContentType = undefined;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a span using the global tracer.\n * @internal\n */\nconst createSpan = coreTracing.createSpanFunction({\n packagePrefix: \"Azure.Storage.Blob\",\n namespace: \"Microsoft.Storage\",\n});\n/**\n * @internal\n *\n * Adapt the tracing options from OperationOptions to what they need to be for\n * RequestOptionsBase (when we update to later OpenTelemetry versions this is now\n * two separate fields, not just one).\n */\nfunction convertTracingToRequestOptionsBase(options) {\n var _a, _b;\n return {\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,\n tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass BlobSASPermissions {\n constructor() {\n /**\n * Specifies Read access granted.\n */\n this.read = false;\n /**\n * Specifies Add access granted.\n */\n this.add = false;\n /**\n * Specifies Create access granted.\n */\n this.create = false;\n /**\n * Specifies Write access granted.\n */\n this.write = false;\n /**\n * Specifies Delete access granted.\n */\n this.delete = false;\n /**\n * Specifies Delete version access granted.\n */\n this.deleteVersion = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Specifies Move access granted.\n */\n this.move = false;\n /**\n * Specifies Execute access granted.\n */\n this.execute = false;\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n }\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const blobSASPermissions = new BlobSASPermissions();\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n case \"i\":\n blobSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n blobSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n return blobSASPermissions;\n }\n /**\n * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const blobSASPermissions = new BlobSASPermissions();\n if (permissionLike.read) {\n blobSASPermissions.read = true;\n }\n if (permissionLike.add) {\n blobSASPermissions.add = true;\n }\n if (permissionLike.create) {\n blobSASPermissions.create = true;\n }\n if (permissionLike.write) {\n blobSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n blobSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n blobSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n blobSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n blobSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n blobSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n blobSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n blobSASPermissions.permanentDelete = true;\n }\n return blobSASPermissions;\n }\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the BlobSASPermissions\n */\n toString() {\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass ContainerSASPermissions {\n constructor() {\n /**\n * Specifies Read access granted.\n */\n this.read = false;\n /**\n * Specifies Add access granted.\n */\n this.add = false;\n /**\n * Specifies Create access granted.\n */\n this.create = false;\n /**\n * Specifies Write access granted.\n */\n this.write = false;\n /**\n * Specifies Delete access granted.\n */\n this.delete = false;\n /**\n * Specifies Delete version access granted.\n */\n this.deleteVersion = false;\n /**\n * Specifies List access granted.\n */\n this.list = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Specifies Move access granted.\n */\n this.move = false;\n /**\n * Specifies Execute access granted.\n */\n this.execute = false;\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n this.filterByTags = false;\n }\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const containerSASPermissions = new ContainerSASPermissions();\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n case \"i\":\n containerSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n containerSASPermissions.permanentDelete = true;\n break;\n case \"f\":\n containerSASPermissions.filterByTags = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n return containerSASPermissions;\n }\n /**\n * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const containerSASPermissions = new ContainerSASPermissions();\n if (permissionLike.read) {\n containerSASPermissions.read = true;\n }\n if (permissionLike.add) {\n containerSASPermissions.add = true;\n }\n if (permissionLike.create) {\n containerSASPermissions.create = true;\n }\n if (permissionLike.write) {\n containerSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n containerSASPermissions.delete = true;\n }\n if (permissionLike.list) {\n containerSASPermissions.list = true;\n }\n if (permissionLike.deleteVersion) {\n containerSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n containerSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n containerSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n containerSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n containerSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n containerSASPermissions.permanentDelete = true;\n }\n if (permissionLike.filterByTags) {\n containerSASPermissions.filterByTags = true;\n }\n return containerSASPermissions;\n }\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n */\n toString() {\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n if (this.filterByTags) {\n permissions.push(\"f\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas\n */\nclass UserDelegationKeyCredential {\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param accountName -\n * @param userDelegationKey -\n */\n constructor(accountName, userDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n computeHMACSHA256(stringToSign) {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n return crypto.createHmac(\"sha256\", this.key).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @param ipRange -\n */\nfunction ipRangeToString(ipRange) {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Protocols for generated SAS.\n */\nexports.SASProtocol = void 0;\n(function (SASProtocol) {\n /**\n * Protocol that allows HTTPS only\n */\n SASProtocol[\"Https\"] = \"https\";\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n SASProtocol[\"HttpsAndHttp\"] = \"https,http\";\n})(exports.SASProtocol || (exports.SASProtocol = {}));\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nclass SASQueryParameters {\n constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {\n this.version = version;\n this.signature = signature;\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.encryptionScope = permissionsOrOptions.encryptionScope;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n }\n else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.encryptionScope = encryptionScope;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n get ipRange() {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n toString() {\n const params = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"ses\",\n \"skoid\",\n \"sktid\",\n \"skt\",\n \"ske\",\n \"sks\",\n \"skv\",\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\",\n ];\n const queries = [];\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined);\n break;\n case \"se\":\n this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined);\n break;\n case \"sip\":\n this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined);\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"ses\":\n this.tryAppendQueryParameter(queries, param, this.encryptionScope);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined);\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined);\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n tryAppendQueryParameter(queries, key, value) {\n if (!value) {\n return;\n }\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential;\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey);\n }\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n // Version 2020-12-06 adds support for encryptionscope in SAS.\n if (version >= \"2020-12-06\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);\n }\n }\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential);\n }\n else {\n return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential);\n }\n }\n }\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n throw new RangeError(\"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\");\n }\n }\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);\n}\nfunction getCanonicalName(accountName, containerName, blobName) {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\nfunction SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\") {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'y' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n if (version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n if (version < \"2021-04-10\" &&\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.filterByTags) {\n throw RangeError(\"'version' must be >= '2021-04-10' when providing the 'f' permission.\");\n }\n if (version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\");\n }\n if (blobSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n */\nclass BlobLeaseClient {\n /**\n * Creates an instance of BlobLeaseClient.\n * @param client - The client to make the lease operation requests.\n * @param leaseId - Initial proposed lease id.\n */\n constructor(client, leaseId) {\n const clientContext = new StorageClientContext(client.url, client.pipeline.toServiceClientOptions());\n this._url = client.url;\n if (client.name === undefined) {\n this._isContainer = true;\n this._containerOrBlobOperation = new Container(clientContext);\n }\n else {\n this._isContainer = false;\n this._containerOrBlobOperation = new Blob$1(clientContext);\n }\n if (!leaseId) {\n leaseId = coreHttp.generateUuid();\n }\n this._leaseId = leaseId;\n }\n /**\n * Gets the lease Id.\n *\n * @readonly\n */\n get leaseId() {\n return this._leaseId;\n }\n /**\n * Gets the url.\n *\n * @readonly\n */\n get url() {\n return this._url;\n }\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param duration - Must be between 15 to 60 seconds, or infinite (-1)\n * @param options - option to configure lease management operations.\n * @returns Response data for acquire lease operation.\n */\n async acquireLease(duration, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-acquireLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.acquireLease(Object.assign({ abortSignal: options.abortSignal, duration, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), proposedLeaseId: this._leaseId }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To change the ID of the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param proposedLeaseId - the proposed new lease Id.\n * @param options - option to configure lease management operations.\n * @returns Response data for change lease operation.\n */\n async changeLease(proposedLeaseId, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-changeLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n const response = await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n this._leaseId = proposedLeaseId;\n return response;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - option to configure lease management operations.\n * @returns Response data for release lease operation.\n */\n async releaseLease(options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-releaseLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.releaseLease(this._leaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To renew the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - Optional option to configure lease management operations.\n * @returns Response data for renew lease operation.\n */\n async renewLease(options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-renewLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.renewLease(this._leaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param breakPeriod - Break period\n * @param options - Optional options to configure lease management operations.\n * @returns Response data for break lease operation.\n */\n async breakLease(breakPeriod, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-breakLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n const operationOptions = Object.assign({ abortSignal: options.abortSignal, breakPeriod, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions));\n return await this._containerOrBlobOperation.breakLease(operationOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n */\nclass RetriableReadableStream extends stream.Readable {\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param getter - A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param offset - Offset position in original data source to read\n * @param count - How much data in original data source to read\n * @param options -\n */\n constructor(source, getter, offset, count, options = {}) {\n super({ highWaterMark: options.highWaterMark });\n this.retries = 0;\n this.sourceDataHandler = (data) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n this.sourceErrorOrEndHandler = (err) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n }\n else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n }\n else {\n this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));\n }\n }\n else {\n this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));\n }\n };\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n this.setSourceEventHandlers();\n }\n _read() {\n this.source.resume();\n }\n setSourceEventHandlers() {\n this.source.on(\"data\", this.sourceDataHandler);\n this.source.on(\"end\", this.sourceErrorOrEndHandler);\n this.source.on(\"error\", this.sourceErrorOrEndHandler);\n }\n removeSourceEventHandlers() {\n this.source.removeListener(\"data\", this.sourceDataHandler);\n this.source.removeListener(\"end\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"error\", this.sourceErrorOrEndHandler);\n }\n _destroy(error, callback) {\n // remove listener from source and release source\n this.removeSourceEventHandlers();\n this.source.destroy();\n callback(error === null ? undefined : error);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will\n * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot\n * trigger retries defined in pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js\n * Readable stream.\n */\nclass BlobDownloadResponse {\n /**\n * Creates an instance of BlobDownloadResponse.\n *\n * @param originalResponse -\n * @param getter -\n * @param offset -\n * @param count -\n * @param options -\n */\n constructor(originalResponse, getter, offset, count, options = {}) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);\n }\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n */\n get acceptRanges() {\n return this.originalResponse.acceptRanges;\n }\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n */\n get cacheControl() {\n return this.originalResponse.cacheControl;\n }\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n */\n get contentDisposition() {\n return this.originalResponse.contentDisposition;\n }\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n */\n get contentEncoding() {\n return this.originalResponse.contentEncoding;\n }\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n */\n get contentLanguage() {\n return this.originalResponse.contentLanguage;\n }\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n */\n get blobSequenceNumber() {\n return this.originalResponse.blobSequenceNumber;\n }\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n */\n get blobType() {\n return this.originalResponse.blobType;\n }\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n */\n get contentLength() {\n return this.originalResponse.contentLength;\n }\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n */\n get contentMD5() {\n return this.originalResponse.contentMD5;\n }\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n */\n get contentRange() {\n return this.originalResponse.contentRange;\n }\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n */\n get contentType() {\n return this.originalResponse.contentType;\n }\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n */\n get copyCompletedOn() {\n return this.originalResponse.copyCompletedOn;\n }\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n */\n get copyId() {\n return this.originalResponse.copyId;\n }\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n */\n get copyProgress() {\n return this.originalResponse.copyProgress;\n }\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n */\n get copySource() {\n return this.originalResponse.copySource;\n }\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n */\n get copyStatus() {\n return this.originalResponse.copyStatus;\n }\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n */\n get copyStatusDescription() {\n return this.originalResponse.copyStatusDescription;\n }\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n */\n get leaseDuration() {\n return this.originalResponse.leaseDuration;\n }\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n */\n get leaseState() {\n return this.originalResponse.leaseState;\n }\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n */\n get leaseStatus() {\n return this.originalResponse.leaseStatus;\n }\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n */\n get date() {\n return this.originalResponse.date;\n }\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n */\n get blobCommittedBlockCount() {\n return this.originalResponse.blobCommittedBlockCount;\n }\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n */\n get etag() {\n return this.originalResponse.etag;\n }\n /**\n * The number of tags associated with the blob\n *\n * @readonly\n */\n get tagCount() {\n return this.originalResponse.tagCount;\n }\n /**\n * The error code.\n *\n * @readonly\n */\n get errorCode() {\n return this.originalResponse.errorCode;\n }\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n */\n get isServerEncrypted() {\n return this.originalResponse.isServerEncrypted;\n }\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n */\n get blobContentMD5() {\n return this.originalResponse.blobContentMD5;\n }\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n */\n get lastModified() {\n return this.originalResponse.lastModified;\n }\n /**\n * Returns the UTC date and time generated by the service that indicates the time at which the blob was\n * last read or written to.\n *\n * @readonly\n */\n get lastAccessed() {\n return this.originalResponse.lastAccessed;\n }\n /**\n * Returns the date and time the blob was created.\n *\n * @readonly\n */\n get createdOn() {\n return this.originalResponse.createdOn;\n }\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n */\n get metadata() {\n return this.originalResponse.metadata;\n }\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n */\n get requestId() {\n return this.originalResponse.requestId;\n }\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n */\n get clientRequestId() {\n return this.originalResponse.clientRequestId;\n }\n /**\n * Indicates the version of the Blob service used\n * to execute the request.\n *\n * @readonly\n */\n get version() {\n return this.originalResponse.version;\n }\n /**\n * Indicates the versionId of the downloaded blob version.\n *\n * @readonly\n */\n get versionId() {\n return this.originalResponse.versionId;\n }\n /**\n * Indicates whether version of this blob is a current version.\n *\n * @readonly\n */\n get isCurrentVersion() {\n return this.originalResponse.isCurrentVersion;\n }\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n */\n get encryptionKeySha256() {\n return this.originalResponse.encryptionKeySha256;\n }\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n get contentCrc64() {\n return this.originalResponse.contentCrc64;\n }\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @readonly\n */\n get objectReplicationDestinationPolicyId() {\n return this.originalResponse.objectReplicationDestinationPolicyId;\n }\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @readonly\n */\n get objectReplicationSourceProperties() {\n return this.originalResponse.objectReplicationSourceProperties;\n }\n /**\n * If this blob has been sealed.\n *\n * @readonly\n */\n get isSealed() {\n return this.originalResponse.isSealed;\n }\n /**\n * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire.\n *\n * @readonly\n */\n get immutabilityPolicyExpiresOn() {\n return this.originalResponse.immutabilityPolicyExpiresOn;\n }\n /**\n * Indicates immutability policy mode.\n *\n * @readonly\n */\n get immutabilityPolicyMode() {\n return this.originalResponse.immutabilityPolicyMode;\n }\n /**\n * Indicates if a legal hold is present on the blob.\n *\n * @readonly\n */\n get legalHold() {\n return this.originalResponse.legalHold;\n }\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n */\n get contentAsBlob() {\n return this.originalResponse.blobBody;\n }\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will automatically retry when internal read stream unexpected ends.\n *\n * @readonly\n */\n get readableStreamBody() {\n return coreHttp.isNode ? this.blobDownloadStream : undefined;\n }\n /**\n * The HTTP response.\n */\n get _response() {\n return this.originalResponse._response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst AVRO_SYNC_MARKER_SIZE = 16;\nconst AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]);\nconst AVRO_CODEC_KEY = \"avro.codec\";\nconst AVRO_SCHEMA_KEY = \"avro.schema\";\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nclass AvroParser {\n /**\n * Reads a fixed number of bytes from the stream.\n *\n * @param stream -\n * @param length -\n * @param options -\n */\n static async readFixedBytes(stream, length, options = {}) {\n const bytes = await stream.read(length, { abortSignal: options.abortSignal });\n if (bytes.length !== length) {\n throw new Error(\"Hit stream end.\");\n }\n return bytes;\n }\n /**\n * Reads a single byte from the stream.\n *\n * @param stream -\n * @param options -\n */\n static async readByte(stream, options = {}) {\n const buf = await AvroParser.readFixedBytes(stream, 1, options);\n return buf[0];\n }\n // int and long are stored in variable-length zig-zag coding.\n // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt\n // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types\n static async readZigZagLong(stream, options = {}) {\n let zigZagEncoded = 0;\n let significanceInBit = 0;\n let byte, haveMoreByte, significanceInFloat;\n do {\n byte = await AvroParser.readByte(stream, options);\n haveMoreByte = byte & 0x80;\n zigZagEncoded |= (byte & 0x7f) << significanceInBit;\n significanceInBit += 7;\n } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers\n if (haveMoreByte) {\n // Switch to float arithmetic\n // eslint-disable-next-line no-self-assign\n zigZagEncoded = zigZagEncoded;\n significanceInFloat = 268435456; // 2 ** 28.\n do {\n byte = await AvroParser.readByte(stream, options);\n zigZagEncoded += (byte & 0x7f) * significanceInFloat;\n significanceInFloat *= 128; // 2 ** 7\n } while (byte & 0x80);\n const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;\n if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {\n throw new Error(\"Integer overflow.\");\n }\n return res;\n }\n return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);\n }\n static async readLong(stream, options = {}) {\n return AvroParser.readZigZagLong(stream, options);\n }\n static async readInt(stream, options = {}) {\n return AvroParser.readZigZagLong(stream, options);\n }\n static async readNull() {\n return null;\n }\n static async readBoolean(stream, options = {}) {\n const b = await AvroParser.readByte(stream, options);\n if (b === 1) {\n return true;\n }\n else if (b === 0) {\n return false;\n }\n else {\n throw new Error(\"Byte was not a boolean.\");\n }\n }\n static async readFloat(stream, options = {}) {\n const u8arr = await AvroParser.readFixedBytes(stream, 4, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat32(0, true); // littleEndian = true\n }\n static async readDouble(stream, options = {}) {\n const u8arr = await AvroParser.readFixedBytes(stream, 8, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat64(0, true); // littleEndian = true\n }\n static async readBytes(stream, options = {}) {\n const size = await AvroParser.readLong(stream, options);\n if (size < 0) {\n throw new Error(\"Bytes size was negative.\");\n }\n return stream.read(size, { abortSignal: options.abortSignal });\n }\n static async readString(stream, options = {}) {\n const u8arr = await AvroParser.readBytes(stream, options);\n const utf8decoder = new TextDecoder();\n return utf8decoder.decode(u8arr);\n }\n static async readMapPair(stream, readItemMethod, options = {}) {\n const key = await AvroParser.readString(stream, options);\n // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.\n const value = await readItemMethod(stream, options);\n return { key, value };\n }\n static async readMap(stream, readItemMethod, options = {}) {\n const readPairMethod = (s, opts = {}) => {\n return AvroParser.readMapPair(s, readItemMethod, opts);\n };\n const pairs = await AvroParser.readArray(stream, readPairMethod, options);\n const dict = {};\n for (const pair of pairs) {\n dict[pair.key] = pair.value;\n }\n return dict;\n }\n static async readArray(stream, readItemMethod, options = {}) {\n const items = [];\n for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) {\n if (count < 0) {\n // Ignore block sizes\n await AvroParser.readLong(stream, options);\n count = -count;\n }\n while (count--) {\n const item = await readItemMethod(stream, options);\n items.push(item);\n }\n }\n return items;\n }\n}\nvar AvroComplex;\n(function (AvroComplex) {\n AvroComplex[\"RECORD\"] = \"record\";\n AvroComplex[\"ENUM\"] = \"enum\";\n AvroComplex[\"ARRAY\"] = \"array\";\n AvroComplex[\"MAP\"] = \"map\";\n AvroComplex[\"UNION\"] = \"union\";\n AvroComplex[\"FIXED\"] = \"fixed\";\n})(AvroComplex || (AvroComplex = {}));\nvar AvroPrimitive;\n(function (AvroPrimitive) {\n AvroPrimitive[\"NULL\"] = \"null\";\n AvroPrimitive[\"BOOLEAN\"] = \"boolean\";\n AvroPrimitive[\"INT\"] = \"int\";\n AvroPrimitive[\"LONG\"] = \"long\";\n AvroPrimitive[\"FLOAT\"] = \"float\";\n AvroPrimitive[\"DOUBLE\"] = \"double\";\n AvroPrimitive[\"BYTES\"] = \"bytes\";\n AvroPrimitive[\"STRING\"] = \"string\";\n})(AvroPrimitive || (AvroPrimitive = {}));\nclass AvroType {\n /**\n * Determines the AvroType from the Avro Schema.\n */\n static fromSchema(schema) {\n if (typeof schema === \"string\") {\n return AvroType.fromStringSchema(schema);\n }\n else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n }\n else {\n return AvroType.fromObjectSchema(schema);\n }\n }\n static fromStringSchema(schema) {\n switch (schema) {\n case AvroPrimitive.NULL:\n case AvroPrimitive.BOOLEAN:\n case AvroPrimitive.INT:\n case AvroPrimitive.LONG:\n case AvroPrimitive.FLOAT:\n case AvroPrimitive.DOUBLE:\n case AvroPrimitive.BYTES:\n case AvroPrimitive.STRING:\n return new AvroPrimitiveType(schema);\n default:\n throw new Error(`Unexpected Avro type ${schema}`);\n }\n }\n static fromArraySchema(schema) {\n return new AvroUnionType(schema.map(AvroType.fromSchema));\n }\n static fromObjectSchema(schema) {\n const type = schema.type;\n // Primitives can be defined as strings or objects\n try {\n return AvroType.fromStringSchema(type);\n }\n catch (err) {\n // eslint-disable-line no-empty\n }\n switch (type) {\n case AvroComplex.RECORD:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.name) {\n throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);\n }\n // eslint-disable-next-line no-case-declarations\n const fields = {};\n if (!schema.fields) {\n throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);\n }\n for (const field of schema.fields) {\n fields[field.name] = AvroType.fromSchema(field.type);\n }\n return new AvroRecordType(fields, schema.name);\n case AvroComplex.ENUM:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.symbols) {\n throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);\n }\n return new AvroEnumType(schema.symbols);\n case AvroComplex.MAP:\n if (!schema.values) {\n throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);\n }\n return new AvroMapType(AvroType.fromSchema(schema.values));\n case AvroComplex.ARRAY: // Unused today\n case AvroComplex.FIXED: // Unused today\n default:\n throw new Error(`Unexpected Avro type ${type} in ${schema}`);\n }\n }\n}\nclass AvroPrimitiveType extends AvroType {\n constructor(primitive) {\n super();\n this._primitive = primitive;\n }\n read(stream, options = {}) {\n switch (this._primitive) {\n case AvroPrimitive.NULL:\n return AvroParser.readNull();\n case AvroPrimitive.BOOLEAN:\n return AvroParser.readBoolean(stream, options);\n case AvroPrimitive.INT:\n return AvroParser.readInt(stream, options);\n case AvroPrimitive.LONG:\n return AvroParser.readLong(stream, options);\n case AvroPrimitive.FLOAT:\n return AvroParser.readFloat(stream, options);\n case AvroPrimitive.DOUBLE:\n return AvroParser.readDouble(stream, options);\n case AvroPrimitive.BYTES:\n return AvroParser.readBytes(stream, options);\n case AvroPrimitive.STRING:\n return AvroParser.readString(stream, options);\n default:\n throw new Error(\"Unknown Avro Primitive\");\n }\n }\n}\nclass AvroEnumType extends AvroType {\n constructor(symbols) {\n super();\n this._symbols = symbols;\n }\n async read(stream, options = {}) {\n const value = await AvroParser.readInt(stream, options);\n return this._symbols[value];\n }\n}\nclass AvroUnionType extends AvroType {\n constructor(types) {\n super();\n this._types = types;\n }\n async read(stream, options = {}) {\n // eslint-disable-line @typescript-eslint/ban-types\n const typeIndex = await AvroParser.readInt(stream, options);\n return this._types[typeIndex].read(stream, options);\n }\n}\nclass AvroMapType extends AvroType {\n constructor(itemType) {\n super();\n this._itemType = itemType;\n }\n read(stream, options = {}) {\n const readItemMethod = (s, opts) => {\n return this._itemType.read(s, opts);\n };\n return AvroParser.readMap(stream, readItemMethod, options);\n }\n}\nclass AvroRecordType extends AvroType {\n constructor(fields, name) {\n super();\n this._fields = fields;\n this._name = name;\n }\n async read(stream, options = {}) {\n const record = {};\n record[\"$schema\"] = this._name;\n for (const key in this._fields) {\n if (Object.prototype.hasOwnProperty.call(this._fields, key)) {\n record[key] = await this._fields[key].read(stream, options);\n }\n }\n return record;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nfunction arraysEqual(a, b) {\n if (a === b)\n return true;\n // eslint-disable-next-line eqeqeq\n if (a == null || b == null)\n return false;\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n\n// Copyright (c) Microsoft Corporation.\nclass AvroReader {\n constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {\n this._dataStream = dataStream;\n this._headerStream = headerStream || dataStream;\n this._initialized = false;\n this._blockOffset = currentBlockOffset || 0;\n this._objectIndex = indexWithinCurrentBlock || 0;\n this._initialBlockOffset = currentBlockOffset || 0;\n }\n get blockOffset() {\n return this._blockOffset;\n }\n get objectIndex() {\n return this._objectIndex;\n }\n async initialize(options = {}) {\n const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {\n abortSignal: options.abortSignal,\n });\n if (!arraysEqual(header, AVRO_INIT_BYTES)) {\n throw new Error(\"Stream is not an Avro file.\");\n }\n // File metadata is written as if defined by the following map schema:\n // { \"type\": \"map\", \"values\": \"bytes\"}\n this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {\n abortSignal: options.abortSignal,\n });\n // Validate codec\n const codec = this._metadata[AVRO_CODEC_KEY];\n if (!(codec === undefined || codec === null || codec === \"null\")) {\n throw new Error(\"Codecs are not supported\");\n }\n // The 16-byte, randomly-generated sync marker for this file.\n this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal,\n });\n // Parse the schema\n const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);\n this._itemType = AvroType.fromSchema(schema);\n if (this._blockOffset === 0) {\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n }\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal,\n });\n // skip block length\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n this._initialized = true;\n if (this._objectIndex && this._objectIndex > 0) {\n for (let i = 0; i < this._objectIndex; i++) {\n await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });\n this._itemsRemainingInBlock--;\n }\n }\n }\n hasNext() {\n return !this._initialized || this._itemsRemainingInBlock > 0;\n }\n parseObjects(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* parseObjects_1() {\n if (!this._initialized) {\n yield tslib.__await(this.initialize(options));\n }\n while (this.hasNext()) {\n const result = yield tslib.__await(this._itemType.read(this._dataStream, {\n abortSignal: options.abortSignal,\n }));\n this._itemsRemainingInBlock--;\n this._objectIndex++;\n if (this._itemsRemainingInBlock === 0) {\n const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal,\n }));\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n this._objectIndex = 0;\n if (!arraysEqual(this._syncMarker, marker)) {\n throw new Error(\"Stream is not a valid Avro file.\");\n }\n try {\n this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal,\n }));\n }\n catch (err) {\n // We hit the end of the stream.\n this._itemsRemainingInBlock = 0;\n }\n if (this._itemsRemainingInBlock > 0) {\n // Ignore block size\n yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }));\n }\n }\n yield yield tslib.__await(result);\n }\n });\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nclass AvroReadable {\n}\n\n// Copyright (c) Microsoft Corporation.\nconst ABORT_ERROR = new abortController.AbortError(\"Reading from the avro stream was aborted.\");\nclass AvroReadableFromStream extends AvroReadable {\n constructor(readable) {\n super();\n this._readable = readable;\n this._position = 0;\n }\n toUint8Array(data) {\n if (typeof data === \"string\") {\n return Buffer.from(data);\n }\n return data;\n }\n get position() {\n return this._position;\n }\n async read(size, options = {}) {\n var _a;\n if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n throw ABORT_ERROR;\n }\n if (size < 0) {\n throw new Error(`size parameter should be positive: ${size}`);\n }\n if (size === 0) {\n return new Uint8Array();\n }\n if (!this._readable.readable) {\n throw new Error(\"Stream no longer readable.\");\n }\n // See if there is already enough data.\n const chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n // chunk.length maybe less than desired size if the stream ends.\n return this.toUint8Array(chunk);\n }\n else {\n // register callback to wait for enough data to read\n return new Promise((resolve, reject) => {\n /* eslint-disable @typescript-eslint/no-use-before-define */\n const cleanUp = () => {\n this._readable.removeListener(\"readable\", readableCallback);\n this._readable.removeListener(\"error\", rejectCallback);\n this._readable.removeListener(\"end\", rejectCallback);\n this._readable.removeListener(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal.removeEventListener(\"abort\", abortHandler);\n }\n };\n const readableCallback = () => {\n const callbackChunk = this._readable.read(size);\n if (callbackChunk) {\n this._position += callbackChunk.length;\n cleanUp();\n // callbackChunk.length maybe less than desired size if the stream ends.\n resolve(this.toUint8Array(callbackChunk));\n }\n };\n const rejectCallback = () => {\n cleanUp();\n reject();\n };\n const abortHandler = () => {\n cleanUp();\n reject(ABORT_ERROR);\n };\n this._readable.on(\"readable\", readableCallback);\n this._readable.once(\"error\", rejectCallback);\n this._readable.once(\"end\", rejectCallback);\n this._readable.once(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", abortHandler);\n }\n /* eslint-enable @typescript-eslint/no-use-before-define */\n });\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n */\nclass BlobQuickQueryStream extends stream.Readable {\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param options -\n */\n constructor(source, options = {}) {\n super();\n this.avroPaused = true;\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n _read() {\n if (this.avroPaused) {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n }\n async readInternal() {\n this.avroPaused = false;\n let avroNext;\n do {\n avroNext = await this.avroIter.next();\n if (avroNext.done) {\n break;\n }\n const obj = avroNext.value;\n const schema = obj.$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n {\n const data = obj.data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n this.avroPaused = true;\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n {\n const bytesScanned = obj.bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = obj.totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = obj.fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = obj.name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = obj.description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = obj.position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description,\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n } while (!avroNext.done && !this.avroPaused);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will\n * parse avor data returned by blob query.\n */\nclass BlobQueryResponse {\n /**\n * Creates an instance of BlobQueryResponse.\n *\n * @param originalResponse -\n * @param options -\n */\n constructor(originalResponse, options = {}) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);\n }\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n */\n get acceptRanges() {\n return this.originalResponse.acceptRanges;\n }\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n */\n get cacheControl() {\n return this.originalResponse.cacheControl;\n }\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n */\n get contentDisposition() {\n return this.originalResponse.contentDisposition;\n }\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n */\n get contentEncoding() {\n return this.originalResponse.contentEncoding;\n }\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n */\n get contentLanguage() {\n return this.originalResponse.contentLanguage;\n }\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n */\n get blobSequenceNumber() {\n return this.originalResponse.blobSequenceNumber;\n }\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n */\n get blobType() {\n return this.originalResponse.blobType;\n }\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n */\n get contentLength() {\n return this.originalResponse.contentLength;\n }\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n */\n get contentMD5() {\n return this.originalResponse.contentMD5;\n }\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n */\n get contentRange() {\n return this.originalResponse.contentRange;\n }\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n */\n get contentType() {\n return this.originalResponse.contentType;\n }\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n */\n get copyCompletedOn() {\n return undefined;\n }\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n */\n get copyId() {\n return this.originalResponse.copyId;\n }\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n */\n get copyProgress() {\n return this.originalResponse.copyProgress;\n }\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n */\n get copySource() {\n return this.originalResponse.copySource;\n }\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n */\n get copyStatus() {\n return this.originalResponse.copyStatus;\n }\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n */\n get copyStatusDescription() {\n return this.originalResponse.copyStatusDescription;\n }\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n */\n get leaseDuration() {\n return this.originalResponse.leaseDuration;\n }\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n */\n get leaseState() {\n return this.originalResponse.leaseState;\n }\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n */\n get leaseStatus() {\n return this.originalResponse.leaseStatus;\n }\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n */\n get date() {\n return this.originalResponse.date;\n }\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n */\n get blobCommittedBlockCount() {\n return this.originalResponse.blobCommittedBlockCount;\n }\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n */\n get etag() {\n return this.originalResponse.etag;\n }\n /**\n * The error code.\n *\n * @readonly\n */\n get errorCode() {\n return this.originalResponse.errorCode;\n }\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n */\n get isServerEncrypted() {\n return this.originalResponse.isServerEncrypted;\n }\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n */\n get blobContentMD5() {\n return this.originalResponse.blobContentMD5;\n }\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n */\n get lastModified() {\n return this.originalResponse.lastModified;\n }\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n */\n get metadata() {\n return this.originalResponse.metadata;\n }\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n */\n get requestId() {\n return this.originalResponse.requestId;\n }\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n */\n get clientRequestId() {\n return this.originalResponse.clientRequestId;\n }\n /**\n * Indicates the version of the File service used\n * to execute the request.\n *\n * @readonly\n */\n get version() {\n return this.originalResponse.version;\n }\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n */\n get encryptionKeySha256() {\n return this.originalResponse.encryptionKeySha256;\n }\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n get contentCrc64() {\n return this.originalResponse.contentCrc64;\n }\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n */\n get blobBody() {\n return undefined;\n }\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will parse avor data returned by blob query.\n *\n * @readonly\n */\n get readableStreamBody() {\n return coreHttp.isNode ? this.blobDownloadStream : undefined;\n }\n /**\n * The HTTP response.\n */\n get _response() {\n return this.originalResponse._response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Represents the access tier on a blob.\n * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}\n */\nexports.BlockBlobTier = void 0;\n(function (BlockBlobTier) {\n /**\n * Optimized for storing data that is accessed frequently.\n */\n BlockBlobTier[\"Hot\"] = \"Hot\";\n /**\n * Optimized for storing data that is infrequently accessed and stored for at least 30 days.\n */\n BlockBlobTier[\"Cool\"] = \"Cool\";\n /**\n * Optimized for storing data that is rarely accessed.\n */\n BlockBlobTier[\"Cold\"] = \"Cold\";\n /**\n * Optimized for storing data that is rarely accessed and stored for at least 180 days\n * with flexible latency requirements (on the order of hours).\n */\n BlockBlobTier[\"Archive\"] = \"Archive\";\n})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));\n/**\n * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.\n * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}\n * for detailed information on the corresponding IOPS and throughput per PageBlobTier.\n */\nexports.PremiumPageBlobTier = void 0;\n(function (PremiumPageBlobTier) {\n /**\n * P4 Tier.\n */\n PremiumPageBlobTier[\"P4\"] = \"P4\";\n /**\n * P6 Tier.\n */\n PremiumPageBlobTier[\"P6\"] = \"P6\";\n /**\n * P10 Tier.\n */\n PremiumPageBlobTier[\"P10\"] = \"P10\";\n /**\n * P15 Tier.\n */\n PremiumPageBlobTier[\"P15\"] = \"P15\";\n /**\n * P20 Tier.\n */\n PremiumPageBlobTier[\"P20\"] = \"P20\";\n /**\n * P30 Tier.\n */\n PremiumPageBlobTier[\"P30\"] = \"P30\";\n /**\n * P40 Tier.\n */\n PremiumPageBlobTier[\"P40\"] = \"P40\";\n /**\n * P50 Tier.\n */\n PremiumPageBlobTier[\"P50\"] = \"P50\";\n /**\n * P60 Tier.\n */\n PremiumPageBlobTier[\"P60\"] = \"P60\";\n /**\n * P70 Tier.\n */\n PremiumPageBlobTier[\"P70\"] = \"P70\";\n /**\n * P80 Tier.\n */\n PremiumPageBlobTier[\"P80\"] = \"P80\";\n})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {}));\nfunction toAccessTier(tier) {\n if (tier === undefined) {\n return undefined;\n }\n return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service).\n}\nfunction ensureCpkIfSpecified(cpk, isHttps) {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n/**\n * Defines the known cloud audiences for Storage.\n */\nexports.StorageBlobAudience = void 0;\n(function (StorageBlobAudience) {\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Storage.\n */\n StorageBlobAudience[\"StorageOAuthScopes\"] = \"https://storage.azure.com/.default\";\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Disk.\n */\n StorageBlobAudience[\"DiskComputeOAuthScopes\"] = \"https://disk.compute.azure.com/.default\";\n})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Function that converts PageRange and ClearRange to a common Range object.\n * PageRange and ClearRange have start and end while Range offset and count\n * this function normalizes to Range.\n * @param response - Model PageBlob Range response\n */\nfunction rangeResponseFromModel(response) {\n const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start,\n }));\n const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start,\n }));\n return Object.assign(Object.assign({}, response), { pageRange,\n clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {\n pageRange,\n clearRange,\n } }) });\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This is the poller returned by {@link BlobClient.beginCopyFromURL}.\n * This can not be instantiated directly outside of this package.\n *\n * @hidden\n */\nclass BlobBeginCopyFromUrlPoller extends coreLro.Poller {\n constructor(options) {\n const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;\n let state;\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { blobClient,\n copySource,\n startCopyFromURLOptions }));\n super(operation);\n if (typeof onProgress === \"function\") {\n this.onProgress(onProgress);\n }\n this.intervalInMs = intervalInMs;\n }\n delay() {\n return coreHttp.delay(this.intervalInMs);\n }\n}\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst cancel = async function cancel(options = {}) {\n const state = this.state;\n const { copyId } = state;\n if (state.isCompleted) {\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n if (!copyId) {\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call\n await state.blobClient.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal,\n });\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst update = async function update(options = {}) {\n const state = this.state;\n const { blobClient, copySource, startCopyFromURLOptions } = state;\n if (!state.isStarted) {\n state.isStarted = true;\n const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions);\n // copyId is needed to abort\n state.copyId = result.copyId;\n if (result.copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n }\n else if (!state.isCompleted) {\n try {\n const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal });\n const { copyStatus, copyProgress } = result;\n const prevCopyProgress = state.copyProgress;\n if (copyProgress) {\n state.copyProgress = copyProgress;\n }\n if (copyStatus === \"pending\" &&\n copyProgress !== prevCopyProgress &&\n typeof options.fireProgress === \"function\") {\n // trigger in setTimeout, or swallow error?\n options.fireProgress(state);\n }\n else if (copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n else if (copyStatus === \"failed\") {\n state.error = new Error(`Blob copy failed with reason: \"${result.copyStatusDescription || \"unknown\"}\"`);\n state.isCompleted = true;\n }\n }\n catch (err) {\n state.error = err;\n state.isCompleted = true;\n }\n }\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst toString = function toString() {\n return JSON.stringify({ state: this.state }, (key, value) => {\n // remove blobClient from serialized state since a client can't be hydrated from this info.\n if (key === \"blobClient\") {\n return undefined;\n }\n return value;\n });\n};\n/**\n * Creates a poll operation given the provided state.\n * @hidden\n */\nfunction makeBlobBeginCopyFromURLPollOperation(state) {\n return {\n state: Object.assign({}, state),\n cancel,\n toString,\n update,\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param iRange -\n */\nfunction rangeToString(iRange) {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * States for Batch.\n */\nvar BatchStates;\n(function (BatchStates) {\n BatchStates[BatchStates[\"Good\"] = 0] = \"Good\";\n BatchStates[BatchStates[\"Error\"] = 1] = \"Error\";\n})(BatchStates || (BatchStates = {}));\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n */\nclass Batch {\n /**\n * Creates an instance of Batch.\n * @param concurrency -\n */\n constructor(concurrency = 5) {\n /**\n * Number of active operations under execution.\n */\n this.actives = 0;\n /**\n * Number of completed operations under execution.\n */\n this.completed = 0;\n /**\n * Offset of next operation to be executed.\n */\n this.offset = 0;\n /**\n * Operation array to be executed.\n */\n this.operations = [];\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n */\n this.state = BatchStates.Good;\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new events.EventEmitter();\n }\n /**\n * Add a operation into queue.\n *\n * @param operation -\n */\n addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n /**\n * Start execute operations in the queue.\n *\n */\n async do() {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n this.parallelExecute();\n return new Promise((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n */\n nextOperation() {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n */\n parallelExecute() {\n if (this.state === BatchStates.Error) {\n return;\n }\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n }\n else {\n return;\n }\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This class generates a readable stream from the data in an array of buffers.\n */\nclass BuffersStream extends stream.Readable {\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param buffers - Array of buffers containing the data\n * @param byteLength - The total length of data contained in the buffers\n */\n constructor(buffers, byteLength, options) {\n super(options);\n this.buffers = buffers;\n this.byteLength = byteLength;\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param size - Optional. The size of data to be read\n */\n _read(size) {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n if (!size) {\n size = this.readableHighWaterMark;\n }\n const outBuffers = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n }\n else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n }\n else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n }\n else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n// Can't use import as Typescript doesn't recognize \"buffer\".\nconst maxBufferLength = require(\"buffer\").constants.MAX_LENGTH;\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n */\nclass PooledBuffer {\n constructor(capacity, buffers, totalLength) {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n */\n this.buffers = [];\n this.capacity = capacity;\n this._size = 0;\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n if (buffers) {\n this.fill(buffers, totalLength);\n }\n }\n /**\n * The size of the data contained in the pooled buffers.\n */\n get size() {\n return this._size;\n }\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n *\n */\n fill(buffers, totalLength) {\n this._size = Math.min(this.capacity, totalLength);\n let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n */\n getReadableStream() {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This class accepts a Node.js Readable stream as input, and keeps reading data\n * from the stream into the internal buffer structure, until it reaches maxBuffers.\n * Every available buffer will try to trigger outgoingHandler.\n *\n * The internal buffer structure includes an incoming buffer array, and a outgoing\n * buffer array. The incoming buffer array includes the \"empty\" buffers can be filled\n * with new incoming data. The outgoing array includes the filled buffers to be\n * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.\n *\n * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING\n *\n * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * 1. Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n * 2. concurrency should set a smaller value than maxBuffers, which is helpful to\n * reduce the possibility when a outgoing handler waits for the stream data.\n * in this situation, outgoing handlers are blocked.\n * Outgoing queue shouldn't be empty.\n */\nclass BufferScheduler {\n /**\n * Creates an instance of BufferScheduler.\n *\n * @param readable - A Node.js Readable stream\n * @param bufferSize - Buffer size of every maintained buffer\n * @param maxBuffers - How many buffers can be allocated\n * @param outgoingHandler - An async function scheduled to be\n * triggered when a buffer fully filled\n * with stream data\n * @param concurrency - Concurrency of executing outgoingHandlers (>0)\n * @param encoding - [Optional] Encoding of Readable stream when it's a string stream\n */\n constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }\n /**\n * Start the scheduler, will return error when stream of any of the outgoingHandlers\n * returns error.\n *\n */\n async do() {\n return new Promise((resolve, reject) => {\n this.readable.on(\"data\", (data) => {\n data = typeof data === \"string\" ? Buffer.from(data, this.encoding) : data;\n this.appendUnresolvedData(data);\n if (!this.resolveData()) {\n this.readable.pause();\n }\n });\n this.readable.on(\"error\", (err) => {\n this.emitter.emit(\"error\", err);\n });\n this.readable.on(\"end\", () => {\n this.isStreamEnd = true;\n this.emitter.emit(\"checkEnd\");\n });\n this.emitter.on(\"error\", (err) => {\n this.isError = true;\n this.readable.pause();\n reject(err);\n });\n this.emitter.on(\"checkEnd\", () => {\n if (this.outgoing.length > 0) {\n this.triggerOutgoingHandlers();\n return;\n }\n if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {\n if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {\n const buffer = this.shiftBufferFromUnresolvedDataArray();\n this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)\n .then(resolve)\n .catch(reject);\n }\n else if (this.unresolvedLength >= this.bufferSize) {\n return;\n }\n else {\n resolve();\n }\n }\n });\n });\n }\n /**\n * Insert a new data into unresolved array.\n *\n * @param data -\n */\n appendUnresolvedData(data) {\n this.unresolvedDataArray.push(data);\n this.unresolvedLength += data.length;\n }\n /**\n * Try to shift a buffer with size in blockSize. The buffer returned may be less\n * than blockSize when data in unresolvedDataArray is less than bufferSize.\n *\n */\n shiftBufferFromUnresolvedDataArray(buffer) {\n if (!buffer) {\n buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);\n }\n else {\n buffer.fill(this.unresolvedDataArray, this.unresolvedLength);\n }\n this.unresolvedLength -= buffer.size;\n return buffer;\n }\n /**\n * Resolve data in unresolvedDataArray. For every buffer with size in blockSize\n * shifted, it will try to get (or allocate a buffer) from incoming, and fill it,\n * then push it into outgoing to be handled by outgoing handler.\n *\n * Return false when available buffers in incoming are not enough, else true.\n *\n * @returns Return false when buffers in incoming are not enough, else true.\n */\n resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }\n /**\n * Try to trigger a outgoing handler for every buffer in outgoing. Stop when\n * concurrency reaches.\n */\n async triggerOutgoingHandlers() {\n let buffer;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }\n /**\n * Trigger a outgoing handler for a buffer shifted from outgoing.\n *\n * @param buffer -\n */\n async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }\n /**\n * Return buffer used by outgoing handler into incoming.\n *\n * @param buffer -\n */\n reuseBuffer(buffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param offset - From which position in the buffer to be filled, inclusive\n * @param end - To which position in the buffer to be filled, exclusive\n * @param encoding - Encoding of the Readable stream\n */\nasync function streamToBuffer(stream, buffer, offset, end, encoding) {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT);\n stream.on(\"readable\", () => {\n if (pos >= count) {\n clearTimeout(timeout);\n resolve();\n return;\n }\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n stream.on(\"end\", () => {\n clearTimeout(timeout);\n if (pos < count) {\n reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`));\n }\n resolve();\n });\n stream.on(\"error\", (msg) => {\n clearTimeout(timeout);\n reject(msg);\n });\n });\n}\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param encoding - Encoding of the Readable stream\n * @returns with the count of bytes read.\n * @throws `RangeError` If buffer size is not big enough.\n */\nasync function streamToBuffer2(stream, buffer, encoding) {\n let pos = 0; // Position in stream\n const bufferSize = buffer.length;\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n });\n stream.on(\"end\", () => {\n resolve(pos);\n });\n stream.on(\"error\", reject);\n });\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.\n *\n * @param rs - The read stream.\n * @param file - Destination file path.\n */\nasync function readStreamToLocalFile(rs, file) {\n return new Promise((resolve, reject) => {\n const ws = fs__namespace.createWriteStream(file);\n rs.on(\"error\", (err) => {\n reject(err);\n });\n ws.on(\"error\", (err) => {\n reject(err);\n });\n ws.on(\"close\", resolve);\n rs.pipe(ws);\n });\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nconst fsStat = util__namespace.promisify(fs__namespace.stat);\nconst fsCreateReadStream = fs__namespace.createReadStream;\n\n/**\n * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,\n * append blob, or page blob.\n */\nclass BlobClient extends StorageClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n options = options || {};\n let pipeline;\n let url;\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n if (blobNameOrOptions && typeof blobNameOrOptions !== \"string\") {\n options = blobNameOrOptions;\n }\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n ({ blobName: this._name, containerName: this._containerName } =\n this.getBlobAndContainerNamesFromUrl());\n this.blobContext = new Blob$1(this.storageClientContext);\n this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);\n this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);\n }\n /**\n * The name of the blob.\n */\n get name() {\n return this._name;\n }\n /**\n * The name of the storage container the blob is associated with.\n */\n get containerName() {\n return this._containerName;\n }\n /**\n * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp\n */\n withSnapshot(snapshot) {\n return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a new BlobClient object pointing to a version of this blob.\n * Provide \"\" will remove the versionId and return a Client to the base blob.\n *\n * @param versionId - The versionId.\n * @returns A new BlobClient object pointing to the version of this blob.\n */\n withVersion(versionId) {\n return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline);\n }\n /**\n * Creates a AppendBlobClient object.\n *\n */\n getAppendBlobClient() {\n return new AppendBlobClient(this.url, this.pipeline);\n }\n /**\n * Creates a BlockBlobClient object.\n *\n */\n getBlockBlobClient() {\n return new BlockBlobClient(this.url, this.pipeline);\n }\n /**\n * Creates a PageBlobClient object.\n *\n */\n getPageBlobClient() {\n return new PageBlobClient(this.url, this.pipeline);\n }\n /**\n * Reads or downloads a blob from the system, including its metadata and properties.\n * You can also call Get Blob to read a snapshot.\n *\n * * In Node.js, data returns in a Readable stream readableStreamBody\n * * In browsers, data returns in a promise blobBody\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob\n *\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Optional options to Blob Download operation.\n *\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);\n * console.log(\"Downloaded blob content:\", downloaded.toString());\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * Example usage (browser):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);\n * console.log(\n * \"Downloaded blob content\",\n * downloaded\n * );\n *\n * async function blobToString(blob: Blob): Promise {\n * const fileReader = new FileReader();\n * return new Promise((resolve, reject) => {\n * fileReader.onloadend = (ev: any) => {\n * resolve(ev.target!.result);\n * };\n * fileReader.onerror = reject;\n * fileReader.readAsText(blob);\n * });\n * }\n * ```\n */\n async download(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const { span, updatedOptions } = createSpan(\"BlobClient-download\", options);\n try {\n const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream\n }, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });\n // Return browser response immediately\n if (!coreHttp.isNode) {\n return wrappedRes;\n }\n // We support retrying when download stream unexpected ends in Node.js runtime\n // Following code shouldn't be bundled into browser build, however some\n // bundlers may try to bundle following code and \"FileReadResponse.ts\".\n // In this case, \"FileDownloadResponse.browser.ts\" will be used as a shim of \"FileDownloadResponse.ts\"\n // The config is in package.json \"browser\" field\n if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {\n // TODO: Default value or make it a required parameter?\n options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;\n }\n if (res.contentLength === undefined) {\n throw new RangeError(`File download response doesn't contain valid content length header`);\n }\n if (!res.etag) {\n throw new RangeError(`File download response doesn't contain valid etag header`);\n }\n return new BlobDownloadResponse(wrappedRes, async (start) => {\n var _a;\n const updatedDownloadOptions = {\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ifMatch: options.conditions.ifMatch || res.etag,\n ifModifiedSince: options.conditions.ifModifiedSince,\n ifNoneMatch: options.conditions.ifNoneMatch,\n ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,\n ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,\n },\n range: rangeToString({\n count: offset + res.contentLength - start,\n offset: start,\n }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n };\n // Debug purpose only\n // console.log(\n // `Read from internal stream, range: ${\n // updatedOptions.range\n // }, options: ${JSON.stringify(updatedOptions)}`\n // );\n return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;\n }, offset, res.contentLength, {\n maxRetryRequests: options.maxRetryRequests,\n onProgress: options.onProgress,\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns true if the Azure blob resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing blob might be deleted by other clients or\n * applications. Vice versa new blobs might be added by other clients or applications after this\n * function completes.\n *\n * @param options - options to Exists operation.\n */\n async exists(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-exists\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n await this.getProperties({\n abortSignal: options.abortSignal,\n customerProvidedKey: options.customerProvidedKey,\n conditions: options.conditions,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n }\n catch (e) {\n if (e.statusCode === 404) {\n // Expected exception when checking blob existence\n return false;\n }\n else if (e.statusCode === 409 &&\n (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||\n e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) {\n // Expected exception when checking blob existence\n return true;\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns all user-defined metadata, standard HTTP properties, and system properties\n * for the blob. It does not return the content of the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Optional options to Get Properties operation.\n */\n async getProperties(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-getProperties\", options);\n try {\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const res = await this.blobContext.getProperties(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n async delete(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-delete\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.blobContext.delete(Object.assign({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n async deleteIfExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobNotFound\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a blob or snapshot only if it exists.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Restores the contents and metadata of soft deleted blob and any associated\n * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29\n * or later.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param options - Optional options to Blob Undelete operation.\n */\n async undelete(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-undelete\", options);\n try {\n return await this.blobContext.undelete(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets system properties on the blob.\n *\n * If no value provided, or no value provided for the specified blob HTTP headers,\n * these blob HTTP headers without a value will be cleared.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param blobHTTPHeaders - If no value provided, or no value provided for\n * the specified blob HTTP headers, these blob HTTP\n * headers without a value will be cleared.\n * A common header to set is `blobContentType`\n * enabling the browser to provide functionality\n * based on file type.\n * @param options - Optional options to Blob Set HTTP Headers operation.\n */\n async setHTTPHeaders(blobHTTPHeaders, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setHTTPHeaders\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setHttpHeaders(Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n *\n * If no option provided, or no metadata defined in the parameter, the blob\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional options to Set Metadata operation.\n */\n async setMetadata(metadata, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setMetadata\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setMetadata(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets tags on the underlying blob.\n * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.\n * Valid tag key and value characters include lower and upper case letters, digits (0-9),\n * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').\n *\n * @param tags -\n * @param options -\n */\n async setTags(tags, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setTags\", options);\n try {\n return await this.blobContext.setTags(Object.assign(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)), { tags: toBlobTags(tags) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the tags associated with the underlying blob.\n *\n * @param options -\n */\n async getTags(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-getTags\", options);\n try {\n const response = await this.blobContext.getTags(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the blob.\n *\n * @param proposeLeaseId - Initial proposed lease Id.\n * @returns A new BlobLeaseClient object for managing leases on the blob.\n */\n getBlobLeaseClient(proposeLeaseId) {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n /**\n * Creates a read-only snapshot of a blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob\n *\n * @param options - Optional options to the Blob Create Snapshot operation.\n */\n async createSnapshot(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-createSnapshot\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.createSnapshot(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * This method returns a long running operation poller that allows you to wait\n * indefinitely until the copy is completed.\n * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.\n * Note that the onProgress callback will not be invoked if the operation completes in the first\n * request, and attempting to cancel a completed copy will result in an error being thrown.\n *\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * Example using automatic polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using manual polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * while (!poller.isDone()) {\n * await poller.poll();\n * }\n * const result = copyPoller.getResult();\n * ```\n *\n * Example using progress updates:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * onProgress(state) {\n * console.log(`Progress: ${state.copyProgress}`);\n * }\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using a changing polling interval (default 15 seconds):\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * intervalInMs: 1000 // poll blob every 1 second for copy progress\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using copy cancellation:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * // cancel operation after starting it.\n * try {\n * await copyPoller.cancelOperation();\n * // calls to get the result now throw PollerCancelledError\n * await copyPoller.getResult();\n * } catch (err) {\n * if (err.name === 'PollerCancelledError') {\n * console.log('The copy was cancelled.');\n * }\n * }\n * ```\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n async beginCopyFromURL(copySource, options = {}) {\n const client = {\n abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),\n getProperties: (...args) => this.getProperties(...args),\n startCopyFromURL: (...args) => this.startCopyFromURL(...args),\n };\n const poller = new BlobBeginCopyFromUrlPoller({\n blobClient: client,\n copySource,\n intervalInMs: options.intervalInMs,\n onProgress: options.onProgress,\n resumeFrom: options.resumeFrom,\n startCopyFromURLOptions: options,\n });\n // Trigger the startCopyFromURL call by calling poll.\n // Any errors from this method should be surfaced to the user.\n await poller.poll();\n return poller;\n }\n /**\n * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero\n * length and full metadata. Version 2012-02-12 and newer.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob\n *\n * @param copyId - Id of the Copy From URL operation.\n * @param options - Optional options to the Blob Abort Copy From URL operation.\n */\n async abortCopyFromURL(copyId, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-abortCopyFromURL\", options);\n try {\n return await this.blobContext.abortCopyFromURL(copyId, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url\n *\n * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication\n * @param options -\n */\n async syncCopyFromURL(copySource, options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"BlobClient-syncCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n return await this.blobContext.copyFromURL(copySource, Object.assign({ abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier\n *\n * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.\n * @param options - Optional options to the Blob Set Tier operation.\n */\n async setAccessTier(tier, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setAccessTier\", options);\n try {\n return await this.blobContext.setTier(toAccessTier(tier), Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), rehydratePriority: options.rehydratePriority }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async downloadToBuffer(param1, param2, param3, param4 = {}) {\n let buffer;\n let offset = 0;\n let count = 0;\n let options = param4;\n if (param1 instanceof Buffer) {\n buffer = param1;\n offset = param2 || 0;\n count = typeof param3 === \"number\" ? param3 : 0;\n }\n else {\n offset = typeof param1 === \"number\" ? param1 : 0;\n count = typeof param2 === \"number\" ? param2 : 0;\n options = param3 || {};\n }\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToBuffer\", options);\n try {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0) {\n throw new RangeError(\"blockSize option must be >= 0\");\n }\n if (options.blockSize === 0) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n if (offset < 0) {\n throw new RangeError(\"offset option must be >= 0\");\n }\n if (count && count <= 0) {\n throw new RangeError(\"count option must be greater than 0\");\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n // Customer doesn't specify length, get it\n if (!count) {\n const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n count = response.contentLength - offset;\n if (count < 0) {\n throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);\n }\n }\n // Allocate the buffer of size = count if the buffer is not provided\n if (!buffer) {\n try {\n buffer = Buffer.alloc(count);\n }\n catch (error) {\n throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\\t ${error.message}`);\n }\n }\n if (buffer.length < count) {\n throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`);\n }\n let transferProgress = 0;\n const batch = new Batch(options.concurrency);\n for (let off = offset; off < offset + count; off = off + options.blockSize) {\n batch.addOperation(async () => {\n // Exclusive chunk end position\n let chunkEnd = offset + count;\n if (off + options.blockSize < chunkEnd) {\n chunkEnd = off + options.blockSize;\n }\n const response = await this.download(off, chunkEnd - off, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n maxRetryRequests: options.maxRetryRequestsPerBlock,\n customerProvidedKey: options.customerProvidedKey,\n tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),\n });\n const stream = response.readableStreamBody;\n await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);\n // Update progress after block is downloaded, in case of block trying\n // Could provide finer grained progress updating inside HTTP requests,\n // only if convenience layer download try is enabled\n transferProgress += chunkEnd - off;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n });\n }\n await batch.do();\n return buffer;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob to a local file.\n * Fails if the the given file path already exits.\n * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.\n *\n * @param filePath -\n * @param offset - From which position of the block blob to download.\n * @param count - How much data to be downloaded. Will download to the end when passing undefined.\n * @param options - Options to Blob download options.\n * @returns The response data for blob download operation,\n * but with readableStreamBody set to undefined since its\n * content is already read and written into a local file\n * at the specified path.\n */\n async downloadToFile(filePath, offset = 0, count, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToFile\", options);\n try {\n const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n if (response.readableStreamBody) {\n await readStreamToLocalFile(response.readableStreamBody, filePath);\n }\n // The stream is no longer accessible so setting it to undefined.\n response.blobDownloadStream = undefined;\n return response;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n getBlobAndContainerNamesFromUrl() {\n let containerName;\n let blobName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`\n // http://localhost:10001/devstoreaccount1/containername/blob\n const parsedUrl = coreHttp.URLBuilder.parse(this.url);\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents[1];\n blobName = pathComponents[3];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob\n // .getPath() -> /devstoreaccount1/containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)/([^/]*)(/(.*))?\");\n containerName = pathComponents[2];\n blobName = pathComponents[4];\n }\n else {\n // \"https://customdomain.com/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents[1];\n blobName = pathComponents[3];\n }\n // decode the encoded blobName, containerName - to get all the special characters that might be present in them\n containerName = decodeURIComponent(containerName);\n blobName = decodeURIComponent(blobName);\n // Azure Storage Server will replace \"\\\" with \"/\" in the blob names\n // doing the same in the SDK side so that the user doesn't have to replace \"\\\" instances in the blobName\n blobName = blobName.replace(/\\\\/g, \"/\");\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n return { blobName, containerName };\n }\n catch (error) {\n throw new Error(\"Unable to extract blobName and containerName with provided information.\");\n }\n }\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n async startCopyFromURL(copySource, options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"BlobClient-startCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n return await this.blobContext.startCopyFromURL(copySource, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions.tagConditions,\n }, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Only available for BlobClient constructed with a shared key credential.\n *\n * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateSasUrl(options) {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw new RangeError(\"Can only generate the SAS when the client is initialized with a shared key credential\");\n }\n const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString();\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n /**\n * Delete the immutablility policy on the blob.\n *\n * @param options - Optional options to delete immutability policy on the blob.\n */\n async deleteImmutabilityPolicy(options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteImmutabilityPolicy\", options);\n try {\n return await this.blobContext.deleteImmutabilityPolicy(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Set immutablility policy on the blob.\n *\n * @param options - Optional options to set immutability policy on the blob.\n */\n async setImmutabilityPolicy(immutabilityPolicy, options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-setImmutabilityPolicy\", options);\n try {\n return await this.blobContext.setImmutabilityPolicy(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, modifiedAccessConditions: options === null || options === void 0 ? void 0 : options.modifiedAccessCondition }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Set legal hold on the blob.\n *\n * @param options - Optional options to set legal hold on the blob.\n */\n async setLegalHold(legalHoldEnabled, options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-setLegalHold\", options);\n try {\n return await this.blobContext.setLegalHold(legalHoldEnabled, Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * AppendBlobClient defines a set of operations applicable to append blobs.\n */\nclass AppendBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.appendBlobContext = new AppendBlob(this.storageClientContext);\n }\n /**\n * Creates a new AppendBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options - Options to the Append Block Create operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const appendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await appendBlobClient.create();\n * ```\n */\n async create(options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-create\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.create(0, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * If the blob with the same name already exists, the content of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options -\n */\n async createIfNotExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-createIfNotExists\", options);\n const conditions = { ifNoneMatch: ETagAny };\n try {\n const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Seals the append blob, making it read only.\n *\n * @param options -\n */\n async seal(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-seal\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.appendBlobContext.seal(Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Commits a new block of data to the end of the existing append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/append-block\n *\n * @param body - Data to be appended.\n * @param contentLength - Length of the body in bytes.\n * @param options - Options to the Append Block operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello World!\";\n *\n * // Create a new append blob and append data to the blob.\n * const newAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await newAppendBlobClient.create();\n * await newAppendBlobClient.appendBlock(content, content.length);\n *\n * // Append data to an existing append blob.\n * const existingAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await existingAppendBlobClient.appendBlock(content, content.length);\n * ```\n */\n async appendBlock(body, contentLength, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlock\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url\n *\n * @param sourceURL -\n * The url to the blob that will be the source of the copy. A source blob in the same storage account can\n * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob\n * must either be public or must be authenticated via a shared access signature. If the source blob is\n * public, no authentication is required to perform the operation.\n * @param sourceOffset - Offset in source to be appended\n * @param count - Number of bytes to be appended as a block\n * @param options -\n */\n async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlockFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, Object.assign({ abortSignal: options.abortSignal, sourceRange: rangeToString({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * BlockBlobClient defines a set of operations applicable to block blobs.\n */\nclass BlockBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n if (blobNameOrOptions && typeof blobNameOrOptions !== \"string\") {\n options = blobNameOrOptions;\n }\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.blockBlobContext = new BlockBlob(this.storageClientContext);\n this._blobContext = new Blob$1(this.storageClientContext);\n }\n /**\n * Creates a new BlockBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a URL to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Quick query for a JSON or CSV formatted blob.\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Query and convert a blob to a string\n * const queryBlockBlobResponse = await blockBlobClient.query(\"select * from BlobStorage\");\n * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();\n * console.log(\"Query blob content:\", downloaded);\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * @param query -\n * @param options -\n */\n async query(query, options = {}) {\n var _a;\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-query\", options);\n try {\n if (!coreHttp.isNode) {\n throw new Error(\"This operation currently is only supported in Node.js.\");\n }\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {\n queryType: \"SQL\",\n expression: query,\n inputSerialization: toQuerySerialization(options.inputTextConfiguration),\n outputSerialization: toQuerySerialization(options.outputTextConfiguration),\n }, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n return new BlobQueryResponse(response, {\n abortSignal: options.abortSignal,\n onProgress: options.onProgress,\n onError: options.onError,\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link stageBlock} and {@link commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link uploadFile},\n * {@link uploadStream} or {@link uploadBrowserData} for better performance\n * with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param options - Options to the Block Blob Upload operation.\n * @returns Response data for the Block Blob Upload operation.\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n async upload(body, contentLength, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-upload\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new Block Blob where the contents of the blob are read from a given URL.\n * This API is supported beginning with the 2020-04-08 version. Partial updates\n * are not supported with Put Blob from URL; the content of an existing blob is overwritten with\n * the content of the new blob. To perform partial updates to a block blob’s contents using a\n * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.\n *\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param options - Optional parameters.\n */\n async syncUploadFromURL(sourceURL, options = {}) {\n var _a, _b, _c, _d, _e;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-syncUploadFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: options.conditions.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: (_a = options.sourceConditions) === null || _a === void 0 ? void 0 : _a.ifMatch,\n sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,\n sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,\n sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,\n sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,\n }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags }), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Uploads the specified block to the block blob's \"staging area\" to be later\n * committed by a call to commitBlockList.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param body - Data to upload to the staging area.\n * @param contentLength - Number of bytes to upload.\n * @param options - Options to the Block Blob Stage Block operation.\n * @returns Response data for the Block Blob Stage Block operation.\n */\n async stageBlock(blockId, body, contentLength, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlock\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {\n onUploadProgress: options.onProgress,\n }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Stage Block From URL operation creates a new block to be committed as part\n * of a blob where the contents are read from a URL.\n * This API is available starting in version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Options to the Block Blob Stage Block From URL operation.\n * @returns Response data for the Block Blob Stage Block From URL operation.\n */\n async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlockFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Writes a blob by specifying the list of block IDs that make up the blob.\n * In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to\n * update a blob by uploading only those blocks that have changed, then committing the new and existing\n * blocks together. Any blocks not specified in the block list and permanently deleted.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list\n *\n * @param blocks - Array of 64-byte value that is base64-encoded\n * @param options - Options to the Block Blob Commit Block List operation.\n * @returns Response data for the Block Blob Commit Block List operation.\n */\n async commitBlockList(blocks, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-commitBlockList\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.commitBlockList({ latest: blocks }, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns the list of blocks that have been uploaded as part of a block blob\n * using the specified block list filter.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list\n *\n * @param listType - Specifies whether to return the list of committed blocks,\n * the list of uncommitted blocks, or both lists together.\n * @param options - Options to the Block Blob Get Block List operation.\n * @returns Response data for the Block Blob Get Block List operation.\n */\n async getBlockList(listType, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-getBlockList\", options);\n try {\n const res = await this.blockBlobContext.getBlockList(listType, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n if (!res.committedBlocks) {\n res.committedBlocks = [];\n }\n if (!res.uncommittedBlocks) {\n res.uncommittedBlocks = [];\n }\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n // High level functions\n /**\n * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView\n * @param options -\n */\n async uploadData(data, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadData\", options);\n try {\n if (coreHttp.isNode) {\n let buffer;\n if (data instanceof Buffer) {\n buffer = data;\n }\n else if (data instanceof ArrayBuffer) {\n buffer = Buffer.from(data);\n }\n else {\n data = data;\n buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);\n }\n else {\n const browserBlob = new Blob([data]);\n return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);\n }\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN BROWSERS.\n *\n * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.\n *\n * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call\n * {@link commitBlockList} to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @deprecated Use {@link uploadData} instead.\n *\n * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView\n * @param options - Options to upload browser data.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadBrowserData(browserData, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadBrowserData\", options);\n try {\n const browserBlob = new Blob([browserData]);\n return await this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n *\n * Uploads data to block blob. Requires a bodyFactory as the data source,\n * which need to return a {@link HttpRequestBody} object with the offset and size provided.\n *\n * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @param bodyFactory -\n * @param size - size of the data to upload.\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadSeekableInternal(bodyFactory, size, options = {}) {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {\n throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);\n }\n if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) {\n options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;\n }\n if (options.maxSingleShotSize < 0 ||\n options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {\n throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);\n }\n if (options.blockSize === 0) {\n if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`${size} is too larger to upload to a block blob.`);\n }\n if (size > options.maxSingleShotSize) {\n options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);\n if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n }\n }\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadSeekableInternal\", options);\n try {\n if (size <= options.maxSingleShotSize) {\n return await this.upload(bodyFactory(0, size), size, updatedOptions);\n }\n const numBlocks = Math.floor((size - 1) / options.blockSize) + 1;\n if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` +\n `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`);\n }\n const blockList = [];\n const blockIDPrefix = coreHttp.generateUuid();\n let transferProgress = 0;\n const batch = new Batch(options.concurrency);\n for (let i = 0; i < numBlocks; i++) {\n batch.addOperation(async () => {\n const blockID = generateBlockID(blockIDPrefix, i);\n const start = options.blockSize * i;\n const end = i === numBlocks - 1 ? size : start + options.blockSize;\n const contentLength = end - start;\n blockList.push(blockID);\n await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n // TODO: Hook with convenience layer progress event in finer level\n transferProgress += contentLength;\n if (options.onProgress) {\n options.onProgress({\n loadedBytes: transferProgress,\n });\n }\n });\n }\n await batch.do();\n return this.commitBlockList(blockList, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a local file in blocks to a block blob.\n *\n * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList\n * to commit the block list.\n *\n * @param filePath - Full path of local file\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadFile(filePath, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadFile\", options);\n try {\n const size = (await fsStat(filePath)).size;\n return await this.uploadSeekableInternal((offset, count) => {\n return () => fsCreateReadStream(filePath, {\n autoClose: true,\n end: count ? offset + count - 1 : Infinity,\n start: offset,\n });\n }, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a Node.js Readable stream into block blob.\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * * Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n *\n * @param stream - Node.js Readable stream\n * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB\n * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,\n * positive correlation with max uploading concurrency. Default value is 5\n * @param options - Options to Upload Stream to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) {\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadStream\", options);\n try {\n let blockNum = 0;\n const blockIDPrefix = coreHttp.generateUuid();\n let transferProgress = 0;\n const blockList = [];\n const scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => {\n const blockID = generateBlockID(blockIDPrefix, blockNum);\n blockList.push(blockID);\n blockNum++;\n await this.stageBlock(blockID, body, length, {\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n transferProgress += length;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n }, \n // concurrency should set a smaller value than maxConcurrency, which is helpful to\n // reduce the possibility when a outgoing handler waits for stream data, in\n // this situation, outgoing handlers are blocked.\n // Outgoing queue shouldn't be empty.\n Math.ceil((maxConcurrency / 4) * 3));\n await scheduler.do();\n return await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * PageBlobClient defines a set of operations applicable to page blobs.\n */\nclass PageBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.pageBlobContext = new PageBlob(this.storageClientContext);\n }\n /**\n * Creates a new PageBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options - Options to the Page Blob Create operation.\n * @returns Response data for the Page Blob Create operation.\n */\n async create(size, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-create\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.create(0, size, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob. If the blob with the same name already exists, the content\n * of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options -\n */\n async createIfNotExists(size, options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-createIfNotExists\", options);\n try {\n const conditions = { ifNoneMatch: ETagAny };\n const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param body - Data to upload\n * @param offset - Offset of destination page blob\n * @param count - Content length of the body, also number of bytes to be uploaded\n * @param options - Options to the Page Blob Upload Pages operation.\n * @returns Response data for the Page Blob Upload Pages operation.\n */\n async uploadPages(body, offset, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPages\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the\n * contents are read from a URL.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url\n *\n * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication\n * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob\n * @param destOffset - Offset of destination page blob\n * @param count - Number of bytes to be uploaded from source page blob\n * @param options -\n */\n async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPagesFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), Object.assign({ abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Frees the specified pages from the page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param offset - Starting byte position of the pages to clear.\n * @param count - Number of bytes to clear.\n * @param options - Options to the Page Blob Clear Pages operation.\n * @returns Response data for the Page Blob Clear Pages operation.\n */\n async clearPages(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-clearPages\", options);\n try {\n return await this.pageBlobContext.clearPages(0, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns the list of valid page ranges for a page blob or snapshot of a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns Response data for the Page Blob Get Ranges operation.\n */\n async getPageRanges(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRanges\", options);\n try {\n return await this.pageBlobContext\n .getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * getPageRangesSegment returns a single segment of page ranges starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to PageBlob Get Page Ranges Segment operation.\n */\n async listPageRangesSegment(offset = 0, count, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesSegment\", options);\n try {\n return await this.pageBlobContext.getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), marker: marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to List Page Ranges operation.\n */\n listPageRangeItemSegments(offset = 0, count, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1() {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker, options));\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to List Page Ranges operation.\n */\n listPageRangeItems(offset = 0, count, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const getPageRangesSegment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list of page ranges for a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges for a page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\").getPageBlobClient(\"\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRanges()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRanges();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n listPageRanges(offset = 0, count, options = {}) {\n options.conditions = options.conditions || {};\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeItems(offset, count, options);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));\n },\n };\n }\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiff\", options);\n try {\n return await this.pageBlobContext\n .getPageRangesDiff(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevsnapshot: prevSnapshot, range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * getPageRangesDiffSegment returns a single segment of page ranges starting from the\n * specified Marker for difference between previous snapshot and the target page blob.\n * Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesDiffSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of the get to be returned with the next get operation.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiffSegment\", options);\n try {\n return await this.pageBlobContext.getPageRangesDiff(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevsnapshot: prevSnapshotOrUrl, range: rangeToString({\n offset: offset,\n count: count,\n }), marker: marker, maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}\n *\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options));\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const getPageRangesSegment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\").getPageBlobClient(\"\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRangesDiff()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRangesDiff();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n listPageRangesDiff(offset, count, prevSnapshot, options = {}) {\n options.conditions = options.conditions || {};\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options));\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));\n },\n };\n }\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshotUrl - URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-GetPageRangesDiffForManagedDisks\", options);\n try {\n return await this.pageBlobContext\n .getPageRangesDiff(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevSnapshotUrl, range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Resizes the page blob to the specified size (which must be a multiple of 512).\n * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties\n *\n * @param size - Target size\n * @param options - Options to the Page Blob Resize operation.\n * @returns Response data for the Page Blob Resize operation.\n */\n async resize(size, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-resize\", options);\n try {\n return await this.pageBlobContext.resize(size, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets a page blob's sequence number.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.\n * @param sequenceNumber - Required if sequenceNumberAction is max or update\n * @param options - Options to the Page Blob Update Sequence Number operation.\n * @returns Response data for the Page Blob Update Sequence Number operation.\n */\n async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-updateSequenceNumber\", options);\n try {\n return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, Object.assign({ abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.\n * The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination.\n * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.\n * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob\n * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots\n *\n * @param copySource - Specifies the name of the source page blob snapshot. For example,\n * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param options - Options to the Page Blob Copy Incremental operation.\n * @returns Response data for the Page Blob Copy Incremental operation.\n */\n async startCopyIncremental(copySource, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-startCopyIncremental\", options);\n try {\n return await this.pageBlobContext.copyIncremental(copySource, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nasync function getBodyAsText(batchResponse) {\n let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);\n const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer);\n // Slice the buffer to trim the empty ending.\n buffer = buffer.slice(0, responseLength);\n return buffer.toString();\n}\nfunction utf8ByteLength(str) {\n return Buffer.byteLength(str);\n}\n\n// Copyright (c) Microsoft Corporation.\nconst HTTP_HEADER_DELIMITER = \": \";\nconst SPACE_DELIMITER = \" \";\nconst NOT_FOUND = -1;\n/**\n * Util class for parsing batch response.\n */\nclass BatchResponseParser {\n constructor(batchResponse, subRequests) {\n if (!batchResponse || !batchResponse.contentType) {\n // In special case(reported), server may return invalid content-type which could not be parsed.\n throw new RangeError(\"batchResponse is malformed or doesn't contain valid content-type.\");\n }\n if (!subRequests || subRequests.size === 0) {\n // This should be prevent during coding.\n throw new RangeError(\"Invalid state: subRequests is not provided or size is 0.\");\n }\n this.batchResponse = batchResponse;\n this.subRequests = subRequests;\n this.responseBatchBoundary = this.batchResponse.contentType.split(\"=\")[1];\n this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`;\n this.batchResponseEnding = `--${this.responseBatchBoundary}--`;\n }\n // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response\n async parseBatchResponse() {\n // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse\n // sub request's response.\n if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) {\n throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);\n }\n const responseBodyAsText = await getBodyAsText(this.batchResponse);\n const subResponses = responseBodyAsText\n .split(this.batchResponseEnding)[0] // string after ending is useless\n .split(this.perResponsePrefix)\n .slice(1); // string before first response boundary is useless\n const subResponseCount = subResponses.length;\n // Defensive coding in case of potential error parsing.\n // Note: subResponseCount == 1 is special case where sub request is invalid.\n // We try to prevent such cases through early validation, e.g. validate sub request count >= 1.\n // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user.\n if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) {\n throw new Error(\"Invalid state: sub responses' count is not equal to sub requests' count.\");\n }\n const deserializedSubResponses = new Array(subResponseCount);\n let subResponsesSucceededCount = 0;\n let subResponsesFailedCount = 0;\n // Parse sub subResponses.\n for (let index = 0; index < subResponseCount; index++) {\n const subResponse = subResponses[index];\n const deserializedSubResponse = {};\n deserializedSubResponse.headers = new coreHttp.HttpHeaders();\n const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`);\n let subRespHeaderStartFound = false;\n let subRespHeaderEndFound = false;\n let subRespFailed = false;\n let contentId = NOT_FOUND;\n for (const responseLine of responseLines) {\n if (!subRespHeaderStartFound) {\n // Convention line to indicate content ID\n if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) {\n contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]);\n }\n // Http version line with status code indicates the start of sub request's response.\n // Example: HTTP/1.1 202 Accepted\n if (responseLine.startsWith(HTTP_VERSION_1_1)) {\n subRespHeaderStartFound = true;\n const tokens = responseLine.split(SPACE_DELIMITER);\n deserializedSubResponse.status = parseInt(tokens[1]);\n deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER);\n }\n continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: *\n }\n if (responseLine.trim() === \"\") {\n // Sub response's header start line already found, and the first empty line indicates header end line found.\n if (!subRespHeaderEndFound) {\n subRespHeaderEndFound = true;\n }\n continue; // Skip empty line\n }\n // Note: when code reach here, it indicates subRespHeaderStartFound == true\n if (!subRespHeaderEndFound) {\n if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) {\n // Defensive coding to prevent from missing valuable lines.\n throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`);\n }\n // Parse headers of sub response.\n const tokens = responseLine.split(HTTP_HEADER_DELIMITER);\n deserializedSubResponse.headers.set(tokens[0], tokens[1]);\n if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) {\n deserializedSubResponse.errorCode = tokens[1];\n subRespFailed = true;\n }\n }\n else {\n // Assemble body of sub response.\n if (!deserializedSubResponse.bodyAsText) {\n deserializedSubResponse.bodyAsText = \"\";\n }\n deserializedSubResponse.bodyAsText += responseLine;\n }\n } // Inner for end\n // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking.\n // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it\n // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that\n // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose.\n if (contentId !== NOT_FOUND &&\n Number.isInteger(contentId) &&\n contentId >= 0 &&\n contentId < this.subRequests.size &&\n deserializedSubResponses[contentId] === undefined) {\n deserializedSubResponse._request = this.subRequests.get(contentId);\n deserializedSubResponses[contentId] = deserializedSubResponse;\n }\n else {\n logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`);\n }\n if (subRespFailed) {\n subResponsesFailedCount++;\n }\n else {\n subResponsesSucceededCount++;\n }\n }\n return {\n subResponses: deserializedSubResponses,\n subResponsesSucceededCount: subResponsesSucceededCount,\n subResponsesFailedCount: subResponsesFailedCount,\n };\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar MutexLockStatus;\n(function (MutexLockStatus) {\n MutexLockStatus[MutexLockStatus[\"LOCKED\"] = 0] = \"LOCKED\";\n MutexLockStatus[MutexLockStatus[\"UNLOCKED\"] = 1] = \"UNLOCKED\";\n})(MutexLockStatus || (MutexLockStatus = {}));\n/**\n * An async mutex lock.\n */\nclass Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @param key - lock key\n */\n static async lock(key) {\n return new Promise((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n }\n else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n /**\n * Unlock a key.\n *\n * @param key -\n */\n static async unlock(key) {\n return new Promise((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n static onUnlockEvent(key, handler) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n }\n else {\n this.listeners[key].push(handler);\n }\n }\n static emitUnlockEvent(key) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler.call(this);\n });\n }\n }\n}\nMutex.keys = {};\nMutex.listeners = {};\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A BlobBatch represents an aggregated set of operations on blobs.\n * Currently, only `delete` and `setAccessTier` are supported.\n */\nclass BlobBatch {\n constructor() {\n this.batch = \"batch\";\n this.batchRequest = new InnerBatchRequest();\n }\n /**\n * Get the value of Content-Type for a batch request.\n * The value must be multipart/mixed with a batch boundary.\n * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252\n */\n getMultiPartContentType() {\n return this.batchRequest.getMultipartContentType();\n }\n /**\n * Get assembled HTTP request body for sub requests.\n */\n getHttpRequestBody() {\n return this.batchRequest.getHttpRequestBody();\n }\n /**\n * Get sub requests that are added into the batch request.\n */\n getSubRequests() {\n return this.batchRequest.getSubRequests();\n }\n async addSubRequestInternal(subRequest, assembleSubRequestFunc) {\n await Mutex.lock(this.batch);\n try {\n this.batchRequest.preAddSubRequest(subRequest);\n await assembleSubRequestFunc();\n this.batchRequest.postAddSubRequest(subRequest);\n }\n finally {\n await Mutex.unlock(this.batch);\n }\n }\n setBatchType(batchType) {\n if (!this.batchType) {\n this.batchType = batchType;\n }\n if (this.batchType !== batchType) {\n throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`);\n }\n }\n async deleteBlob(urlOrBlobClient, credentialOrOptions, options) {\n let url;\n let credential;\n if (typeof urlOrBlobClient === \"string\" &&\n ((coreHttp.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) ||\n credentialOrOptions instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrOptions))) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrOptions;\n }\n else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n options = credentialOrOptions;\n }\n else {\n throw new RangeError(\"Invalid arguments. Either url and credential, or BlobClient need be provided.\");\n }\n if (!options) {\n options = {};\n }\n const { span, updatedOptions } = createSpan(\"BatchDeleteRequest-addSubRequest\", options);\n try {\n this.setBatchType(\"delete\");\n await this.addSubRequestInternal({\n url: url,\n credential: credential,\n }, async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) {\n let url;\n let credential;\n let tier;\n if (typeof urlOrBlobClient === \"string\" &&\n ((coreHttp.isNode && credentialOrTier instanceof StorageSharedKeyCredential) ||\n credentialOrTier instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrTier))) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrTier;\n tier = tierOrOptions;\n }\n else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n tier = credentialOrTier;\n options = tierOrOptions;\n }\n else {\n throw new RangeError(\"Invalid arguments. Either url and credential, or BlobClient need be provided.\");\n }\n if (!options) {\n options = {};\n }\n const { span, updatedOptions } = createSpan(\"BatchSetTierRequest-addSubRequest\", options);\n try {\n this.setBatchType(\"setAccessTier\");\n await this.addSubRequestInternal({\n url: url,\n credential: credential,\n }, async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * Inner batch request class which is responsible for assembling and serializing sub requests.\n * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled.\n */\nclass InnerBatchRequest {\n constructor() {\n this.operationCount = 0;\n this.body = \"\";\n const tempGuid = coreHttp.generateUuid();\n // batch_{batchid}\n this.boundary = `batch_${tempGuid}`;\n // --batch_{batchid}\n // Content-Type: application/http\n // Content-Transfer-Encoding: binary\n this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`;\n // multipart/mixed; boundary=batch_{batchid}\n this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`;\n // --batch_{batchid}--\n this.batchRequestEnding = `--${this.boundary}--`;\n this.subRequests = new Map();\n }\n /**\n * Create pipeline to assemble sub requests. The idea here is to use existing\n * credential and serialization/deserialization components, with additional policies to\n * filter unnecessary headers, assemble sub requests into request's body\n * and intercept request from going to wire.\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n */\n createPipeline(credential) {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n const factories = new Array(policyFactoryLength);\n factories[0] = coreHttp.deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = coreHttp.isTokenCredential(credential)\n ? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n return new Pipeline(factories, {});\n }\n appendSubRequestToBody(request) {\n // Start to assemble sub request\n this.body += [\n this.subRequestPrefix,\n `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,\n \"\",\n `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method\n ].join(HTTP_LINE_ENDING);\n for (const header of request.headers.headersArray()) {\n this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;\n }\n this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line\n // No body to assemble for current batch request support\n // End to assemble sub request\n }\n preAddSubRequest(subRequest) {\n if (this.operationCount >= BATCH_MAX_REQUEST) {\n throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`);\n }\n // Fast fail if url for sub request is invalid\n const path = getURLPath(subRequest.url);\n if (!path || path === \"\") {\n throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`);\n }\n }\n postAddSubRequest(subRequest) {\n this.subRequests.set(this.operationCount, subRequest);\n this.operationCount++;\n }\n // Return the http request body with assembling the ending line to the sub request body.\n getHttpRequestBody() {\n return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`;\n }\n getMultipartContentType() {\n return this.multipartContentType;\n }\n getSubRequests() {\n return this.subRequests;\n }\n}\nclass BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {\n constructor(batchRequest, nextPolicy, options) {\n super(nextPolicy, options);\n this.dummyResponse = {\n request: new coreHttp.WebResource(),\n status: 200,\n headers: new coreHttp.HttpHeaders(),\n };\n this.batchRequest = batchRequest;\n }\n async sendRequest(request) {\n await this.batchRequest.appendSubRequestToBody(request);\n return this.dummyResponse; // Intercept request from going to wire\n }\n}\nclass BatchRequestAssemblePolicyFactory {\n constructor(batchRequest) {\n this.batchRequest = batchRequest;\n }\n create(nextPolicy, options) {\n return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options);\n }\n}\nclass BatchHeaderFilterPolicy extends coreHttp.BaseRequestPolicy {\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(request) {\n let xMsHeaderName = \"\";\n for (const header of request.headers.headersArray()) {\n if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) {\n xMsHeaderName = header.name;\n }\n }\n if (xMsHeaderName !== \"\") {\n request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header.\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\nclass BatchHeaderFilterPolicyFactory {\n create(nextPolicy, options) {\n return new BatchHeaderFilterPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n */\nclass BlobBatchClient {\n constructor(url, credentialOrPipeline, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n }\n else if (!credentialOrPipeline) {\n // no credential provided\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n const storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions());\n const path = getURLPath(url);\n if (path && path !== \"/\") {\n // Container scoped.\n this.serviceOrContainerContext = new Container(storageClientContext);\n }\n else {\n this.serviceOrContainerContext = new Service(storageClientContext);\n }\n }\n /**\n * Creates a {@link BlobBatch}.\n * A BlobBatch represents an aggregated set of operations on blobs.\n */\n createBatch() {\n return new BlobBatch();\n }\n async deleteBlobs(urlsOrBlobClients, credentialOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options);\n }\n else {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions);\n }\n }\n return this.submitBatch(batch);\n }\n async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options);\n }\n else {\n await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions);\n }\n }\n return this.submitBatch(batch);\n }\n /**\n * Submit batch request which consists of multiple subrequests.\n *\n * Get `blobBatchClient` and other details before running the snippets.\n * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`\n *\n * Example usage:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.deleteBlob(urlInString0, credential0);\n * await batchRequest.deleteBlob(urlInString1, credential1, {\n * deleteSnapshots: \"include\"\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * Example using a lease:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.setBlobAccessTier(blockBlobClient0, \"Cool\");\n * await batchRequest.setBlobAccessTier(blockBlobClient1, \"Cool\", {\n * conditions: { leaseId: leaseId }\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @param batchRequest - A set of Delete or SetTier operations.\n * @param options -\n */\n async submitBatch(batchRequest, options = {}) {\n if (!batchRequest || batchRequest.getSubRequests().size === 0) {\n throw new RangeError(\"Batch request should contain one or more sub requests.\");\n }\n const { span, updatedOptions } = createSpan(\"BlobBatchClient-submitBatch\", options);\n try {\n const batchRequestBody = batchRequest.getHttpRequestBody();\n // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now.\n const rawBatchResponse = await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign(Object.assign({}, options), convertTracingToRequestOptionsBase(updatedOptions)));\n // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202).\n const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests());\n const responseSummary = await batchResponseParser.parseBatchResponse();\n const res = {\n _response: rawBatchResponse._response,\n contentType: rawBatchResponse.contentType,\n errorCode: rawBatchResponse.errorCode,\n requestId: rawBatchResponse.requestId,\n clientRequestId: rawBatchResponse.clientRequestId,\n version: rawBatchResponse.version,\n subResponses: responseSummary.subResponses,\n subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,\n subResponsesFailedCount: responseSummary.subResponsesFailedCount,\n };\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n/**\n * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.\n */\nclass ContainerClient extends StorageClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName parameter\");\n }\n super(url, pipeline);\n this._containerName = this.getContainerNameFromUrl();\n this.containerContext = new Container(this.storageClientContext);\n }\n /**\n * The name of the container.\n */\n get containerName() {\n return this._containerName;\n }\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, the operation fails.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n *\n * @param options - Options to Container Create operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * const createContainerResponse = await containerClient.create();\n * console.log(\"Container was created successfully\", createContainerResponse.requestId);\n * ```\n */\n async create(options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-create\", options);\n try {\n // Spread operator in destructuring assignments,\n // this will filter out unwanted properties from the response object into result object\n return await this.containerContext.create(Object.assign(Object.assign({}, options), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, it is not changed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n *\n * @param options -\n */\n async createIfNotExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"ContainerClient-createIfNotExists\", options);\n try {\n const res = await this.create(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"ContainerAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a container only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns true if the Azure container resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing container might be deleted by other clients or\n * applications. Vice versa new containers with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n async exists(options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-exists\", options);\n try {\n await this.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n }\n catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when checking container existence\",\n });\n return false;\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a {@link BlobClient}\n *\n * @param blobName - A blob name\n * @returns A new BlobClient object for the given blob name.\n */\n getBlobClient(blobName) {\n return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates an {@link AppendBlobClient}\n *\n * @param blobName - An append blob name\n */\n getAppendBlobClient(blobName) {\n return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates a {@link BlockBlobClient}\n *\n * @param blobName - A block blob name\n *\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n *\n * const blockBlobClient = containerClient.getBlockBlobClient(\"\");\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n getBlockBlobClient(blobName) {\n return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates a {@link PageBlobClient}\n *\n * @param blobName - A page blob name\n */\n getPageBlobClient(blobName) {\n return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Returns all user-defined metadata and system properties for the specified\n * container. The data returned does not include the container's list of blobs.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Options to Container Get Properties operation.\n */\n async getProperties(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-getProperties\", options);\n try {\n return await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified container for deletion. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options - Options to Container Delete operation.\n */\n async delete(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-delete\", options);\n try {\n return await this.containerContext.delete(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified container for deletion if it exists. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options - Options to Container Delete operation.\n */\n async deleteIfExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"ContainerClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"ContainerNotFound\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a container only if it exists.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets one or more user-defined name-value pairs for the specified container.\n *\n * If no option provided, or no metadata defined in the parameter, the container\n * metadata will be removed.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Options to Container Set Metadata operation.\n */\n async setMetadata(metadata, options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n if (options.conditions.ifUnmodifiedSince) {\n throw new RangeError(\"the IfUnmodifiedSince must have their default values because they are ignored by the blob service\");\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-setMetadata\", options);\n try {\n return await this.containerContext.setMetadata(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the permissions for the specified container. The permissions indicate\n * whether container data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl\n *\n * @param options - Options to Container Get Access Policy operation.\n */\n async getAccessPolicy(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-getAccessPolicy\", options);\n try {\n const response = await this.containerContext.getAccessPolicy(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n const res = {\n _response: response._response,\n blobPublicAccess: response.blobPublicAccess,\n date: response.date,\n etag: response.etag,\n errorCode: response.errorCode,\n lastModified: response.lastModified,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n signedIdentifiers: [],\n version: response.version,\n };\n for (const identifier of response) {\n let accessPolicy = undefined;\n if (identifier.accessPolicy) {\n accessPolicy = {\n permissions: identifier.accessPolicy.permissions,\n };\n if (identifier.accessPolicy.expiresOn) {\n accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);\n }\n if (identifier.accessPolicy.startsOn) {\n accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);\n }\n }\n res.signedIdentifiers.push({\n accessPolicy,\n id: identifier.id,\n });\n }\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets the permissions for the specified container. The permissions indicate\n * whether blobs in a container may be accessed publicly.\n *\n * When you set permissions for a container, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing container ACL will be\n * removed.\n *\n * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.\n * During this interval, a shared access signature that is associated with the stored access policy will\n * fail with status code 403 (Forbidden), until the access policy becomes active.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n *\n * @param access - The level of public access to data in the container.\n * @param containerAcl - Array of elements each having a unique Id and details of the access policy.\n * @param options - Options to Container Set Access Policy operation.\n */\n async setAccessPolicy(access, containerAcl, options = {}) {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"ContainerClient-setAccessPolicy\", options);\n try {\n const acl = [];\n for (const identifier of containerAcl || []) {\n acl.push({\n accessPolicy: {\n expiresOn: identifier.accessPolicy.expiresOn\n ? truncatedISO8061Date(identifier.accessPolicy.expiresOn)\n : \"\",\n permissions: identifier.accessPolicy.permissions,\n startsOn: identifier.accessPolicy.startsOn\n ? truncatedISO8061Date(identifier.accessPolicy.startsOn)\n : \"\",\n },\n id: identifier.id,\n });\n }\n return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the container.\n *\n * @param proposeLeaseId - Initial proposed lease Id.\n * @returns A new BlobLeaseClient object for managing leases on the container.\n */\n getBlobLeaseClient(proposeLeaseId) {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n *\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},\n * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better\n * performance with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param blobName - Name of the block blob to create or update.\n * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param options - Options to configure the Block Blob Upload operation.\n * @returns Block Blob upload response data and the corresponding BlockBlobClient instance.\n */\n async uploadBlockBlob(blobName, body, contentLength, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-uploadBlockBlob\", options);\n try {\n const blockBlobClient = this.getBlockBlobClient(blobName);\n const response = await blockBlobClient.upload(body, contentLength, updatedOptions);\n return {\n blockBlobClient,\n response,\n };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param blobName -\n * @param options - Options to Blob Delete operation.\n * @returns Block blob deletion response data.\n */\n async deleteBlob(blobName, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-deleteBlob\", options);\n try {\n let blobClient = this.getBlobClient(blobName);\n if (options.versionId) {\n blobClient = blobClient.withVersion(options.versionId);\n }\n return await blobClient.delete(updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * listBlobFlatSegment returns a single segment of blobs starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call listBlobsFlatSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to Container List Blob Flat Segment operation.\n */\n async listBlobFlatSegment(marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-listBlobFlatSegment\", options);\n try {\n const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });\n return blobItem;\n }) }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * listBlobHierarchySegment returns a single segment of blobs starting from\n * the specified Marker. Use an empty Marker to start enumeration from the\n * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment\n * again (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to Container List Blob Hierarchy Segment operation.\n */\n async listBlobHierarchySegment(delimiter, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"ContainerClient-listBlobHierarchySegment\", options);\n try {\n const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });\n return blobItem;\n }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {\n const blobPrefix = {\n name: BlobNameToString(blobPrefixInternal.name),\n };\n return blobPrefix;\n }) }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse\n *\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list blobs operation.\n */\n listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link BlobItem} objects\n *\n * @param options - Options to list blobs operation.\n */\n listItems(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const listBlobsFlatSegmentResponse = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the blobs\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the containerClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\");`\n * let i = 1;\n * for await (const blob of containerClient.listBlobsFlat()) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = containerClient.listBlobsFlat();\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * @param options - Options to list blobs.\n * @returns An asyncIterableIterator that supports paging.\n */\n listBlobsFlat(options = {}) {\n const include = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.includeDeletedWithVersions) {\n include.push(\"deletedwithversions\");\n }\n if (options.includeImmutabilityPolicy) {\n include.push(\"immutabilitypolicy\");\n }\n if (options.includeLegalHold) {\n include.push(\"legalhold\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));\n },\n };\n }\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list blobs operation.\n */\n listHierarchySegments(delimiter, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1() {\n let listBlobsHierarchySegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options));\n marker = listBlobsHierarchySegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param options - Options to list blobs operation.\n */\n listItemsByHierarchy(delimiter, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const listBlobsHierarchySegmentResponse = _c.value;\n const segment = listBlobsHierarchySegmentResponse.segment;\n if (segment.blobPrefixes) {\n for (const prefix of segment.blobPrefixes) {\n yield yield tslib.__await(Object.assign({ kind: \"prefix\" }, prefix));\n }\n }\n for (const blob of segment.blobItems) {\n yield yield tslib.__await(Object.assign({ kind: \"blob\" }, blob));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the blobs by hierarchy.\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * for await (const item of containerClient.listBlobsByHierarchy(\"/\")) {\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}`);\n * }\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let iter = containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix1/\" });\n * let entity = await iter.next();\n * while (!entity.done) {\n * let item = entity.value;\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}`);\n * }\n * entity = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page\");\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\").byPage()) {\n * const segment = response.segment;\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a max page size:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page, specifying a prefix and a max page size\");\n *\n * let i = 1;\n * for await (const response of containerClient\n * .listBlobsByHierarchy(\"/\", { prefix: \"prefix2/sub1/\" })\n * .byPage({ maxPageSize: 2 })) {\n * console.log(`Page ${i++}`);\n * const segment = response.segment;\n *\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n *\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param options - Options to list blobs operation.\n */\n listBlobsByHierarchy(delimiter, options = {}) {\n if (delimiter === \"\") {\n throw new RangeError(\"delimiter should contain one or more characters\");\n }\n const include = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.includeDeletedWithVersions) {\n include.push(\"deletedwithversions\");\n }\n if (options.includeImmutabilityPolicy) {\n include.push(\"immutabilitypolicy\");\n }\n if (options.includeLegalHold) {\n include.push(\"legalhold\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));\n // AsyncIterableIterator to iterate over blob prefixes and blobs\n const iter = this.listItemsByHierarchy(delimiter, updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n async next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));\n },\n };\n }\n /**\n * The Filter Blobs operation enables callers to list blobs in the container whose tags\n * match a given search expression.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-findBlobsByTagsSegment\", options);\n try {\n const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {\n var _a;\n let tagValue = \"\";\n if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });\n }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield yield tslib.__await(response);\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {\n var e_3, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_3) throw e_3.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified container.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of containerClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = containerClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = containerClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTags(tagFilterSqlExpression, options = {}) {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions = Object.assign({}, options);\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n getContainerNameFromUrl() {\n let containerName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername`\n // http://localhost:10001/devstoreaccount1/containername\n const parsedUrl = coreHttp.URLBuilder.parse(this.url);\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername\".\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath().split(\"/\")[1];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername\n // .getPath() -> /devstoreaccount1/containername\n containerName = parsedUrl.getPath().split(\"/\")[2];\n }\n else {\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath().split(\"/\")[1];\n }\n // decode the encoded containerName - to get all the special characters that might be present in it\n containerName = decodeURIComponent(containerName);\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n return containerName;\n }\n catch (error) {\n throw new Error(\"Unable to extract containerName with provided information.\");\n }\n }\n /**\n * Only available for ContainerClient constructed with a shared key credential.\n *\n * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateSasUrl(options) {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw new RangeError(\"Can only generate the SAS when the client is initialized with a shared key credential\");\n }\n const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString();\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this container.\n */\n getBlobBatchClient() {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass AccountSASPermissions {\n constructor() {\n /**\n * Permission to read resources and list queues and tables granted.\n */\n this.read = false;\n /**\n * Permission to write resources granted.\n */\n this.write = false;\n /**\n * Permission to create blobs and files granted.\n */\n this.delete = false;\n /**\n * Permission to delete versions granted.\n */\n this.deleteVersion = false;\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n this.list = false;\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n this.add = false;\n /**\n * Permission to create blobs and files granted.\n */\n this.create = false;\n /**\n * Permissions to update messages and table entities granted.\n */\n this.update = false;\n /**\n * Permission to get and delete messages granted.\n */\n this.process = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Permission to filter blobs.\n */\n this.filter = false;\n /**\n * Permission to set immutability policy.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n }\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const accountSASPermissions = new AccountSASPermissions();\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n case \"i\":\n accountSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n accountSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n return accountSASPermissions;\n }\n /**\n * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const accountSASPermissions = new AccountSASPermissions();\n if (permissionLike.read) {\n accountSASPermissions.read = true;\n }\n if (permissionLike.write) {\n accountSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n accountSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n accountSASPermissions.deleteVersion = true;\n }\n if (permissionLike.filter) {\n accountSASPermissions.filter = true;\n }\n if (permissionLike.tag) {\n accountSASPermissions.tag = true;\n }\n if (permissionLike.list) {\n accountSASPermissions.list = true;\n }\n if (permissionLike.add) {\n accountSASPermissions.add = true;\n }\n if (permissionLike.create) {\n accountSASPermissions.create = true;\n }\n if (permissionLike.update) {\n accountSASPermissions.update = true;\n }\n if (permissionLike.process) {\n accountSASPermissions.process = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n accountSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n accountSASPermissions.permanentDelete = true;\n }\n return accountSASPermissions;\n }\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n toString() {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n */\nclass AccountSASResourceTypes {\n constructor() {\n /**\n * Permission to access service level APIs granted.\n */\n this.service = false;\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n */\n this.container = false;\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n */\n this.object = false;\n }\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @param resourceTypes -\n */\n static parse(resourceTypes) {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n return accountSASResourceTypes;\n }\n /**\n * Converts the given resource types to a string.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n toString() {\n const resourceTypes = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n */\nclass AccountSASServices {\n constructor() {\n /**\n * Permission to access blob resources granted.\n */\n this.blob = false;\n /**\n * Permission to access file resources granted.\n */\n this.file = false;\n /**\n * Permission to access queue resources granted.\n */\n this.queue = false;\n /**\n * Permission to access table resources granted.\n */\n this.table = false;\n }\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @param services -\n */\n static parse(services) {\n const accountSASServices = new AccountSASServices();\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n return accountSASServices;\n }\n /**\n * Converts the given services to a string.\n *\n */\n toString() {\n const services = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\") {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'y' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n if (accountSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();\n let stringToSign;\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : \"\",\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n */\nclass BlobServiceClient extends StorageClient {\n constructor(url, credentialOrPipeline, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n }\n else if ((coreHttp.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipeline)) {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n else {\n // The second parameter is undefined. Use anonymous credential\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = new Service(this.storageClientContext);\n }\n /**\n *\n * Creates an instance of BlobServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n static fromConnectionString(connectionString, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param containerName - A container name\n * @returns A new ContainerClient object for the given container name.\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * ```\n */\n getContainerClient(containerName) {\n return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline);\n }\n /**\n * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param containerName - Name of the container to create.\n * @param options - Options to configure Container Create operation.\n * @returns Container creation response and the corresponding container client.\n */\n async createContainer(containerName, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-createContainer\", options);\n try {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create(updatedOptions);\n return {\n containerClient,\n containerCreateResponse,\n };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Deletes a Blob container.\n *\n * @param containerName - Name of the container to delete.\n * @param options - Options to configure Container Delete operation.\n * @returns Container deletion response.\n */\n async deleteContainer(containerName, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-deleteContainer\", options);\n try {\n const containerClient = this.getContainerClient(containerName);\n return await containerClient.delete(updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param deletedContainerName - Name of the previously deleted container.\n * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.\n * @param options - Options to configure Container Restore operation.\n * @returns Container deletion response.\n */\n async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-undeleteContainer\", options);\n try {\n const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName);\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerUndeleteResponse = await containerContext.restore(Object.assign({ deletedContainerName,\n deletedContainerVersion }, updatedOptions));\n return { containerClient, containerUndeleteResponse };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Rename an existing Blob Container.\n *\n * @param sourceContainerName - The name of the source container.\n * @param destinationContainerName - The new name of the container.\n * @param options - Options to configure Container Rename operation.\n */\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready.\n async renameContainer(sourceContainerName, destinationContainerName, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-renameContainer\", options);\n try {\n const containerClient = this.getContainerClient(destinationContainerName);\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerRenameResponse = await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }));\n return { containerClient, containerRenameResponse };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n async getProperties(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getProperties\", options);\n try {\n return await this.serviceContext.getProperties(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n async setProperties(properties, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-setProperties\", options);\n try {\n return await this.serviceContext.setProperties(properties, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats\n *\n * @param options - Options to the Service Get Statistics operation.\n * @returns Response data for the Service Get Statistics operation.\n */\n async getStatistics(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getStatistics\", options);\n try {\n return await this.serviceContext.getStatistics(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information\n *\n * @param options - Options to the Service Get Account Info operation.\n * @returns Response data for the Service Get Account Info operation.\n */\n async getAccountInfo(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getAccountInfo\", options);\n try {\n return await this.serviceContext.getAccountInfo(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns a list of the containers under the specified account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to the Service List Container Segment operation.\n * @returns Response data for the Service List Container Segment operation.\n */\n async listContainersSegment(marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-listContainersSegment\", options);\n try {\n return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === \"string\" ? [options.include] : options.include }), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-findBlobsByTagsSegment\", options);\n try {\n const response = await this.serviceContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {\n var _a;\n let tagValue = \"\";\n if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });\n }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield yield tslib.__await(response);\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTags(tagFilterSqlExpression, options = {}) {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions = Object.assign({}, options);\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list containers operation.\n */\n listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @param options - Options to list containers operation.\n */\n listItems(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItems_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.listContainers();\n * let containerItem = await iter.next();\n * while (!containerItem.done) {\n * console.log(`Container ${i++}: ${containerItem.value.name}`);\n * containerItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list containers.\n * @returns An asyncIterableIterator that supports paging.\n */\n listContainers(options = {}) {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const include = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSystem) {\n include.push(\"system\");\n }\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));\n const iter = this.listItems(listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time\n */\n async getUserDelegationKey(startsOn, expiresOn, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getUserDelegationKey\", options);\n try {\n const response = await this.serviceContext.getUserDelegationKey({\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false),\n }, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\n signedService: response.signedService,\n signedVersion: response.signedVersion,\n value: response.value,\n };\n const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this service.\n */\n getBlobBatchClient() {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse(\"r\"), resourceTypes = \"sco\", options = {}) {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\"Can only generate the account SAS when the client is initialized with a shared key credential\");\n }\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n const sas = generateAccountSASQueryParameters(Object.assign({ permissions,\n expiresOn,\n resourceTypes, services: AccountSASServices.parse(\"b\").toString() }, options), this.credential).toString();\n return appendToURLQuery(this.url, sas);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */\nexports.KnownEncryptionAlgorithmType = void 0;\n(function (KnownEncryptionAlgorithmType) {\n KnownEncryptionAlgorithmType[\"AES256\"] = \"AES256\";\n})(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {}));\n\nObject.defineProperty(exports, 'BaseRequestPolicy', {\n enumerable: true,\n get: function () { return coreHttp.BaseRequestPolicy; }\n});\nObject.defineProperty(exports, 'HttpHeaders', {\n enumerable: true,\n get: function () { return coreHttp.HttpHeaders; }\n});\nObject.defineProperty(exports, 'RequestPolicyOptions', {\n enumerable: true,\n get: function () { return coreHttp.RequestPolicyOptions; }\n});\nObject.defineProperty(exports, 'RestError', {\n enumerable: true,\n get: function () { return coreHttp.RestError; }\n});\nObject.defineProperty(exports, 'WebResource', {\n enumerable: true,\n get: function () { return coreHttp.WebResource; }\n});\nObject.defineProperty(exports, 'deserializationPolicy', {\n enumerable: true,\n get: function () { return coreHttp.deserializationPolicy; }\n});\nexports.AccountSASPermissions = AccountSASPermissions;\nexports.AccountSASResourceTypes = AccountSASResourceTypes;\nexports.AccountSASServices = AccountSASServices;\nexports.AnonymousCredential = AnonymousCredential;\nexports.AnonymousCredentialPolicy = AnonymousCredentialPolicy;\nexports.AppendBlobClient = AppendBlobClient;\nexports.BlobBatch = BlobBatch;\nexports.BlobBatchClient = BlobBatchClient;\nexports.BlobClient = BlobClient;\nexports.BlobLeaseClient = BlobLeaseClient;\nexports.BlobSASPermissions = BlobSASPermissions;\nexports.BlobServiceClient = BlobServiceClient;\nexports.BlockBlobClient = BlockBlobClient;\nexports.ContainerClient = ContainerClient;\nexports.ContainerSASPermissions = ContainerSASPermissions;\nexports.Credential = Credential;\nexports.CredentialPolicy = CredentialPolicy;\nexports.PageBlobClient = PageBlobClient;\nexports.Pipeline = Pipeline;\nexports.SASQueryParameters = SASQueryParameters;\nexports.StorageBrowserPolicy = StorageBrowserPolicy;\nexports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory;\nexports.StorageOAuthScopes = StorageOAuthScopes;\nexports.StorageRetryPolicy = StorageRetryPolicy;\nexports.StorageRetryPolicyFactory = StorageRetryPolicyFactory;\nexports.StorageSharedKeyCredential = StorageSharedKeyCredential;\nexports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy;\nexports.generateAccountSASQueryParameters = generateAccountSASQueryParameters;\nexports.generateBlobSASQueryParameters = generateBlobSASQueryParameters;\nexports.isPipelineLike = isPipelineLike;\nexports.logger = logger;\nexports.newPipeline = newPipeline;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BuildKit = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst semver = __importStar(require(\"semver\"));\nconst buildx_1 = require(\"../buildx/buildx\");\nconst builder_1 = require(\"../buildx/builder\");\nconst config_1 = require(\"./config\");\nconst exec_1 = require(\"../exec\");\nclass BuildKit {\n buildx;\n config;\n constructor(opts) {\n this.config = new config_1.Config();\n this.buildx = opts?.buildx || new buildx_1.Buildx();\n }\n async getVersion(node) {\n if (!node.buildkit && node.name) {\n try {\n return await this.getVersionWithinImage(node.name);\n }\n catch (e) {\n core.warning(e);\n }\n }\n return node.buildkit;\n }\n async getVersionWithinImage(nodeName) {\n core.debug(`BuildKit.getVersionWithinImage nodeName: ${nodeName}`);\n return exec_1.Exec.getExecOutput(`docker`, ['inspect', '--format', '{{.Config.Image}}', `${buildx_1.Buildx.containerNamePrefix}${nodeName}`], {\n ignoreReturnCode: true,\n silent: true\n }).then(bkitimage => {\n if (bkitimage.exitCode == 0 && bkitimage.stdout.length > 0) {\n core.debug(`BuildKit.getVersionWithinImage image: ${bkitimage.stdout.trim()}`);\n return exec_1.Exec.getExecOutput(`docker`, ['run', '--rm', bkitimage.stdout.trim(), '--version'], {\n ignoreReturnCode: true,\n silent: true\n }).then(bkitversion => {\n if (bkitversion.exitCode == 0 && bkitversion.stdout.length > 0) {\n return `${bkitimage.stdout.trim()} => ${bkitversion.stdout.trim()}`;\n }\n else if (bkitversion.stderr.length > 0) {\n throw new Error(bkitimage.stderr.trim());\n }\n return bkitversion.stdout.trim();\n });\n }\n else if (bkitimage.stderr.length > 0) {\n throw new Error(bkitimage.stderr.trim());\n }\n return bkitimage.stdout.trim();\n });\n }\n async versionSatisfies(builderName, range, builderInfo) {\n if (!builderInfo) {\n builderInfo = await new builder_1.Builder({ buildx: this.buildx }).inspect(builderName);\n }\n for (const node of builderInfo.nodes) {\n let bkversion = node.buildkit;\n core.debug(`BuildKit.versionSatisfies ${bkversion}: ${range}`);\n if (!bkversion) {\n try {\n bkversion = await this.getVersionWithinImage(node.name || '');\n }\n catch (e) {\n core.debug(`BuildKit.versionSatisfies ${node.name}: can't get version`);\n return false;\n }\n }\n core.debug(`BuildKit.versionSatisfies ${node.name}: version ${bkversion}`);\n // BuildKit version reported by moby is in the format of `v0.11.0-moby`\n if (builderInfo.driver == 'docker' && !bkversion.endsWith('-moby')) {\n return false;\n }\n if (!semver.satisfies(bkversion.replace(/-moby$/, ''), range)) {\n return false;\n }\n }\n return true;\n }\n}\nexports.BuildKit = BuildKit;\n//# sourceMappingURL=buildkit.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst context_1 = require(\"../context\");\nclass Config {\n resolveFromString(s) {\n return this.resolve(s, false);\n }\n resolveFromFile(s) {\n return this.resolve(s, true);\n }\n resolve(s, file) {\n if (file) {\n if (!fs_1.default.existsSync(s)) {\n throw new Error(`config file ${s} not found`);\n }\n s = fs_1.default.readFileSync(s, { encoding: 'utf-8' });\n }\n const configFile = context_1.Context.tmpName({ tmpdir: context_1.Context.tmpDir() });\n fs_1.default.writeFileSync(configFile, s);\n return configFile;\n }\n}\nexports.Config = Config;\n//# sourceMappingURL=config.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Bake = void 0;\nconst buildx_1 = require(\"./buildx\");\nconst exec_1 = require(\"../exec\");\nconst inputs_1 = require(\"./inputs\");\nconst util_1 = require(\"../util\");\nclass Bake {\n buildx;\n constructor(opts) {\n this.buildx = opts?.buildx || new buildx_1.Buildx();\n }\n async parseDefinitions(sources, targets, overrides, load, push, workdir) {\n const args = ['bake'];\n let remoteDef;\n const files = [];\n if (sources) {\n for (const source of sources.map(v => v.trim())) {\n if (source.length == 0) {\n continue;\n }\n if (!util_1.Util.isValidRef(source)) {\n files.push(source);\n continue;\n }\n if (remoteDef) {\n throw new Error(`Only one remote bake definition is allowed`);\n }\n remoteDef = source;\n }\n }\n if (remoteDef) {\n args.push(remoteDef);\n }\n for (const file of files) {\n args.push('--file', file);\n }\n if (overrides) {\n for (const override of overrides) {\n args.push('--set', override);\n }\n }\n if (load) {\n args.push('--load');\n }\n if (push) {\n args.push('--push');\n }\n const printCmd = await this.buildx.getCommand([...args, '--print', ...(targets || [])]);\n return await exec_1.Exec.getExecOutput(printCmd.command, printCmd.args, {\n cwd: workdir,\n ignoreReturnCode: true,\n silent: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(`cannot parse bake definitions: ${res.stderr.match(/(.*)\\s*$/)?.[0]?.trim() ?? 'unknown error'}`);\n }\n return JSON.parse(res.stdout.trim());\n });\n }\n static hasLocalExporter(def) {\n return inputs_1.Inputs.hasExporterType('local', Bake.exporters(def));\n }\n static hasTarExporter(def) {\n return inputs_1.Inputs.hasExporterType('tar', Bake.exporters(def));\n }\n static hasDockerExporter(def, load) {\n return load || inputs_1.Inputs.hasExporterType('docker', Bake.exporters(def));\n }\n static exporters(def) {\n const exporters = new Array();\n for (const key in def.target) {\n const target = def.target[key];\n if (target.output) {\n exporters.push(...target.output);\n }\n }\n return exporters;\n }\n}\nexports.Bake = Bake;\n//# sourceMappingURL=bake.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Builder = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst buildx_1 = require(\"./buildx\");\nconst exec_1 = require(\"../exec\");\nclass Builder {\n buildx;\n constructor(opts) {\n this.buildx = opts?.buildx || new buildx_1.Buildx();\n }\n async exists(name) {\n const cmd = await this.buildx.getCommand(['inspect', name]);\n const ok = await exec_1.Exec.getExecOutput(cmd.command, cmd.args, {\n ignoreReturnCode: true,\n silent: true\n })\n .then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n core.debug(`Builder.exists cmd err: ${res.stderr.trim()}`);\n return false;\n }\n return res.exitCode == 0;\n })\n .catch(error => {\n core.debug(`Builder.exists error: ${error}`);\n return false;\n });\n core.debug(`Builder.exists: ${ok}`);\n return ok;\n }\n async inspect(name) {\n const cmd = await this.buildx.getCommand(['inspect', name]);\n return await exec_1.Exec.getExecOutput(cmd.command, cmd.args, {\n ignoreReturnCode: true,\n silent: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(res.stderr.trim());\n }\n return Builder.parseInspect(res.stdout);\n });\n }\n static parseInspect(data) {\n const builder = {\n nodes: []\n };\n let parsingType;\n let currentNode = {};\n let currentGCPolicy;\n for (const line of data.trim().split(`\\n`)) {\n const [key, ...rest] = line.split(':');\n const lkey = key.toLowerCase();\n const value = rest.map(v => v.trim()).join(':');\n if (key.length == 0) {\n continue;\n }\n switch (true) {\n case lkey == 'name': {\n parsingType = undefined;\n if (builder.name == undefined) {\n builder.name = value;\n }\n else {\n if (currentGCPolicy && currentNode.gcPolicy) {\n currentNode.gcPolicy.push(currentGCPolicy);\n currentGCPolicy = undefined;\n }\n if (currentNode.name) {\n builder.nodes.push(currentNode);\n }\n currentNode = { name: value };\n }\n break;\n }\n case lkey == 'driver': {\n parsingType = undefined;\n builder.driver = value;\n break;\n }\n case lkey == 'last activity': {\n parsingType = undefined;\n builder.lastActivity = new Date(value);\n break;\n }\n case lkey == 'endpoint': {\n parsingType = undefined;\n currentNode.endpoint = value;\n break;\n }\n case lkey == 'driver options': {\n parsingType = undefined;\n currentNode['driver-opts'] = (value.match(/([a-zA-Z0-9_.]+)=\"([^\"]*)\"/g) || []).map(v => v.replace(/^(.*)=\"(.*)\"$/g, '$1=$2'));\n break;\n }\n case lkey == 'status': {\n parsingType = undefined;\n currentNode.status = value;\n break;\n }\n case lkey == 'flags': {\n parsingType = undefined;\n currentNode['buildkitd-flags'] = value;\n break;\n }\n case lkey == 'buildkit': {\n parsingType = undefined;\n currentNode.buildkit = value;\n break;\n }\n case lkey == 'platforms': {\n parsingType = undefined;\n if (!value) {\n break;\n }\n let platforms = [];\n // if a preferred platform is being set then use only these\n // https://docs.docker.com/engine/reference/commandline/buildx_inspect/#get-information-about-a-builder-instance\n if (value.includes('*')) {\n for (const platform of value.split(', ')) {\n if (platform.includes('*')) {\n platforms.push(platform.replace(/\\*/g, ''));\n }\n }\n }\n else {\n // otherwise set all platforms available\n platforms = value.split(', ');\n }\n currentNode.platforms = platforms.join(',');\n break;\n }\n case lkey == 'labels': {\n parsingType = 'label';\n currentNode.labels = {};\n break;\n }\n case lkey.startsWith('gc policy rule#'): {\n parsingType = 'gcpolicy';\n if (currentNode.gcPolicy && currentGCPolicy) {\n currentNode.gcPolicy.push(currentGCPolicy);\n currentGCPolicy = undefined;\n }\n break;\n }\n default: {\n switch (parsingType || '') {\n case 'label': {\n currentNode.labels = currentNode.labels || {};\n currentNode.labels[key.trim()] = value;\n break;\n }\n case 'gcpolicy': {\n currentNode.gcPolicy = currentNode.gcPolicy || [];\n currentGCPolicy = currentGCPolicy || {};\n switch (lkey.trim()) {\n case 'all': {\n currentGCPolicy.all = value == 'true';\n break;\n }\n case 'filters': {\n if (value) {\n currentGCPolicy.filter = value.split(',');\n }\n break;\n }\n case 'keep duration': {\n currentGCPolicy.keepDuration = value;\n break;\n }\n case 'keep bytes': {\n currentGCPolicy.keepBytes = value;\n break;\n }\n }\n break;\n }\n }\n }\n }\n }\n if (currentGCPolicy && currentNode.gcPolicy) {\n currentNode.gcPolicy.push(currentGCPolicy);\n }\n if (currentNode.name) {\n builder.nodes.push(currentNode);\n }\n return builder;\n }\n}\nexports.Builder = Builder;\n//# sourceMappingURL=builder.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Buildx = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst semver = __importStar(require(\"semver\"));\nconst docker_1 = require(\"../docker/docker\");\nconst exec_1 = require(\"../exec\");\nclass Buildx {\n _version;\n _versionOnce;\n _standalone;\n static containerNamePrefix = 'buildx_buildkit_';\n constructor(opts) {\n this._standalone = opts?.standalone;\n this._version = '';\n this._versionOnce = false;\n }\n static get configDir() {\n return process.env.BUILDX_CONFIG || path_1.default.join(docker_1.Docker.configDir, 'buildx');\n }\n static get certsDir() {\n return path_1.default.join(Buildx.configDir, 'certs');\n }\n async isStandalone() {\n const standalone = this._standalone ?? !(await docker_1.Docker.isAvailable());\n core.debug(`Buildx.isStandalone: ${standalone}`);\n return standalone;\n }\n async getCommand(args) {\n const standalone = await this.isStandalone();\n return {\n command: standalone ? 'buildx' : 'docker',\n args: standalone ? args : ['buildx', ...args]\n };\n }\n async isAvailable() {\n const cmd = await this.getCommand([]);\n const ok = await exec_1.Exec.getExecOutput(cmd.command, cmd.args, {\n ignoreReturnCode: true,\n silent: true\n })\n .then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n core.debug(`Buildx.isAvailable cmd err: ${res.stderr.trim()}`);\n return false;\n }\n return res.exitCode == 0;\n })\n .catch(error => {\n core.debug(`Buildx.isAvailable error: ${error}`);\n return false;\n });\n core.debug(`Buildx.isAvailable: ${ok}`);\n return ok;\n }\n async printInspect(name) {\n const cmd = await this.getCommand(['inspect', name]);\n await exec_1.Exec.exec(cmd.command, cmd.args, {\n failOnStdErr: false\n });\n }\n async version() {\n if (this._versionOnce) {\n return this._version;\n }\n this._versionOnce = true;\n const cmd = await this.getCommand(['version']);\n this._version = await exec_1.Exec.getExecOutput(cmd.command, cmd.args, {\n ignoreReturnCode: true,\n silent: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(res.stderr.trim());\n }\n return Buildx.parseVersion(res.stdout.trim());\n });\n return this._version;\n }\n async printVersion() {\n const cmd = await this.getCommand(['version']);\n await exec_1.Exec.exec(cmd.command, cmd.args, {\n failOnStdErr: false\n });\n }\n static parseVersion(stdout) {\n const matches = /\\sv?([0-9a-f]{7}|[0-9.]+)/.exec(stdout);\n if (!matches) {\n throw new Error(`Cannot parse buildx version`);\n }\n return matches[1];\n }\n async versionSatisfies(range, version) {\n const ver = version ?? (await this.version());\n if (!ver) {\n core.debug(`Buildx.versionSatisfies false: undefined version`);\n return false;\n }\n const res = semver.satisfies(ver, range) || /^[0-9a-f]{7}$/.exec(ver) !== null;\n core.debug(`Buildx.versionSatisfies ${ver} statisfies ${range}: ${res}`);\n return res;\n }\n static resolveCertsDriverOpts(driver, endpoint, cert) {\n let url;\n try {\n url = new URL(endpoint);\n }\n catch (e) {\n return [];\n }\n if (url.protocol != 'tcp:') {\n return [];\n }\n const driverOpts = [];\n if (Object.keys(cert).length == 0) {\n return driverOpts;\n }\n let host = url.hostname;\n if (url.port.length > 0) {\n host += `-${url.port}`;\n }\n if (cert.cacert !== undefined) {\n const cacertpath = path_1.default.join(Buildx.certsDir, `cacert_${host}.pem`);\n fs_1.default.writeFileSync(cacertpath, cert.cacert);\n driverOpts.push(`cacert=${cacertpath}`);\n }\n if (cert.cert !== undefined) {\n const certpath = path_1.default.join(Buildx.certsDir, `cert_${host}.pem`);\n fs_1.default.writeFileSync(certpath, cert.cert);\n driverOpts.push(`cert=${certpath}`);\n }\n if (cert.key !== undefined) {\n const keypath = path_1.default.join(Buildx.certsDir, `key_${host}.pem`);\n fs_1.default.writeFileSync(keypath, cert.key);\n driverOpts.push(`key=${keypath}`);\n }\n if (driver != 'remote') {\n return [];\n }\n return driverOpts;\n }\n}\nexports.Buildx = Buildx;\n//# sourceMappingURL=buildx.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Inputs = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst sync_1 = require(\"csv-parse/sync\");\nconst context_1 = require(\"../context\");\nconst github_1 = require(\"../github\");\nconst parseKvp = (kvp) => {\n const delimiterIndex = kvp.indexOf('=');\n const key = kvp.substring(0, delimiterIndex);\n const value = kvp.substring(delimiterIndex + 1);\n if (key.length == 0 || value.length == 0) {\n throw new Error(`${kvp} is not a valid secret`);\n }\n return [key, value];\n};\nclass Inputs {\n static getBuildImageIDFilePath() {\n return path_1.default.join(context_1.Context.tmpDir(), 'iidfile');\n }\n static getBuildMetadataFilePath() {\n return path_1.default.join(context_1.Context.tmpDir(), 'metadata-file');\n }\n static resolveBuildImageID() {\n const iidFile = Inputs.getBuildImageIDFilePath();\n if (!fs_1.default.existsSync(iidFile)) {\n return undefined;\n }\n return fs_1.default.readFileSync(iidFile, { encoding: 'utf-8' }).trim();\n }\n static resolveBuildMetadata() {\n const metadataFile = Inputs.getBuildMetadataFilePath();\n if (!fs_1.default.existsSync(metadataFile)) {\n return undefined;\n }\n const content = fs_1.default.readFileSync(metadataFile, { encoding: 'utf-8' }).trim();\n if (content === 'null') {\n return undefined;\n }\n return content;\n }\n static resolveDigest() {\n const metadata = Inputs.resolveBuildMetadata();\n if (metadata === undefined) {\n return undefined;\n }\n const metadataJSON = JSON.parse(metadata);\n if (metadataJSON['containerimage.digest']) {\n return metadataJSON['containerimage.digest'];\n }\n return undefined;\n }\n static resolveBuildSecretString(kvp) {\n return Inputs.resolveBuildSecret(kvp, false);\n }\n static resolveBuildSecretFile(kvp) {\n return Inputs.resolveBuildSecret(kvp, true);\n }\n static resolveBuildSecretEnv(kvp) {\n const [key, value] = parseKvp(kvp);\n return `id=${key},env=${value}`;\n }\n static resolveBuildSecret(kvp, file) {\n const [key, _value] = parseKvp(kvp);\n let value = _value;\n if (file) {\n if (!fs_1.default.existsSync(value)) {\n throw new Error(`secret file ${value} not found`);\n }\n value = fs_1.default.readFileSync(value, { encoding: 'utf-8' });\n }\n const secretFile = context_1.Context.tmpName({ tmpdir: context_1.Context.tmpDir() });\n fs_1.default.writeFileSync(secretFile, value);\n return `id=${key},src=${secretFile}`;\n }\n static getProvenanceInput(name) {\n const input = core.getInput(name);\n if (!input) {\n // if input is not set returns empty string\n return input;\n }\n try {\n return core.getBooleanInput(name) ? `builder-id=${github_1.GitHub.workflowRunURL}` : 'false';\n }\n catch (err) {\n // not a valid boolean, so we assume it's a string\n return Inputs.resolveProvenanceAttrs(input);\n }\n }\n static resolveProvenanceAttrs(input) {\n if (!input) {\n return `builder-id=${github_1.GitHub.workflowRunURL}`;\n }\n // parse attributes from input\n const fields = (0, sync_1.parse)(input, {\n relaxColumnCount: true,\n skipEmptyLines: true\n })[0];\n // check if builder-id attribute exists in the input\n for (const field of fields) {\n const parts = field\n .toString()\n .split(/(?<=^[^=]+?)=/)\n .map(item => item.trim());\n if (parts[0] == 'builder-id') {\n return input;\n }\n }\n // if not add builder-id attribute\n return `${input},builder-id=${github_1.GitHub.workflowRunURL}`;\n }\n static hasLocalExporter(exporters) {\n return Inputs.hasExporterType('local', exporters);\n }\n static hasTarExporter(exporters) {\n return Inputs.hasExporterType('tar', exporters);\n }\n static hasDockerExporter(exporters, load) {\n return load || Inputs.hasExporterType('docker', exporters);\n }\n static hasExporterType(name, exporters) {\n const records = (0, sync_1.parse)(exporters.join(`\\n`), {\n delimiter: ',',\n trim: true,\n columns: false,\n relaxColumnCount: true\n });\n for (const record of records) {\n if (record.length == 1 && !record[0].startsWith('type=')) {\n // Local if no type is defined\n // https://github.com/docker/buildx/blob/d2bf42f8b4784d83fde17acb3ed84703ddc2156b/build/output.go#L29-L43\n return name == 'local';\n }\n for (const [key, value] of record.map(chunk => chunk.split('=').map(item => item.trim()))) {\n if (key == 'type' && value == name) {\n return true;\n }\n }\n }\n return false;\n }\n static hasGitAuthTokenSecret(secrets) {\n for (const secret of secrets) {\n if (secret.startsWith('GIT_AUTH_TOKEN=')) {\n return true;\n }\n }\n return false;\n }\n}\nexports.Inputs = Inputs;\n//# sourceMappingURL=inputs.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Install = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst tc = __importStar(require(\"@actions/tool-cache\"));\nconst semver = __importStar(require(\"semver\"));\nconst util = __importStar(require(\"util\"));\nconst buildx_1 = require(\"./buildx\");\nconst cache_1 = require(\"../cache\");\nconst context_1 = require(\"../context\");\nconst exec_1 = require(\"../exec\");\nconst docker_1 = require(\"../docker/docker\");\nconst git_1 = require(\"../git\");\nconst util_1 = require(\"../util\");\nclass Install {\n _standalone;\n constructor(opts) {\n this._standalone = opts?.standalone;\n }\n /*\n * Download buildx binary from GitHub release\n * @param v: version semver version or latest\n * @param ghaNoCache: disable binary caching in GitHub Actions cache backend\n * @returns path to the buildx binary\n */\n async download(v, ghaNoCache) {\n const version = await Install.getDownloadVersion(v);\n core.debug(`Install.download version: ${version.version}`);\n const release = await Install.getRelease(version);\n core.debug(`Install.download release tag name: ${release.tag_name}`);\n const vspec = await this.vspec(release.tag_name);\n core.debug(`Install.download vspec: ${vspec}`);\n const c = semver.clean(vspec) || '';\n if (!semver.valid(c)) {\n throw new Error(`Invalid Buildx version \"${vspec}\".`);\n }\n const installCache = new cache_1.Cache({\n htcName: version.key != 'official' ? `buildx-dl-bin-${version.key}` : 'buildx-dl-bin',\n htcVersion: vspec,\n baseCacheDir: path_1.default.join(buildx_1.Buildx.configDir, '.bin'),\n cacheFile: os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx',\n ghaNoCache: ghaNoCache\n });\n const cacheFoundPath = await installCache.find();\n if (cacheFoundPath) {\n core.info(`Buildx binary found in ${cacheFoundPath}`);\n return cacheFoundPath;\n }\n const downloadURL = util.format(version.downloadURL, vspec, this.filename(vspec));\n core.info(`Downloading ${downloadURL}`);\n const htcDownloadPath = await tc.downloadTool(downloadURL);\n core.debug(`Install.download htcDownloadPath: ${htcDownloadPath}`);\n const cacheSavePath = await installCache.save(htcDownloadPath);\n core.info(`Cached to ${cacheSavePath}`);\n return cacheSavePath;\n }\n /*\n * Build buildx binary from source\n * @param gitContext: git repo context\n * @param ghaNoCache: disable binary caching in GitHub Actions cache backend\n * @returns path to the buildx binary\n */\n async build(gitContext, ghaNoCache) {\n const vspec = await this.vspec(gitContext);\n core.debug(`Install.build vspec: ${vspec}`);\n const installCache = new cache_1.Cache({\n htcName: 'buildx-build-bin',\n htcVersion: vspec,\n baseCacheDir: path_1.default.join(buildx_1.Buildx.configDir, '.bin'),\n cacheFile: os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx',\n ghaNoCache: ghaNoCache\n });\n const cacheFoundPath = await installCache.find();\n if (cacheFoundPath) {\n core.info(`Buildx binary found in ${cacheFoundPath}`);\n return cacheFoundPath;\n }\n const outputDir = path_1.default.join(context_1.Context.tmpDir(), 'buildx-build-cache');\n const buildCmd = await this.buildCommand(gitContext, outputDir);\n const buildBinPath = await exec_1.Exec.getExecOutput(buildCmd.command, buildCmd.args, {\n ignoreReturnCode: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(`build failed with: ${res.stderr.match(/(.*)\\s*$/)?.[0]?.trim() ?? 'unknown error'}`);\n }\n return `${outputDir}/buildx`;\n });\n const cacheSavePath = await installCache.save(buildBinPath);\n core.info(`Cached to ${cacheSavePath}`);\n return cacheSavePath;\n }\n async installStandalone(binPath, dest) {\n core.info('Standalone mode');\n dest = dest || context_1.Context.tmpDir();\n const binDir = path_1.default.join(dest, 'buildx-bin-standalone');\n if (!fs_1.default.existsSync(binDir)) {\n fs_1.default.mkdirSync(binDir, { recursive: true });\n }\n const binName = os_1.default.platform() == 'win32' ? 'buildx.exe' : 'buildx';\n const buildxPath = path_1.default.join(binDir, binName);\n fs_1.default.copyFileSync(binPath, buildxPath);\n core.info('Fixing perms');\n fs_1.default.chmodSync(buildxPath, '0755');\n core.addPath(binDir);\n core.info('Added Buildx to PATH');\n core.info(`Binary path: ${buildxPath}`);\n return buildxPath;\n }\n async installPlugin(binPath, dest) {\n core.info('Docker plugin mode');\n dest = dest || docker_1.Docker.configDir;\n const pluginsDir = path_1.default.join(dest, 'cli-plugins');\n if (!fs_1.default.existsSync(pluginsDir)) {\n fs_1.default.mkdirSync(pluginsDir, { recursive: true });\n }\n const binName = os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx';\n const pluginPath = path_1.default.join(pluginsDir, binName);\n fs_1.default.copyFileSync(binPath, pluginPath);\n core.info('Fixing perms');\n fs_1.default.chmodSync(pluginPath, '0755');\n core.info(`Plugin path: ${pluginPath}`);\n return pluginPath;\n }\n async buildCommand(gitContext, outputDir) {\n const buildxStandaloneFound = await new buildx_1.Buildx({ standalone: true }).isAvailable();\n const buildxPluginFound = await new buildx_1.Buildx({ standalone: false }).isAvailable();\n let buildStandalone = false;\n if ((await this.isStandalone()) && buildxStandaloneFound) {\n core.debug(`Install.buildCommand: Buildx standalone found, build with it`);\n buildStandalone = true;\n }\n else if (!(await this.isStandalone()) && buildxPluginFound) {\n core.debug(`Install.buildCommand: Buildx plugin found, build with it`);\n buildStandalone = false;\n }\n else if (buildxStandaloneFound) {\n core.debug(`Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it`);\n buildStandalone = true;\n }\n else if (buildxPluginFound) {\n core.debug(`Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it`);\n buildStandalone = false;\n }\n else {\n throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${gitContext}`);\n }\n const args = ['build', '--target', 'binaries', '--platform', 'local', '--build-arg', 'BUILDKIT_CONTEXT_KEEP_GIT_DIR=1', '--output', `type=local,dest=${outputDir}`];\n if (process.env.GIT_AUTH_TOKEN) {\n args.push('--secret', 'id=GIT_AUTH_TOKEN');\n }\n args.push(gitContext);\n //prettier-ignore\n return await new buildx_1.Buildx({ standalone: buildStandalone }).getCommand(args);\n }\n async isStandalone() {\n const standalone = this._standalone ?? !(await docker_1.Docker.isAvailable());\n core.debug(`Install.isStandalone: ${standalone}`);\n return standalone;\n }\n filename(version) {\n let arch;\n switch (os_1.default.arch()) {\n case 'x64': {\n arch = 'amd64';\n break;\n }\n case 'ppc64': {\n arch = 'ppc64le';\n break;\n }\n case 'arm': {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const arm_version = process.config.variables.arm_version;\n arch = arm_version ? 'arm-v' + arm_version : 'arm';\n break;\n }\n default: {\n arch = os_1.default.arch();\n break;\n }\n }\n const platform = os_1.default.platform() == 'win32' ? 'windows' : os_1.default.platform();\n const ext = os_1.default.platform() == 'win32' ? '.exe' : '';\n return util.format('buildx-v%s.%s-%s%s', version, platform, arch, ext);\n }\n /*\n * Get version spec (fingerprint) for cache key. If versionOrRef is a valid\n * Git context, then return the SHA of the ref along the repo and owner and\n * create a hash of it. Otherwise, return the versionOrRef (semver) as is\n * without the 'v' prefix.\n */\n async vspec(versionOrRef) {\n if (!util_1.Util.isValidRef(versionOrRef)) {\n const v = versionOrRef.replace(/^v+|v+$/g, '');\n core.info(`Use ${v} version spec cache key for ${versionOrRef}`);\n return v;\n }\n // eslint-disable-next-line prefer-const\n let [baseURL, ref] = versionOrRef.split('#');\n if (ref.length == 0) {\n ref = 'master';\n }\n let sha;\n if (ref.match(/^[0-9a-fA-F]{40}$/)) {\n sha = ref;\n }\n else {\n sha = await git_1.Git.remoteSha(baseURL, ref, process.env.GIT_AUTH_TOKEN);\n }\n const [owner, repo] = baseURL.substring('https://github.com/'.length).split('/');\n const key = `${owner}/${util_1.Util.trimSuffix(repo, '.git')}/${sha}`;\n const hash = util_1.Util.hash(key);\n core.info(`Use ${hash} version spec cache key for ${key}`);\n return hash;\n }\n static async getDownloadVersion(v) {\n let [repoKey, version] = v.split(':');\n if (!version) {\n version = repoKey;\n repoKey = 'official';\n }\n switch (repoKey) {\n case 'official': {\n return {\n key: repoKey,\n version: version,\n downloadURL: 'https://github.com/docker/buildx/releases/download/v%s/%s',\n releasesURL: 'https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json'\n };\n }\n case 'lab': {\n return {\n key: repoKey,\n version: version,\n downloadURL: 'https://github.com/docker/buildx-desktop/releases/download/v%s/%s',\n releasesURL: 'https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json'\n };\n }\n default: {\n throw new Error(`Cannot find buildx version for ${v}`);\n }\n }\n }\n static async getRelease(version) {\n const http = new httpm.HttpClient('docker-actions-toolkit');\n const resp = await http.get(version.releasesURL);\n const body = await resp.readBody();\n const statusCode = resp.message.statusCode || 500;\n if (statusCode >= 400) {\n throw new Error(`Failed to get Buildx releases from ${version.releasesURL} with status code ${statusCode}: ${body}`);\n }\n const releases = JSON.parse(body);\n if (!releases[version.version]) {\n throw new Error(`Cannot find Buildx release ${version.version} in ${version.releasesURL}`);\n }\n return releases[version.version];\n }\n}\nexports.Install = Install;\n//# sourceMappingURL=install.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Cache = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst tc = __importStar(require(\"@actions/tool-cache\"));\nconst cache = __importStar(require(\"@actions/cache\"));\nconst util = __importStar(require(\"util\"));\nclass Cache {\n opts;\n ghaCacheKey;\n ghaNoCache;\n cacheDir;\n cachePath;\n constructor(opts) {\n this.opts = opts;\n this.ghaCacheKey = util.format('%s-%s-%s', this.opts.htcName, this.opts.htcVersion, this.platform());\n this.ghaNoCache = this.opts.ghaNoCache;\n this.cacheDir = path_1.default.join(this.opts.baseCacheDir, this.opts.htcVersion, this.platform());\n this.cachePath = path_1.default.join(this.cacheDir, this.opts.cacheFile);\n if (!fs_1.default.existsSync(this.cacheDir)) {\n fs_1.default.mkdirSync(this.cacheDir, { recursive: true });\n }\n }\n async save(file) {\n core.debug(`Cache.save ${file}`);\n const cachePath = this.copyToCache(file);\n const htcPath = await tc.cacheDir(this.cacheDir, this.opts.htcName, this.opts.htcVersion, this.platform());\n core.debug(`Cache.save cached to hosted tool cache ${htcPath}`);\n if (!this.ghaNoCache && cache.isFeatureAvailable()) {\n core.debug(`Cache.save caching ${this.ghaCacheKey} to GitHub Actions cache`);\n await cache.saveCache([this.cacheDir], this.ghaCacheKey);\n }\n return cachePath;\n }\n async find() {\n let htcPath = tc.find(this.opts.htcName, this.opts.htcVersion, this.platform());\n if (htcPath) {\n core.info(`Restored from hosted tool cache ${htcPath}`);\n return this.copyToCache(`${htcPath}/${this.opts.cacheFile}`);\n }\n if (!this.ghaNoCache && cache.isFeatureAvailable()) {\n core.debug(`GitHub Actions cache feature available`);\n if (await cache.restoreCache([this.cacheDir], this.ghaCacheKey)) {\n core.info(`Restored ${this.ghaCacheKey} from GitHub Actions cache`);\n htcPath = await tc.cacheDir(this.cacheDir, this.opts.htcName, this.opts.htcVersion, this.platform());\n core.info(`Restored to hosted tool cache ${htcPath}`);\n return this.copyToCache(`${htcPath}/${this.opts.cacheFile}`);\n }\n }\n else if (this.ghaNoCache) {\n core.info(`GitHub Actions cache disabled`);\n }\n else {\n core.info(`GitHub Actions cache feature not available`);\n }\n return '';\n }\n copyToCache(file) {\n core.debug(`Copying ${file} to ${this.cachePath}`);\n fs_1.default.copyFileSync(file, this.cachePath);\n return this.cachePath;\n }\n platform() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const arm_version = process.config.variables.arm_version;\n return `${os_1.default.platform()}-${os_1.default.arch()}${arm_version ? 'v' + arm_version : ''}`;\n }\n}\nexports.Cache = Cache;\n//# sourceMappingURL=cache.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst tmp = __importStar(require(\"tmp\"));\nconst github = __importStar(require(\"@actions/github\"));\nconst github_1 = require(\"./github\");\nclass Context {\n static _tmpDir = fs_1.default.mkdtempSync(path_1.default.join(Context.ensureDirExists(process.env.RUNNER_TEMP || os_1.default.tmpdir()), 'docker-actions-toolkit-'));\n static ensureDirExists(dir) {\n fs_1.default.mkdirSync(dir, { recursive: true });\n return dir;\n }\n static tmpDir() {\n return Context._tmpDir;\n }\n static tmpName(options) {\n return tmp.tmpNameSync(options);\n }\n static gitRef() {\n let gitRef = github.context.ref;\n if (github.context.sha && gitRef && !gitRef.startsWith('refs/')) {\n gitRef = `refs/heads/${github.context.ref}`;\n }\n if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {\n gitRef = github.context.sha;\n }\n return gitRef;\n }\n static gitContext() {\n return `${github_1.GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}.git#${Context.gitRef()}`;\n }\n static provenanceBuilderID() {\n return `${github_1.GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId}`;\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Docker = void 0;\nconst fs_1 = __importDefault(require(\"fs\"));\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst exec_1 = require(\"../exec\");\nclass Docker {\n static get configDir() {\n return process.env.DOCKER_CONFIG || path_1.default.join(os_1.default.homedir(), '.docker');\n }\n static configFile() {\n const f = path_1.default.join(Docker.configDir, 'config.json');\n if (!fs_1.default.existsSync(f)) {\n return undefined;\n }\n return JSON.parse(fs_1.default.readFileSync(f, { encoding: 'utf-8' }));\n }\n static async isAvailable() {\n return await io\n .which('docker', true)\n .then(res => {\n core.debug(`Docker.isAvailable ok: ${res}`);\n return true;\n })\n .catch(error => {\n core.debug(`Docker.isAvailable error: ${error}`);\n return false;\n });\n }\n static async context(name) {\n const args = ['context', 'inspect', '--format', '{{.Name}}'];\n if (name) {\n args.push(name);\n }\n return await exec_1.Exec.getExecOutput(`docker`, args, {\n ignoreReturnCode: true,\n silent: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(res.stderr);\n }\n return res.stdout.trim();\n });\n }\n static async printVersion() {\n await exec_1.Exec.exec('docker', ['version']);\n }\n static async printInfo() {\n await exec_1.Exec.exec('docker', ['info']);\n }\n}\nexports.Docker = Docker;\n//# sourceMappingURL=docker.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Exec = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst exec = __importStar(require(\"@actions/exec\"));\nclass Exec {\n static async exec(commandLine, args, options) {\n core.debug(`Exec.exec: ${commandLine} ${args?.join(' ')}`);\n return exec.exec(commandLine, args, options);\n }\n static async getExecOutput(commandLine, args, options) {\n core.debug(`Exec.getExecOutput: ${commandLine} ${args?.join(' ')}`);\n return exec.getExecOutput(commandLine, args, options);\n }\n}\nexports.Exec = Exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Git = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst exec_1 = require(\"./exec\");\nconst github_1 = require(\"./github\");\nconst context_1 = require(\"@actions/github/lib/context\");\nclass Git {\n static async context() {\n const ctx = new context_1.Context();\n ctx.ref = await Git.ref();\n ctx.sha = await Git.fullCommit();\n return ctx;\n }\n static async isInsideWorkTree() {\n return await Git.exec(['rev-parse', '--is-inside-work-tree'])\n .then(out => {\n return out === 'true';\n })\n .catch(() => {\n return false;\n });\n }\n static async remoteSha(repo, ref, token) {\n const repoMatch = repo.match(/github.com\\/([^/]+)\\/([^/]+?)(?:\\.git)?(\\/|$)/);\n // if we have a token and this is a GitHub repo we can use the GitHub API\n if (token && repoMatch) {\n core.setSecret(token);\n const octokit = new (core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods).defaults({\n baseUrl: github_1.GitHub.apiURL\n }))({ auth: token });\n const [owner, repoName] = repoMatch.slice(1, 3);\n try {\n return (await octokit.rest.repos.listCommits({\n owner: owner,\n repo: repoName,\n sha: ref,\n per_page: 1\n })).data[0].sha;\n }\n catch (e) {\n throw new Error(`Cannot find remote ref for ${repo}#${ref}: ${e.message}`);\n }\n }\n // otherwise we fall back to git ls-remote\n return await Git.exec(['ls-remote', repo, ref]).then(out => {\n const [rsha] = out.split(/[\\s\\t]/);\n if (rsha.length == 0) {\n throw new Error(`Cannot find remote ref for ${repo}#${ref}`);\n }\n return rsha;\n });\n }\n static async remoteURL() {\n return await Git.exec(['remote', 'get-url', 'origin']).then(rurl => {\n if (rurl.length == 0) {\n return Git.exec(['remote', 'get-url', 'upstream']).then(rurl => {\n if (rurl.length == 0) {\n throw new Error(`Cannot find remote URL for origin or upstream`);\n }\n return rurl;\n });\n }\n return rurl;\n });\n }\n static async ref() {\n const isHeadDetached = await Git.isHeadDetached();\n if (isHeadDetached) {\n return await Git.getDetachedRef();\n }\n return await Git.exec(['symbolic-ref', 'HEAD']);\n }\n static async fullCommit() {\n return await Git.exec(['show', '--format=%H', 'HEAD', '--quiet', '--']);\n }\n static async shortCommit() {\n return await Git.exec(['show', '--format=%h', 'HEAD', '--quiet', '--']);\n }\n static async tag() {\n return await Git.exec(['tag', '--points-at', 'HEAD', '--sort', '-version:creatordate']).then(tags => {\n if (tags.length == 0) {\n return Git.exec(['describe', '--tags', '--abbrev=0']);\n }\n return tags.split('\\n')[0];\n });\n }\n static async isHeadDetached() {\n return await Git.exec(['branch', '--show-current']).then(res => {\n return res.length == 0;\n });\n }\n static async getDetachedRef() {\n const res = await Git.exec(['show', '-s', '--pretty=%D']);\n // Can be \"HEAD, \" or \"grafted, HEAD, \"\n const refMatch = res.match(/^(grafted, )?HEAD, (.*)$/);\n if (!refMatch || !refMatch[2]) {\n throw new Error(`Cannot find detached HEAD ref in \"${res}\"`);\n }\n const ref = refMatch[2].trim();\n // Tag refs are formatted as \"tag: \"\n if (ref.startsWith('tag: ')) {\n return `refs/tags/${ref.split(':')[1].trim()}`;\n }\n // Branch refs are formatted as \"/, \"\n const branchMatch = ref.match(/^[^/]+\\/[^/]+, (.+)$/);\n if (branchMatch) {\n return `refs/heads/${branchMatch[1].trim()}`;\n }\n // Pull request merge refs are formatted as \"pull//\"\n const prMatch = ref.match(/^pull\\/\\d+\\/(head|merge)$/);\n if (prMatch) {\n return `refs/${ref}`;\n }\n throw new Error(`Unsupported detached HEAD ref in \"${res}\"`);\n }\n static async exec(args = []) {\n return await exec_1.Exec.getExecOutput(`git`, args, {\n ignoreReturnCode: true,\n silent: true\n }).then(res => {\n if (res.stderr.length > 0 && res.exitCode != 0) {\n throw new Error(res.stderr);\n }\n return res.stdout.trim();\n });\n }\n}\nexports.Git = Git;\n//# sourceMappingURL=git.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GitHub = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst github = __importStar(require(\"@actions/github\"));\nconst jwt_decode_1 = require(\"jwt-decode\");\nclass GitHub {\n octokit;\n constructor(opts) {\n this.octokit = github.getOctokit(`${opts?.token}`);\n }\n repoData() {\n return this.octokit.rest.repos.get({ ...github.context.repo }).then(response => response.data);\n }\n static get context() {\n return github.context;\n }\n static get serverURL() {\n return process.env.GITHUB_SERVER_URL || 'https://github.com';\n }\n static get apiURL() {\n return process.env.GITHUB_API_URL || 'https://api.github.com';\n }\n static get workflowRunURL() {\n return `${GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId}`;\n }\n static get actionsRuntimeToken() {\n const token = process.env['ACTIONS_RUNTIME_TOKEN'] || '';\n return token ? (0, jwt_decode_1.jwtDecode)(token) : undefined;\n }\n static async printActionsRuntimeTokenACs() {\n let jwt;\n try {\n jwt = GitHub.actionsRuntimeToken;\n }\n catch (e) {\n throw new Error(`Cannot parse GitHub Actions Runtime Token: ${e.message}`);\n }\n if (!jwt) {\n throw new Error(`ACTIONS_RUNTIME_TOKEN not set`);\n }\n try {\n JSON.parse(`${jwt.ac}`).forEach(ac => {\n let permission;\n switch (ac.Permission) {\n case 1:\n permission = 'read';\n break;\n case 2:\n permission = 'write';\n break;\n case 3:\n permission = 'read/write';\n break;\n default:\n permission = `unimplemented (${ac.Permission})`;\n }\n core.info(`${ac.Scope}: ${permission}`);\n });\n }\n catch (e) {\n throw new Error(`Cannot parse GitHub Actions Runtime Token ACs: ${e.message}`);\n }\n }\n}\nexports.GitHub = GitHub;\n//# sourceMappingURL=github.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.run = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst isPost = !!process.env['STATE_isPost'];\nif (!isPost) {\n core.saveState('isPost', 'true');\n}\n/**\n * Runs a GitHub Action.\n * Output will be streamed to the live console.\n *\n * @param main runs the defined function.\n * @param post runs the defined function at the end of the job if set.\n * @returns Promise\n */\nasync function run(main, post) {\n if (!isPost) {\n try {\n await main();\n }\n catch (e) {\n core.setFailed(e.message);\n }\n }\n else if (post) {\n await post();\n }\n}\nexports.run = run;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Toolkit = void 0;\nconst buildx_1 = require(\"./buildx/buildx\");\nconst install_1 = require(\"./buildx/install\");\nconst bake_1 = require(\"./buildx/bake\");\nconst builder_1 = require(\"./buildx/builder\");\nconst buildkit_1 = require(\"./buildkit/buildkit\");\nconst github_1 = require(\"./github\");\nclass Toolkit {\n github;\n buildx;\n buildxInstall;\n bake;\n builder;\n buildkit;\n constructor(opts = {}) {\n this.github = new github_1.GitHub({ token: opts.githubToken });\n this.buildx = new buildx_1.Buildx();\n this.buildxInstall = new install_1.Install();\n this.bake = new bake_1.Bake({ buildx: this.buildx });\n this.builder = new builder_1.Builder({ buildx: this.buildx });\n this.buildkit = new buildkit_1.BuildKit({ buildx: this.buildx });\n }\n}\nexports.Toolkit = Toolkit;\n//# sourceMappingURL=toolkit.js.map","\"use strict\";\n/**\n * Copyright 2023 actions-toolkit authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst crypto_1 = __importDefault(require(\"crypto\"));\nconst fs_1 = __importDefault(require(\"fs\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst sync_1 = require(\"csv-parse/sync\");\nclass Util {\n static getInputList(name, opts) {\n return this.getList(core.getInput(name), opts);\n }\n static getList(input, opts) {\n const res = [];\n if (input == '') {\n return res;\n }\n const records = (0, sync_1.parse)(input, {\n columns: false,\n relaxQuotes: true,\n comment: opts?.comment,\n relaxColumnCount: true,\n skipEmptyLines: true,\n quote: opts?.quote\n });\n for (const record of records) {\n if (record.length == 1) {\n if (opts?.ignoreComma) {\n res.push(record[0]);\n }\n else {\n res.push(...record[0].split(','));\n }\n }\n else if (!opts?.ignoreComma) {\n res.push(...record);\n }\n else {\n res.push(record.join(','));\n }\n }\n return res.filter(item => item).map(pat => pat.trim());\n }\n static async asyncForEach(array, callback) {\n for (let index = 0; index < array.length; index++) {\n await callback(array[index], index, array);\n }\n }\n static isValidURL(urlStr) {\n let url;\n try {\n url = new URL(urlStr);\n }\n catch (e) {\n return false;\n }\n return url.protocol === 'http:' || url.protocol === 'https:';\n }\n static isValidRef(refStr) {\n if (Util.isValidURL(refStr)) {\n return true;\n }\n for (const prefix of ['git://', 'github.com/', 'git@']) {\n if (refStr.startsWith(prefix)) {\n return true;\n }\n }\n return false;\n }\n static async powershellCommand(script, params) {\n const powershellPath = await io.which('powershell', true);\n const escapedScript = script.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedParams = [];\n if (params) {\n for (const key in params) {\n escapedParams.push(`-${key} '${params[key].replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '')}'`);\n }\n }\n return {\n command: `\"${powershellPath}\"`,\n args: ['-NoLogo', '-Sta', '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-Command', `& '${escapedScript}' ${escapedParams.join(' ')}`]\n };\n }\n static isDirectory(p) {\n try {\n return fs_1.default.lstatSync(p).isDirectory();\n }\n catch (_) {\n // noop\n }\n return false;\n }\n static trimPrefix(str, suffix) {\n if (!str || !suffix) {\n return str;\n }\n const index = str.indexOf(suffix);\n if (index !== 0) {\n return str;\n }\n return str.substring(suffix.length);\n }\n static trimSuffix(str, suffix) {\n if (!str || !suffix) {\n return str;\n }\n const index = str.lastIndexOf(suffix);\n if (index === -1 || index + suffix.length !== str.length) {\n return str;\n }\n return str.substring(0, index);\n }\n static sleep(seconds) {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n }\n static hash(input) {\n return crypto_1.default.createHash('sha256').update(input).digest('hex');\n }\n}\nexports.Util = Util;\n//# sourceMappingURL=util.js.map","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => comps.join(' ').trim())\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst inherits = require('node:util').inherits\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst PartStream = require('./PartStream')\nconst HeaderParser = require('./HeaderParser')\n\nconst DASH = 45\nconst B_ONEDASH = Buffer.from('-')\nconst B_CRLF = Buffer.from('\\r\\n')\nconst EMPTY_FN = function () {}\n\nfunction Dicer (cfg) {\n if (!(this instanceof Dicer)) { return new Dicer(cfg) }\n WritableStream.call(this, cfg)\n\n if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }\n\n if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }\n\n this._headerFirst = cfg.headerFirst\n\n this._dashes = 0\n this._parts = 0\n this._finished = false\n this._realFinish = false\n this._isPreamble = true\n this._justMatched = false\n this._firstWrite = true\n this._inHeader = true\n this._part = undefined\n this._cb = undefined\n this._ignoreData = false\n this._partOpts = { highWaterMark: cfg.partHwm }\n this._pause = false\n\n const self = this\n this._hparser = new HeaderParser(cfg)\n this._hparser.on('header', function (header) {\n self._inHeader = false\n self._part.emit('header', header)\n })\n}\ninherits(Dicer, WritableStream)\n\nDicer.prototype.emit = function (ev) {\n if (ev === 'finish' && !this._realFinish) {\n if (!this._finished) {\n const self = this\n process.nextTick(function () {\n self.emit('error', new Error('Unexpected end of multipart data'))\n if (self._part && !self._ignoreData) {\n const type = (self._isPreamble ? 'Preamble' : 'Part')\n self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))\n self._part.push(null)\n process.nextTick(function () {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n return\n }\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n }\n } else { WritableStream.prototype.emit.apply(this, arguments) }\n}\n\nDicer.prototype._write = function (data, encoding, cb) {\n // ignore unexpected data (e.g. extra trailer data after finished)\n if (!this._hparser && !this._bparser) { return cb() }\n\n if (this._headerFirst && this._isPreamble) {\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }\n }\n const r = this._hparser.push(data)\n if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }\n }\n\n // allows for \"easier\" testing\n if (this._firstWrite) {\n this._bparser.push(B_CRLF)\n this._firstWrite = false\n }\n\n this._bparser.push(data)\n\n if (this._pause) { this._cb = cb } else { cb() }\n}\n\nDicer.prototype.reset = function () {\n this._part = undefined\n this._bparser = undefined\n this._hparser = undefined\n}\n\nDicer.prototype.setBoundary = function (boundary) {\n const self = this\n this._bparser = new StreamSearch('\\r\\n--' + boundary)\n this._bparser.on('info', function (isMatch, data, start, end) {\n self._oninfo(isMatch, data, start, end)\n })\n}\n\nDicer.prototype._ignore = function () {\n if (this._part && !this._ignoreData) {\n this._ignoreData = true\n this._part.on('error', EMPTY_FN)\n // we must perform some kind of read on the stream even though we are\n // ignoring the data, otherwise node's Readable stream will not emit 'end'\n // after pushing null to the stream\n this._part.resume()\n }\n}\n\nDicer.prototype._oninfo = function (isMatch, data, start, end) {\n let buf; const self = this; let i = 0; let r; let shouldWriteMore = true\n\n if (!this._part && this._justMatched && data) {\n while (this._dashes < 2 && (start + i) < end) {\n if (data[start + i] === DASH) {\n ++i\n ++this._dashes\n } else {\n if (this._dashes) { buf = B_ONEDASH }\n this._dashes = 0\n break\n }\n }\n if (this._dashes === 2) {\n if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }\n this.reset()\n this._finished = true\n // no more parts will be added\n if (self._parts === 0) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n }\n }\n if (this._dashes) { return }\n }\n if (this._justMatched) { this._justMatched = false }\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n this._part._read = function (n) {\n self._unpause()\n }\n if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }\n if (!this._isPreamble) { this._inHeader = true }\n }\n if (data && start < end && !this._ignoreData) {\n if (this._isPreamble || !this._inHeader) {\n if (buf) { shouldWriteMore = this._part.push(buf) }\n shouldWriteMore = this._part.push(data.slice(start, end))\n if (!shouldWriteMore) { this._pause = true }\n } else if (!this._isPreamble && this._inHeader) {\n if (buf) { this._hparser.push(buf) }\n r = this._hparser.push(data.slice(start, end))\n if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }\n }\n }\n if (isMatch) {\n this._hparser.reset()\n if (this._isPreamble) { this._isPreamble = false } else {\n if (start !== end) {\n ++this._parts\n this._part.on('end', function () {\n if (--self._parts === 0) {\n if (self._finished) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n } else {\n self._unpause()\n }\n }\n })\n }\n }\n this._part.push(null)\n this._part = undefined\n this._ignoreData = false\n this._justMatched = true\n this._dashes = 0\n }\n}\n\nDicer.prototype._unpause = function () {\n if (!this._pause) { return }\n\n this._pause = false\n if (this._cb) {\n const cb = this._cb\n this._cb = undefined\n cb()\n }\n}\n\nmodule.exports = Dicer\n","'use strict'\n\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\nconst getLimit = require('../../../lib/utils/getLimit')\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst B_DCRLF = Buffer.from('\\r\\n\\r\\n')\nconst RE_CRLF = /\\r\\n/g\nconst RE_HDR = /^([^:]+):[ \\t]?([\\x00-\\xFF]+)?$/ // eslint-disable-line no-control-regex\n\nfunction HeaderParser (cfg) {\n EventEmitter.call(this)\n\n cfg = cfg || {}\n const self = this\n this.nread = 0\n this.maxed = false\n this.npairs = 0\n this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)\n this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)\n this.buffer = ''\n this.header = {}\n this.finished = false\n this.ss = new StreamSearch(B_DCRLF)\n this.ss.on('info', function (isMatch, data, start, end) {\n if (data && !self.maxed) {\n if (self.nread + end - start >= self.maxHeaderSize) {\n end = self.maxHeaderSize - self.nread + start\n self.nread = self.maxHeaderSize\n self.maxed = true\n } else { self.nread += (end - start) }\n\n self.buffer += data.toString('binary', start, end)\n }\n if (isMatch) { self._finish() }\n })\n}\ninherits(HeaderParser, EventEmitter)\n\nHeaderParser.prototype.push = function (data) {\n const r = this.ss.push(data)\n if (this.finished) { return r }\n}\n\nHeaderParser.prototype.reset = function () {\n this.finished = false\n this.buffer = ''\n this.header = {}\n this.ss.reset()\n}\n\nHeaderParser.prototype._finish = function () {\n if (this.buffer) { this._parseHeader() }\n this.ss.matches = this.ss.maxMatches\n const header = this.header\n this.header = {}\n this.buffer = ''\n this.finished = true\n this.nread = this.npairs = 0\n this.maxed = false\n this.emit('header', header)\n}\n\nHeaderParser.prototype._parseHeader = function () {\n if (this.npairs === this.maxHeaderPairs) { return }\n\n const lines = this.buffer.split(RE_CRLF)\n const len = lines.length\n let m, h\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (lines[i].length === 0) { continue }\n if (lines[i][0] === '\\t' || lines[i][0] === ' ') {\n // folded header content\n // RFC2822 says to just remove the CRLF and not the whitespace following\n // it, so we follow the RFC and include the leading whitespace ...\n if (h) {\n this.header[h][this.header[h].length - 1] += lines[i]\n continue\n }\n }\n\n const posColon = lines[i].indexOf(':')\n if (\n posColon === -1 ||\n posColon === 0\n ) {\n return\n }\n m = RE_HDR.exec(lines[i])\n h = m[1].toLowerCase()\n this.header[h] = this.header[h] || []\n this.header[h].push((m[2] || ''))\n if (++this.npairs === this.maxHeaderPairs) { break }\n }\n}\n\nmodule.exports = HeaderParser\n","'use strict'\n\nconst inherits = require('node:util').inherits\nconst ReadableStream = require('node:stream').Readable\n\nfunction PartStream (opts) {\n ReadableStream.call(this, opts)\n}\ninherits(PartStream, ReadableStream)\n\nPartStream.prototype._read = function (n) {}\n\nmodule.exports = PartStream\n","'use strict'\n\n/**\n * Copyright Brian White. All rights reserved.\n *\n * @see https://github.com/mscdex/streamsearch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation\n * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool\n */\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\n\nfunction SBMH (needle) {\n if (typeof needle === 'string') {\n needle = Buffer.from(needle)\n }\n\n if (!Buffer.isBuffer(needle)) {\n throw new TypeError('The needle has to be a String or a Buffer.')\n }\n\n const needleLength = needle.length\n\n if (needleLength === 0) {\n throw new Error('The needle cannot be an empty String/Buffer.')\n }\n\n if (needleLength > 256) {\n throw new Error('The needle cannot have a length bigger than 256.')\n }\n\n this.maxMatches = Infinity\n this.matches = 0\n\n this._occ = new Array(256)\n .fill(needleLength) // Initialize occurrence table.\n this._lookbehind_size = 0\n this._needle = needle\n this._bufpos = 0\n\n this._lookbehind = Buffer.alloc(needleLength)\n\n // Populate occurrence table with analysis of the needle,\n // ignoring last letter.\n for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var\n this._occ[needle[i]] = needleLength - 1 - i\n }\n}\ninherits(SBMH, EventEmitter)\n\nSBMH.prototype.reset = function () {\n this._lookbehind_size = 0\n this.matches = 0\n this._bufpos = 0\n}\n\nSBMH.prototype.push = function (chunk, pos) {\n if (!Buffer.isBuffer(chunk)) {\n chunk = Buffer.from(chunk, 'binary')\n }\n const chlen = chunk.length\n this._bufpos = pos || 0\n let r\n while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }\n return r\n}\n\nSBMH.prototype._sbmh_feed = function (data) {\n const len = data.length\n const needle = this._needle\n const needleLength = needle.length\n const lastNeedleChar = needle[needleLength - 1]\n\n // Positive: points to a position in `data`\n // pos == 3 points to data[3]\n // Negative: points to a position in the lookbehind buffer\n // pos == -2 points to lookbehind[lookbehind_size - 2]\n let pos = -this._lookbehind_size\n let ch\n\n if (pos < 0) {\n // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool\n // search with character lookup code that considers both the\n // lookbehind buffer and the current round's haystack data.\n //\n // Loop until\n // there is a match.\n // or until\n // we've moved past the position that requires the\n // lookbehind buffer. In this case we switch to the\n // optimized loop.\n // or until\n // the character to look at lies outside the haystack.\n while (pos < 0 && pos <= len - needleLength) {\n ch = this._sbmh_lookup_char(data, pos + needleLength - 1)\n\n if (\n ch === lastNeedleChar &&\n this._sbmh_memcmp(data, pos, needleLength - 1)\n ) {\n this._lookbehind_size = 0\n ++this.matches\n this.emit('info', true)\n\n return (this._bufpos = pos + needleLength)\n }\n pos += this._occ[ch]\n }\n\n // No match.\n\n if (pos < 0) {\n // There's too few data for Boyer-Moore-Horspool to run,\n // so let's use a different algorithm to skip as much as\n // we can.\n // Forward pos until\n // the trailing part of lookbehind + data\n // looks like the beginning of the needle\n // or until\n // pos == 0\n while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos }\n }\n\n if (pos >= 0) {\n // Discard lookbehind buffer.\n this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)\n this._lookbehind_size = 0\n } else {\n // Cut off part of the lookbehind buffer that has\n // been processed and append the entire haystack\n // into it.\n const bytesToCutOff = this._lookbehind_size + pos\n if (bytesToCutOff > 0) {\n // The cut off data is guaranteed not to contain the needle.\n this.emit('info', false, this._lookbehind, 0, bytesToCutOff)\n }\n\n this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff,\n this._lookbehind_size - bytesToCutOff)\n this._lookbehind_size -= bytesToCutOff\n\n data.copy(this._lookbehind, this._lookbehind_size)\n this._lookbehind_size += len\n\n this._bufpos = len\n return len\n }\n }\n\n pos += (pos >= 0) * this._bufpos\n\n // Lookbehind buffer is now empty. We only need to check if the\n // needle is in the haystack.\n if (data.indexOf(needle, pos) !== -1) {\n pos = data.indexOf(needle, pos)\n ++this.matches\n if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) }\n\n return (this._bufpos = pos + needleLength)\n } else {\n pos = len - needleLength\n }\n\n // There was no match. If there's trailing haystack data that we cannot\n // match yet using the Boyer-Moore-Horspool algorithm (because the trailing\n // data is less than the needle size) then match using a modified\n // algorithm that starts matching from the beginning instead of the end.\n // Whatever trailing data is left after running this algorithm is added to\n // the lookbehind buffer.\n while (\n pos < len &&\n (\n data[pos] !== needle[0] ||\n (\n (Buffer.compare(\n data.subarray(pos, pos + len - pos),\n needle.subarray(0, len - pos)\n ) !== 0)\n )\n )\n ) {\n ++pos\n }\n if (pos < len) {\n data.copy(this._lookbehind, 0, pos, pos + (len - pos))\n this._lookbehind_size = len - pos\n }\n\n // Everything until pos is guaranteed not to contain needle data.\n if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) }\n\n this._bufpos = len\n return len\n}\n\nSBMH.prototype._sbmh_lookup_char = function (data, pos) {\n return (pos < 0)\n ? this._lookbehind[this._lookbehind_size + pos]\n : data[pos]\n}\n\nSBMH.prototype._sbmh_memcmp = function (data, pos, len) {\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }\n }\n return true\n}\n\nmodule.exports = SBMH\n","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst { inherits } = require('node:util')\nconst Dicer = require('../deps/dicer/lib/Dicer')\n\nconst MultipartParser = require('./types/multipart')\nconst UrlencodedParser = require('./types/urlencoded')\nconst parseParams = require('./utils/parseParams')\n\nfunction Busboy (opts) {\n if (!(this instanceof Busboy)) { return new Busboy(opts) }\n\n if (typeof opts !== 'object') {\n throw new TypeError('Busboy expected an options-Object.')\n }\n if (typeof opts.headers !== 'object') {\n throw new TypeError('Busboy expected an options-Object with headers-attribute.')\n }\n if (typeof opts.headers['content-type'] !== 'string') {\n throw new TypeError('Missing Content-Type-header.')\n }\n\n const {\n headers,\n ...streamOptions\n } = opts\n\n this.opts = {\n autoDestroy: false,\n ...streamOptions\n }\n WritableStream.call(this, this.opts)\n\n this._done = false\n this._parser = this.getParserByHeaders(headers)\n this._finished = false\n}\ninherits(Busboy, WritableStream)\n\nBusboy.prototype.emit = function (ev) {\n if (ev === 'finish') {\n if (!this._done) {\n this._parser?.end()\n return\n } else if (this._finished) {\n return\n }\n this._finished = true\n }\n WritableStream.prototype.emit.apply(this, arguments)\n}\n\nBusboy.prototype.getParserByHeaders = function (headers) {\n const parsed = parseParams(headers['content-type'])\n\n const cfg = {\n defCharset: this.opts.defCharset,\n fileHwm: this.opts.fileHwm,\n headers,\n highWaterMark: this.opts.highWaterMark,\n isPartAFile: this.opts.isPartAFile,\n limits: this.opts.limits,\n parsedConType: parsed,\n preservePath: this.opts.preservePath\n }\n\n if (MultipartParser.detect.test(parsed[0])) {\n return new MultipartParser(this, cfg)\n }\n if (UrlencodedParser.detect.test(parsed[0])) {\n return new UrlencodedParser(this, cfg)\n }\n throw new Error('Unsupported Content-Type.')\n}\n\nBusboy.prototype._write = function (chunk, encoding, cb) {\n this._parser.write(chunk, cb)\n}\n\nmodule.exports = Busboy\nmodule.exports.default = Busboy\nmodule.exports.Busboy = Busboy\n\nmodule.exports.Dicer = Dicer\n","'use strict'\n\n// TODO:\n// * support 1 nested multipart level\n// (see second multipart example here:\n// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)\n// * support limits.fieldNameSize\n// -- this will require modifications to utils.parseParams\n\nconst { Readable } = require('node:stream')\nconst { inherits } = require('node:util')\n\nconst Dicer = require('../../deps/dicer/lib/Dicer')\n\nconst parseParams = require('../utils/parseParams')\nconst decodeText = require('../utils/decodeText')\nconst basename = require('../utils/basename')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_BOUNDARY = /^boundary$/i\nconst RE_FIELD = /^form-data$/i\nconst RE_CHARSET = /^charset$/i\nconst RE_FILENAME = /^filename$/i\nconst RE_NAME = /^name$/i\n\nMultipart.detect = /^multipart\\/form-data/i\nfunction Multipart (boy, cfg) {\n let i\n let len\n const self = this\n let boundary\n const limits = cfg.limits\n const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))\n const parsedConType = cfg.parsedConType || []\n const defCharset = cfg.defCharset || 'utf8'\n const preservePath = cfg.preservePath\n const fileOpts = { highWaterMark: cfg.fileHwm }\n\n for (i = 0, len = parsedConType.length; i < len; ++i) {\n if (Array.isArray(parsedConType[i]) &&\n RE_BOUNDARY.test(parsedConType[i][0])) {\n boundary = parsedConType[i][1]\n break\n }\n }\n\n function checkFinished () {\n if (nends === 0 && finished && !boy._done) {\n finished = false\n self.end()\n }\n }\n\n if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }\n\n const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)\n const filesLimit = getLimit(limits, 'files', Infinity)\n const fieldsLimit = getLimit(limits, 'fields', Infinity)\n const partsLimit = getLimit(limits, 'parts', Infinity)\n const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)\n const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)\n\n let nfiles = 0\n let nfields = 0\n let nends = 0\n let curFile\n let curField\n let finished = false\n\n this._needDrain = false\n this._pause = false\n this._cb = undefined\n this._nparts = 0\n this._boy = boy\n\n const parserCfg = {\n boundary,\n maxHeaderPairs: headerPairsLimit,\n maxHeaderSize: headerSizeLimit,\n partHwm: fileOpts.highWaterMark,\n highWaterMark: cfg.highWaterMark\n }\n\n this.parser = new Dicer(parserCfg)\n this.parser.on('drain', function () {\n self._needDrain = false\n if (self._cb && !self._pause) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }).on('part', function onPart (part) {\n if (++self._nparts > partsLimit) {\n self.parser.removeListener('part', onPart)\n self.parser.on('part', skipPart)\n boy.hitPartsLimit = true\n boy.emit('partsLimit')\n return skipPart(part)\n }\n\n // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let\n // us emit 'end' early since we know the part has ended if we are already\n // seeing the next part\n if (curField) {\n const field = curField\n field.emit('end')\n field.removeAllListeners('end')\n }\n\n part.on('header', function (header) {\n let contype\n let fieldname\n let parsed\n let charset\n let encoding\n let filename\n let nsize = 0\n\n if (header['content-type']) {\n parsed = parseParams(header['content-type'][0])\n if (parsed[0]) {\n contype = parsed[0].toLowerCase()\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_CHARSET.test(parsed[i][0])) {\n charset = parsed[i][1].toLowerCase()\n break\n }\n }\n }\n }\n\n if (contype === undefined) { contype = 'text/plain' }\n if (charset === undefined) { charset = defCharset }\n\n if (header['content-disposition']) {\n parsed = parseParams(header['content-disposition'][0])\n if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_NAME.test(parsed[i][0])) {\n fieldname = parsed[i][1]\n } else if (RE_FILENAME.test(parsed[i][0])) {\n filename = parsed[i][1]\n if (!preservePath) { filename = basename(filename) }\n }\n }\n } else { return skipPart(part) }\n\n if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }\n\n let onData,\n onEnd\n\n if (isPartAFile(fieldname, contype, filename)) {\n // file/binary field\n if (nfiles === filesLimit) {\n if (!boy.hitFilesLimit) {\n boy.hitFilesLimit = true\n boy.emit('filesLimit')\n }\n return skipPart(part)\n }\n\n ++nfiles\n\n if (!boy._events.file) {\n self.parser._ignore()\n return\n }\n\n ++nends\n const file = new FileStream(fileOpts)\n curFile = file\n file.on('end', function () {\n --nends\n self._pause = false\n checkFinished()\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n })\n file._read = function (n) {\n if (!self._pause) { return }\n self._pause = false\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }\n boy.emit('file', fieldname, file, filename, encoding, contype)\n\n onData = function (data) {\n if ((nsize += data.length) > fileSizeLimit) {\n const extralen = fileSizeLimit - nsize + data.length\n if (extralen > 0) { file.push(data.slice(0, extralen)) }\n file.truncated = true\n file.bytesRead = fileSizeLimit\n part.removeAllListeners('data')\n file.emit('limit')\n return\n } else if (!file.push(data)) { self._pause = true }\n\n file.bytesRead = nsize\n }\n\n onEnd = function () {\n curFile = undefined\n file.push(null)\n }\n } else {\n // non-file field\n if (nfields === fieldsLimit) {\n if (!boy.hitFieldsLimit) {\n boy.hitFieldsLimit = true\n boy.emit('fieldsLimit')\n }\n return skipPart(part)\n }\n\n ++nfields\n ++nends\n let buffer = ''\n let truncated = false\n curField = part\n\n onData = function (data) {\n if ((nsize += data.length) > fieldSizeLimit) {\n const extralen = (fieldSizeLimit - (nsize - data.length))\n buffer += data.toString('binary', 0, extralen)\n truncated = true\n part.removeAllListeners('data')\n } else { buffer += data.toString('binary') }\n }\n\n onEnd = function () {\n curField = undefined\n if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }\n boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)\n --nends\n checkFinished()\n }\n }\n\n /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become\n broken. Streams2/streams3 is a huge black box of confusion, but\n somehow overriding the sync state seems to fix things again (and still\n seems to work for previous node versions).\n */\n part._readableState.sync = false\n\n part.on('data', onData)\n part.on('end', onEnd)\n }).on('error', function (err) {\n if (curFile) { curFile.emit('error', err) }\n })\n }).on('error', function (err) {\n boy.emit('error', err)\n }).on('finish', function () {\n finished = true\n checkFinished()\n })\n}\n\nMultipart.prototype.write = function (chunk, cb) {\n const r = this.parser.write(chunk)\n if (r && !this._pause) {\n cb()\n } else {\n this._needDrain = !r\n this._cb = cb\n }\n}\n\nMultipart.prototype.end = function () {\n const self = this\n\n if (self.parser.writable) {\n self.parser.end()\n } else if (!self._boy._done) {\n process.nextTick(function () {\n self._boy._done = true\n self._boy.emit('finish')\n })\n }\n}\n\nfunction skipPart (part) {\n part.resume()\n}\n\nfunction FileStream (opts) {\n Readable.call(this, opts)\n\n this.bytesRead = 0\n\n this.truncated = false\n}\n\ninherits(FileStream, Readable)\n\nFileStream.prototype._read = function (n) {}\n\nmodule.exports = Multipart\n","'use strict'\n\nconst Decoder = require('../utils/Decoder')\nconst decodeText = require('../utils/decodeText')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_CHARSET = /^charset$/i\n\nUrlEncoded.detect = /^application\\/x-www-form-urlencoded/i\nfunction UrlEncoded (boy, cfg) {\n const limits = cfg.limits\n const parsedConType = cfg.parsedConType\n this.boy = boy\n\n this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)\n this.fieldsLimit = getLimit(limits, 'fields', Infinity)\n\n let charset\n for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var\n if (Array.isArray(parsedConType[i]) &&\n RE_CHARSET.test(parsedConType[i][0])) {\n charset = parsedConType[i][1].toLowerCase()\n break\n }\n }\n\n if (charset === undefined) { charset = cfg.defCharset || 'utf8' }\n\n this.decoder = new Decoder()\n this.charset = charset\n this._fields = 0\n this._state = 'key'\n this._checkingBytes = true\n this._bytesKey = 0\n this._bytesVal = 0\n this._key = ''\n this._val = ''\n this._keyTrunc = false\n this._valTrunc = false\n this._hitLimit = false\n}\n\nUrlEncoded.prototype.write = function (data, cb) {\n if (this._fields === this.fieldsLimit) {\n if (!this.boy.hitFieldsLimit) {\n this.boy.hitFieldsLimit = true\n this.boy.emit('fieldsLimit')\n }\n return cb()\n }\n\n let idxeq; let idxamp; let i; let p = 0; const len = data.length\n\n while (p < len) {\n if (this._state === 'key') {\n idxeq = idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x3D/* = */) {\n idxeq = i\n break\n } else if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesKey }\n }\n\n if (idxeq !== undefined) {\n // key with assignment\n if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }\n this._state = 'val'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._val = ''\n this._bytesVal = 0\n this._valTrunc = false\n this.decoder.reset()\n\n p = idxeq + 1\n } else if (idxamp !== undefined) {\n // key with no assignment\n ++this._fields\n let key; const keyTrunc = this._keyTrunc\n if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n if (key.length) {\n this.boy.emit('field', decodeText(key, 'binary', this.charset),\n '',\n keyTrunc,\n false)\n }\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._keyTrunc = true\n }\n } else {\n if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n } else {\n idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesVal }\n }\n\n if (idxamp !== undefined) {\n ++this._fields\n if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n this._state = 'key'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._val === '' && this.fieldSizeLimit === 0) ||\n (this._bytesVal = this._val.length) === this.fieldSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._valTrunc = true\n }\n } else {\n if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n }\n }\n cb()\n}\n\nUrlEncoded.prototype.end = function () {\n if (this.boy._done) { return }\n\n if (this._state === 'key' && this._key.length > 0) {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n '',\n this._keyTrunc,\n false)\n } else if (this._state === 'val') {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n }\n this.boy._done = true\n this.boy.emit('finish')\n}\n\nmodule.exports = UrlEncoded\n","'use strict'\n\nconst RE_PLUS = /\\+/g\n\nconst HEX = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]\n\nfunction Decoder () {\n this.buffer = undefined\n}\nDecoder.prototype.write = function (str) {\n // Replace '+' with ' ' before decoding\n str = str.replace(RE_PLUS, ' ')\n let res = ''\n let i = 0; let p = 0; const len = str.length\n for (; i < len; ++i) {\n if (this.buffer !== undefined) {\n if (!HEX[str.charCodeAt(i)]) {\n res += '%' + this.buffer\n this.buffer = undefined\n --i // retry character\n } else {\n this.buffer += str[i]\n ++p\n if (this.buffer.length === 2) {\n res += String.fromCharCode(parseInt(this.buffer, 16))\n this.buffer = undefined\n }\n }\n } else if (str[i] === '%') {\n if (i > p) {\n res += str.substring(p, i)\n p = i\n }\n this.buffer = ''\n ++p\n }\n }\n if (p < len && this.buffer === undefined) { res += str.substring(p) }\n return res\n}\nDecoder.prototype.reset = function () {\n this.buffer = undefined\n}\n\nmodule.exports = Decoder\n","'use strict'\n\nmodule.exports = function basename (path) {\n if (typeof path !== 'string') { return '' }\n for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var\n switch (path.charCodeAt(i)) {\n case 0x2F: // '/'\n case 0x5C: // '\\'\n path = path.slice(i + 1)\n return (path === '..' || path === '.' ? '' : path)\n }\n }\n return (path === '..' || path === '.' ? '' : path)\n}\n","'use strict'\n\n// Node has always utf-8\nconst utf8Decoder = new TextDecoder('utf-8')\nconst textDecoders = new Map([\n ['utf-8', utf8Decoder],\n ['utf8', utf8Decoder]\n])\n\nfunction decodeText (text, textEncoding, destEncoding) {\n if (text) {\n if (textDecoders.has(destEncoding)) {\n try {\n return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding))\n } catch (e) { }\n } else {\n try {\n textDecoders.set(destEncoding, new TextDecoder(destEncoding))\n return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding))\n } catch (e) { }\n }\n }\n return text\n}\n\nmodule.exports = decodeText\n","'use strict'\n\nmodule.exports = function getLimit (limits, name, defaultLimit) {\n if (\n !limits ||\n limits[name] === undefined ||\n limits[name] === null\n ) { return defaultLimit }\n\n if (\n typeof limits[name] !== 'number' ||\n isNaN(limits[name])\n ) { throw new TypeError('Limit ' + name + ' is not a valid number') }\n\n return limits[name]\n}\n","'use strict'\n\nconst decodeText = require('./decodeText')\n\nconst RE_ENCODED = /%([a-fA-F0-9]{2})/g\n\nfunction encodedReplacer (match, byte) {\n return String.fromCharCode(parseInt(byte, 16))\n}\n\nfunction parseParams (str) {\n const res = []\n let state = 'key'\n let charset = ''\n let inquote = false\n let escaping = false\n let p = 0\n let tmp = ''\n\n for (var i = 0, len = str.length; i < len; ++i) { // eslint-disable-line no-var\n const char = str[i]\n if (char === '\\\\' && inquote) {\n if (escaping) { escaping = false } else {\n escaping = true\n continue\n }\n } else if (char === '\"') {\n if (!escaping) {\n if (inquote) {\n inquote = false\n state = 'key'\n } else { inquote = true }\n continue\n } else { escaping = false }\n } else {\n if (escaping && inquote) { tmp += '\\\\' }\n escaping = false\n if ((state === 'charset' || state === 'lang') && char === \"'\") {\n if (state === 'charset') {\n state = 'lang'\n charset = tmp.substring(1)\n } else { state = 'value' }\n tmp = ''\n continue\n } else if (state === 'key' &&\n (char === '*' || char === '=') &&\n res.length) {\n if (char === '*') { state = 'charset' } else { state = 'value' }\n res[p] = [tmp, undefined]\n tmp = ''\n continue\n } else if (!inquote && char === ';') {\n state = 'key'\n if (charset) {\n if (tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n }\n charset = ''\n } else if (tmp.length) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }\n tmp = ''\n ++p\n continue\n } else if (!inquote && (char === ' ' || char === '\\t')) { continue }\n }\n tmp += char\n }\n if (charset && tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n } else if (tmp) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n\n if (res[p] === undefined) {\n if (tmp) { res[p] = tmp }\n } else { res[p][1] = tmp }\n\n return res\n}\n\nmodule.exports = parseParams\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.1.0\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.1\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/merge-deep.js\nvar import_is_plain_object = require(\"is-plain-object\");\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if ((0, import_is_plain_object.isPlainObject)(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.0.2\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.0\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.0\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n / .*$/,\n \" [REDACTED]\"\n )\n });\n }\n requestCopy.url = requestCopy.url.replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\").replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"\n )\n );\n return statusCode;\n }\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"\n )\n );\n return headers || {};\n }\n });\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestError\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.1.4\";\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_is_plain_object = require(\"is-plain-object\");\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if ((0, import_is_plain_object.isPlainObject)(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n signal: (_c = requestOptions.request) == null ? void 0 : _c.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextAPI = void 0;\nconst NoopContextManager_1 = require(\"../context/NoopContextManager\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'context';\nconst NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nclass ContextAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Context API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n }\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n setGlobalContextManager(contextManager) {\n return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());\n }\n /**\n * Get the currently active context\n */\n active() {\n return this._getContextManager().active();\n }\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with(context, fn, thisArg, ...args) {\n return this._getContextManager().with(context, fn, thisArg, ...args);\n }\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n bind(context, target) {\n return this._getContextManager().bind(context, target);\n }\n _getContextManager() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;\n }\n /** Disable and remove the global context manager */\n disable() {\n this._getContextManager().disable();\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.ContextAPI = ContextAPI;\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagAPI = void 0;\nconst ComponentLogger_1 = require(\"../diag/ComponentLogger\");\nconst logLevelLogger_1 = require(\"../diag/internal/logLevelLogger\");\nconst types_1 = require(\"../diag/types\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nclass DiagAPI {\n /**\n * Private internal constructor\n * @private\n */\n constructor() {\n function _logProxy(funcName) {\n return function (...args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName](...args);\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n const self = this;\n // DiagAPI specific functions\n const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {\n var _a, _b, _c;\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n const oldLogger = (0, global_utils_1.getGlobal)('diag');\n const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';\n oldLogger.warn(`Current logger will be overwritten from ${stack}`);\n newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n }\n return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = () => {\n (0, global_utils_1.unregisterGlobal)(API_NAME, self);\n };\n self.createComponentLogger = (options) => {\n return new ComponentLogger_1.DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n static instance() {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n }\n}\nexports.DiagAPI = DiagAPI;\n//# sourceMappingURL=diag.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricsAPI = void 0;\nconst NoopMeterProvider_1 = require(\"../metrics/NoopMeterProvider\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'metrics';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nclass MetricsAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Metrics API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n setGlobalMeterProvider(provider) {\n return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());\n }\n /**\n * Returns the global meter provider.\n */\n getMeterProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;\n }\n /**\n * Returns a meter from the global meter provider.\n */\n getMeter(name, version, options) {\n return this.getMeterProvider().getMeter(name, version, options);\n }\n /** Remove the global meter provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.MetricsAPI = MetricsAPI;\n//# sourceMappingURL=metrics.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PropagationAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst NoopTextMapPropagator_1 = require(\"../propagation/NoopTextMapPropagator\");\nconst TextMapPropagator_1 = require(\"../propagation/TextMapPropagator\");\nconst context_helpers_1 = require(\"../baggage/context-helpers\");\nconst utils_1 = require(\"../baggage/utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'propagation';\nconst NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nclass PropagationAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this.createBaggage = utils_1.createBaggage;\n this.getBaggage = context_helpers_1.getBaggage;\n this.getActiveBaggage = context_helpers_1.getActiveBaggage;\n this.setBaggage = context_helpers_1.setBaggage;\n this.deleteBaggage = context_helpers_1.deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n }\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n setGlobalPropagator(propagator) {\n return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());\n }\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {\n return this._getGlobalPropagator().inject(context, carrier, setter);\n }\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {\n return this._getGlobalPropagator().extract(context, carrier, getter);\n }\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n fields() {\n return this._getGlobalPropagator().fields();\n }\n /** Remove the global propagator */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n _getGlobalPropagator() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n }\n}\nexports.PropagationAPI = PropagationAPI;\n//# sourceMappingURL=propagation.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst ProxyTracerProvider_1 = require(\"../trace/ProxyTracerProvider\");\nconst spancontext_utils_1 = require(\"../trace/spancontext-utils\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nclass TraceAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;\n this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;\n this.deleteSpan = context_utils_1.deleteSpan;\n this.getSpan = context_utils_1.getSpan;\n this.getActiveSpan = context_utils_1.getActiveSpan;\n this.getSpanContext = context_utils_1.getSpanContext;\n this.setSpan = context_utils_1.setSpan;\n this.setSpanContext = context_utils_1.setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n setGlobalTracerProvider(provider) {\n const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n }\n /**\n * Returns the global tracer provider.\n */\n getTracerProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;\n }\n /**\n * Returns a tracer from the global tracer provider.\n */\n getTracer(name, version) {\n return this.getTracerProvider().getTracer(name, version);\n }\n /** Remove the global tracer provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n }\n}\nexports.TraceAPI = TraceAPI;\n//# sourceMappingURL=trace.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_2 = require(\"../context/context\");\n/**\n * Baggage key\n */\nconst BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\nexports.getBaggage = getBaggage;\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getActiveBaggage() {\n return getBaggage(context_1.ContextAPI.getInstance().active());\n}\nexports.getActiveBaggage = getActiveBaggage;\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nfunction setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\nexports.setBaggage = setBaggage;\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nfunction deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\nexports.deleteBaggage = deleteBaggage;\n//# sourceMappingURL=context-helpers.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaggageImpl = void 0;\nclass BaggageImpl {\n constructor(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n getEntry(key) {\n const entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n }\n getAllEntries() {\n return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);\n }\n setEntry(key, entry) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n }\n removeEntry(key) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n }\n removeEntries(...keys) {\n const newBaggage = new BaggageImpl(this._entries);\n for (const key of keys) {\n newBaggage._entries.delete(key);\n }\n return newBaggage;\n }\n clear() {\n return new BaggageImpl();\n }\n}\nexports.BaggageImpl = BaggageImpl;\n//# sourceMappingURL=baggage-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataSymbol = void 0;\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataFromString = exports.createBaggage = void 0;\nconst diag_1 = require(\"../api/diag\");\nconst baggage_impl_1 = require(\"./internal/baggage-impl\");\nconst symbol_1 = require(\"./internal/symbol\");\nconst diag = diag_1.DiagAPI.instance();\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nfunction createBaggage(entries = {}) {\n return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));\n}\nexports.createBaggage = createBaggage;\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nfunction baggageEntryMetadataFromString(str) {\n if (typeof str !== 'string') {\n diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);\n str = '';\n }\n return {\n __TYPE__: symbol_1.baggageEntryMetadataSymbol,\n toString() {\n return str;\n },\n };\n}\nexports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.context = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_1 = require(\"./api/context\");\n/** Entrypoint for context API */\nexports.context = context_1.ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopContextManager = void 0;\nconst context_1 = require(\"./context\");\nclass NoopContextManager {\n active() {\n return context_1.ROOT_CONTEXT;\n }\n with(_context, fn, thisArg, ...args) {\n return fn.call(thisArg, ...args);\n }\n bind(_context, target) {\n return target;\n }\n enable() {\n return this;\n }\n disable() {\n return this;\n }\n}\nexports.NoopContextManager = NoopContextManager;\n//# sourceMappingURL=NoopContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ROOT_CONTEXT = exports.createContextKey = void 0;\n/** Get a key to uniquely identify a context value */\nfunction createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nexports.createContextKey = createContextKey;\nclass BaseContext {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n constructor(parentContext) {\n // for minification\n const self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = (key) => self._currentContext.get(key);\n self.setValue = (key, value) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = (key) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n}\n/** The root context is used as the default parent context when there is no active context */\nexports.ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.diag = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst diag_1 = require(\"./api/diag\");\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexports.diag = diag_1.DiagAPI.instance();\n//# sourceMappingURL=diag-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagComponentLogger = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nclass DiagComponentLogger {\n constructor(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n debug(...args) {\n return logProxy('debug', this._namespace, args);\n }\n error(...args) {\n return logProxy('error', this._namespace, args);\n }\n info(...args) {\n return logProxy('info', this._namespace, args);\n }\n warn(...args) {\n return logProxy('warn', this._namespace, args);\n }\n verbose(...args) {\n return logProxy('verbose', this._namespace, args);\n }\n}\nexports.DiagComponentLogger = DiagComponentLogger;\nfunction logProxy(funcName, namespace, args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName](...args);\n}\n//# sourceMappingURL=ComponentLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagConsoleLogger = void 0;\nconst consoleMap = [\n { n: 'error', c: 'error' },\n { n: 'warn', c: 'warn' },\n { n: 'info', c: 'info' },\n { n: 'debug', c: 'debug' },\n { n: 'verbose', c: 'trace' },\n];\n/**\n * A simple Immutable Console based diagnostic logger which will output any messages to the Console.\n * If you want to limit the amount of logging to a specific level or lower use the\n * {@link createLogLevelDiagLogger}\n */\nclass DiagConsoleLogger {\n constructor() {\n function _consoleFunc(funcName) {\n return function (...args) {\n if (console) {\n // Some environments only expose the console when the F12 developer console is open\n // eslint-disable-next-line no-console\n let theFunc = console[funcName];\n if (typeof theFunc !== 'function') {\n // Not all environments support all functions\n // eslint-disable-next-line no-console\n theFunc = console.log;\n }\n // One last final check\n if (typeof theFunc === 'function') {\n return theFunc.apply(console, args);\n }\n }\n };\n }\n for (let i = 0; i < consoleMap.length; i++) {\n this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);\n }\n }\n}\nexports.DiagConsoleLogger = DiagConsoleLogger;\n//# sourceMappingURL=consoleLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLogLevelDiagLogger = void 0;\nconst types_1 = require(\"../types\");\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < types_1.DiagLogLevel.NONE) {\n maxLevel = types_1.DiagLogLevel.NONE;\n }\n else if (maxLevel > types_1.DiagLogLevel.ALL) {\n maxLevel = types_1.DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n const theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', types_1.DiagLogLevel.ERROR),\n warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),\n info: _filterFunc('info', types_1.DiagLogLevel.INFO),\n debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),\n };\n}\nexports.createLogLevelDiagLogger = createLogLevelDiagLogger;\n//# sourceMappingURL=logLevelLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagLogLevel = void 0;\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nvar DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;\nvar utils_1 = require(\"./baggage/utils\");\nObject.defineProperty(exports, \"baggageEntryMetadataFromString\", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });\n// Context APIs\nvar context_1 = require(\"./context/context\");\nObject.defineProperty(exports, \"createContextKey\", { enumerable: true, get: function () { return context_1.createContextKey; } });\nObject.defineProperty(exports, \"ROOT_CONTEXT\", { enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } });\n// Diag APIs\nvar consoleLogger_1 = require(\"./diag/consoleLogger\");\nObject.defineProperty(exports, \"DiagConsoleLogger\", { enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } });\nvar types_1 = require(\"./diag/types\");\nObject.defineProperty(exports, \"DiagLogLevel\", { enumerable: true, get: function () { return types_1.DiagLogLevel; } });\n// Metrics APIs\nvar NoopMeter_1 = require(\"./metrics/NoopMeter\");\nObject.defineProperty(exports, \"createNoopMeter\", { enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } });\nvar Metric_1 = require(\"./metrics/Metric\");\nObject.defineProperty(exports, \"ValueType\", { enumerable: true, get: function () { return Metric_1.ValueType; } });\n// Propagation APIs\nvar TextMapPropagator_1 = require(\"./propagation/TextMapPropagator\");\nObject.defineProperty(exports, \"defaultTextMapGetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } });\nObject.defineProperty(exports, \"defaultTextMapSetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } });\nvar ProxyTracer_1 = require(\"./trace/ProxyTracer\");\nObject.defineProperty(exports, \"ProxyTracer\", { enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } });\nvar ProxyTracerProvider_1 = require(\"./trace/ProxyTracerProvider\");\nObject.defineProperty(exports, \"ProxyTracerProvider\", { enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } });\nvar SamplingResult_1 = require(\"./trace/SamplingResult\");\nObject.defineProperty(exports, \"SamplingDecision\", { enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } });\nvar span_kind_1 = require(\"./trace/span_kind\");\nObject.defineProperty(exports, \"SpanKind\", { enumerable: true, get: function () { return span_kind_1.SpanKind; } });\nvar status_1 = require(\"./trace/status\");\nObject.defineProperty(exports, \"SpanStatusCode\", { enumerable: true, get: function () { return status_1.SpanStatusCode; } });\nvar trace_flags_1 = require(\"./trace/trace_flags\");\nObject.defineProperty(exports, \"TraceFlags\", { enumerable: true, get: function () { return trace_flags_1.TraceFlags; } });\nvar utils_2 = require(\"./trace/internal/utils\");\nObject.defineProperty(exports, \"createTraceState\", { enumerable: true, get: function () { return utils_2.createTraceState; } });\nvar spancontext_utils_1 = require(\"./trace/spancontext-utils\");\nObject.defineProperty(exports, \"isSpanContextValid\", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });\nObject.defineProperty(exports, \"isValidTraceId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });\nObject.defineProperty(exports, \"isValidSpanId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } });\nvar invalid_span_constants_1 = require(\"./trace/invalid-span-constants\");\nObject.defineProperty(exports, \"INVALID_SPANID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } });\nObject.defineProperty(exports, \"INVALID_TRACEID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } });\nObject.defineProperty(exports, \"INVALID_SPAN_CONTEXT\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } });\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_api_1 = require(\"./context-api\");\nObject.defineProperty(exports, \"context\", { enumerable: true, get: function () { return context_api_1.context; } });\nconst diag_api_1 = require(\"./diag-api\");\nObject.defineProperty(exports, \"diag\", { enumerable: true, get: function () { return diag_api_1.diag; } });\nconst metrics_api_1 = require(\"./metrics-api\");\nObject.defineProperty(exports, \"metrics\", { enumerable: true, get: function () { return metrics_api_1.metrics; } });\nconst propagation_api_1 = require(\"./propagation-api\");\nObject.defineProperty(exports, \"propagation\", { enumerable: true, get: function () { return propagation_api_1.propagation; } });\nconst trace_api_1 = require(\"./trace-api\");\nObject.defineProperty(exports, \"trace\", { enumerable: true, get: function () { return trace_api_1.trace; } });\n// Default export.\nexports.default = {\n context: context_api_1.context,\n diag: diag_api_1.diag,\n metrics: metrics_api_1.metrics,\n propagation: propagation_api_1.propagation,\n trace: trace_api_1.trace,\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;\nconst platform_1 = require(\"../platform\");\nconst version_1 = require(\"../version\");\nconst semver_1 = require(\"./semver\");\nconst major = version_1.VERSION.split('.')[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = platform_1._globalThis;\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n var _a;\n const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: version_1.VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== version_1.VERSION) {\n // All registered APIs must be of the same version exactly\n const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);\n return true;\n}\nexports.registerGlobal = registerGlobal;\nfunction getGlobal(type) {\n var _a, _b;\n const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexports.getGlobal = getGlobal;\nfunction unregisterGlobal(type, diag) {\n diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);\n const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\nexports.unregisterGlobal = unregisterGlobal;\n//# sourceMappingURL=global-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCompatible = exports._makeCompatibilityCheck = void 0;\nconst version_1 = require(\"../version\");\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nfunction _makeCompatibilityCheck(ownVersion) {\n const acceptedVersions = new Set([ownVersion]);\n const rejectedVersions = new Set();\n const myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return () => false;\n }\n const ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n const globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n const globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\nexports._makeCompatibilityCheck = _makeCompatibilityCheck;\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);\n//# sourceMappingURL=semver.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.metrics = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst metrics_1 = require(\"./api/metrics\");\n/** Entrypoint for metrics API */\nexports.metrics = metrics_1.MetricsAPI.getInstance();\n//# sourceMappingURL=metrics-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueType = void 0;\n/** The Type of value. It describes how the data is reported. */\nvar ValueType;\n(function (ValueType) {\n ValueType[ValueType[\"INT\"] = 0] = \"INT\";\n ValueType[ValueType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n})(ValueType = exports.ValueType || (exports.ValueType = {}));\n//# sourceMappingURL=Metric.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;\n/**\n * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses\n * constant NoopMetrics for all of its methods.\n */\nclass NoopMeter {\n constructor() { }\n /**\n * @see {@link Meter.createHistogram}\n */\n createHistogram(_name, _options) {\n return exports.NOOP_HISTOGRAM_METRIC;\n }\n /**\n * @see {@link Meter.createCounter}\n */\n createCounter(_name, _options) {\n return exports.NOOP_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createUpDownCounter}\n */\n createUpDownCounter(_name, _options) {\n return exports.NOOP_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableGauge}\n */\n createObservableGauge(_name, _options) {\n return exports.NOOP_OBSERVABLE_GAUGE_METRIC;\n }\n /**\n * @see {@link Meter.createObservableCounter}\n */\n createObservableCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableUpDownCounter}\n */\n createObservableUpDownCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n addBatchObservableCallback(_callback, _observables) { }\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n removeBatchObservableCallback(_callback) { }\n}\nexports.NoopMeter = NoopMeter;\nclass NoopMetric {\n}\nexports.NoopMetric = NoopMetric;\nclass NoopCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopCounterMetric = NoopCounterMetric;\nclass NoopUpDownCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;\nclass NoopHistogramMetric extends NoopMetric {\n record(_value, _attributes) { }\n}\nexports.NoopHistogramMetric = NoopHistogramMetric;\nclass NoopObservableMetric {\n addCallback(_callback) { }\n removeCallback(_callback) { }\n}\nexports.NoopObservableMetric = NoopObservableMetric;\nclass NoopObservableCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableCounterMetric = NoopObservableCounterMetric;\nclass NoopObservableGaugeMetric extends NoopObservableMetric {\n}\nexports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;\nclass NoopObservableUpDownCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;\nexports.NOOP_METER = new NoopMeter();\n// Synchronous instruments\nexports.NOOP_COUNTER_METRIC = new NoopCounterMetric();\nexports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();\nexports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();\n// Asynchronous instruments\nexports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();\nexports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();\nexports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();\n/**\n * Create a no-op Meter\n */\nfunction createNoopMeter() {\n return exports.NOOP_METER;\n}\nexports.createNoopMeter = createNoopMeter;\n//# sourceMappingURL=NoopMeter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;\nconst NoopMeter_1 = require(\"./NoopMeter\");\n/**\n * An implementation of the {@link MeterProvider} which returns an impotent Meter\n * for all calls to `getMeter`\n */\nclass NoopMeterProvider {\n getMeter(_name, _version, _options) {\n return NoopMeter_1.NOOP_METER;\n }\n}\nexports.NoopMeterProvider = NoopMeterProvider;\nexports.NOOP_METER_PROVIDER = new NoopMeterProvider();\n//# sourceMappingURL=NoopMeterProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./globalThis\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.propagation = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst propagation_1 = require(\"./api/propagation\");\n/** Entrypoint for propagation API */\nexports.propagation = propagation_1.PropagationAPI.getInstance();\n//# sourceMappingURL=propagation-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTextMapPropagator = void 0;\n/**\n * No-op implementations of {@link TextMapPropagator}.\n */\nclass NoopTextMapPropagator {\n /** Noop inject function does nothing */\n inject(_context, _carrier) { }\n /** Noop extract function does nothing and returns the input context */\n extract(context, _carrier) {\n return context;\n }\n fields() {\n return [];\n }\n}\nexports.NoopTextMapPropagator = NoopTextMapPropagator;\n//# sourceMappingURL=NoopTextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;\nexports.defaultTextMapGetter = {\n get(carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys(carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexports.defaultTextMapSetter = {\n set(carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst trace_1 = require(\"./api/trace\");\n/** Entrypoint for trace API */\nexports.trace = trace_1.TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NonRecordingSpan = void 0;\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nclass NonRecordingSpan {\n constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n spanContext() {\n return this._spanContext;\n }\n // By default does nothing\n setAttribute(_key, _value) {\n return this;\n }\n // By default does nothing\n setAttributes(_attributes) {\n return this;\n }\n // By default does nothing\n addEvent(_name, _attributes) {\n return this;\n }\n // By default does nothing\n setStatus(_status) {\n return this;\n }\n // By default does nothing\n updateName(_name) {\n return this;\n }\n // By default does nothing\n end(_endTime) { }\n // isRecording always returns false for NonRecordingSpan.\n isRecording() {\n return false;\n }\n // By default does nothing\n recordException(_exception, _time) { }\n}\nexports.NonRecordingSpan = NonRecordingSpan;\n//# sourceMappingURL=NonRecordingSpan.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracer = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst spancontext_utils_1 = require(\"./spancontext-utils\");\nconst contextApi = context_1.ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nclass NoopTracer {\n // startSpan starts a noop span.\n startSpan(name, options, context = contextApi.active()) {\n const root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);\n if (isSpanContext(parentFromContext) &&\n (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {\n return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n }\n}\nexports.NoopTracer = NoopTracer;\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracerProvider = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nclass NoopTracerProvider {\n getTracer(_name, _version, _options) {\n return new NoopTracer_1.NoopTracer();\n }\n}\nexports.NoopTracerProvider = NoopTracerProvider;\n//# sourceMappingURL=NoopTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracer = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\nconst NOOP_TRACER = new NoopTracer_1.NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nclass ProxyTracer {\n constructor(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n startSpan(name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n }\n startActiveSpan(_name, _options, _context, _fn) {\n const tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n }\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n _getTracer() {\n if (this._delegate) {\n return this._delegate;\n }\n const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n }\n}\nexports.ProxyTracer = ProxyTracer;\n//# sourceMappingURL=ProxyTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracerProvider = void 0;\nconst ProxyTracer_1 = require(\"./ProxyTracer\");\nconst NoopTracerProvider_1 = require(\"./NoopTracerProvider\");\nconst NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nclass ProxyTracerProvider {\n /**\n * Get a {@link ProxyTracer}\n */\n getTracer(name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));\n }\n getDelegate() {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n }\n /**\n * Set the delegate tracer provider\n */\n setDelegate(delegate) {\n this._delegate = delegate;\n }\n getDelegateTracer(name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n }\n}\nexports.ProxyTracerProvider = ProxyTracerProvider;\n//# sourceMappingURL=ProxyTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SamplingDecision = void 0;\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nvar SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;\nconst context_1 = require(\"../context/context\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst context_2 = require(\"../api/context\");\n/**\n * span key\n */\nconst SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nfunction getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\nexports.getSpan = getSpan;\n/**\n * Gets the span from the current context, if one exists.\n */\nfunction getActiveSpan() {\n return getSpan(context_2.ContextAPI.getInstance().active());\n}\nexports.getActiveSpan = getActiveSpan;\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nfunction setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\nexports.setSpan = setSpan;\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nfunction deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\nexports.deleteSpan = deleteSpan;\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));\n}\nexports.setSpanContext = setSpanContext;\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nfunction getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\nexports.getSpanContext = getSpanContext;\n//# sourceMappingURL=context-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceStateImpl = void 0;\nconst tracestate_validators_1 = require(\"./tracestate-validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceStateImpl {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceStateImpl();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceStateImpl = TraceStateImpl;\n//# sourceMappingURL=tracestate-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=tracestate-validators.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTraceState = void 0;\nconst tracestate_impl_1 = require(\"./tracestate-impl\");\nfunction createTraceState(rawTraceState) {\n return new tracestate_impl_1.TraceStateImpl(rawTraceState);\n}\nexports.createTraceState = createTraceState;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;\nconst trace_flags_1 = require(\"./trace_flags\");\nexports.INVALID_SPANID = '0000000000000000';\nexports.INVALID_TRACEID = '00000000000000000000000000000000';\nexports.INVALID_SPAN_CONTEXT = {\n traceId: exports.INVALID_TRACEID,\n spanId: exports.INVALID_SPANID,\n traceFlags: trace_flags_1.TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanKind = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nfunction isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;\n}\nexports.isValidTraceId = isValidTraceId;\nfunction isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;\n}\nexports.isValidSpanId = isValidSpanId;\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nfunction isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\nexports.isSpanContextValid = isSpanContextValid;\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nfunction wrapSpanContext(spanContext) {\n return new NonRecordingSpan_1.NonRecordingSpan(spanContext);\n}\nexports.wrapSpanContext = wrapSpanContext;\n//# sourceMappingURL=spancontext-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanStatusCode = void 0;\n/**\n * An enumeration of status codes.\n */\nvar SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceFlags = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.4.1';\n//# sourceMappingURL=version.js.map","module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n","var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n","var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","var util = require('util');\nvar Stream = require('stream').Stream;\nvar DelayedStream = require('delayed-stream');\n\nmodule.exports = CombinedStream;\nfunction CombinedStream() {\n this.writable = false;\n this.readable = true;\n this.dataSize = 0;\n this.maxDataSize = 2 * 1024 * 1024;\n this.pauseStreams = true;\n\n this._released = false;\n this._streams = [];\n this._currentStream = null;\n this._insideLoop = false;\n this._pendingNext = false;\n}\nutil.inherits(CombinedStream, Stream);\n\nCombinedStream.create = function(options) {\n var combinedStream = new this();\n\n options = options || {};\n for (var option in options) {\n combinedStream[option] = options[option];\n }\n\n return combinedStream;\n};\n\nCombinedStream.isStreamLike = function(stream) {\n return (typeof stream !== 'function')\n && (typeof stream !== 'string')\n && (typeof stream !== 'boolean')\n && (typeof stream !== 'number')\n && (!Buffer.isBuffer(stream));\n};\n\nCombinedStream.prototype.append = function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n\n if (isStreamLike) {\n if (!(stream instanceof DelayedStream)) {\n var newStream = DelayedStream.create(stream, {\n maxDataSize: Infinity,\n pauseStream: this.pauseStreams,\n });\n stream.on('data', this._checkDataSize.bind(this));\n stream = newStream;\n }\n\n this._handleErrors(stream);\n\n if (this.pauseStreams) {\n stream.pause();\n }\n }\n\n this._streams.push(stream);\n return this;\n};\n\nCombinedStream.prototype.pipe = function(dest, options) {\n Stream.prototype.pipe.call(this, dest, options);\n this.resume();\n return dest;\n};\n\nCombinedStream.prototype._getNext = function() {\n this._currentStream = null;\n\n if (this._insideLoop) {\n this._pendingNext = true;\n return; // defer call\n }\n\n this._insideLoop = true;\n try {\n do {\n this._pendingNext = false;\n this._realGetNext();\n } while (this._pendingNext);\n } finally {\n this._insideLoop = false;\n }\n};\n\nCombinedStream.prototype._realGetNext = function() {\n var stream = this._streams.shift();\n\n\n if (typeof stream == 'undefined') {\n this.end();\n return;\n }\n\n if (typeof stream !== 'function') {\n this._pipeNext(stream);\n return;\n }\n\n var getStream = stream;\n getStream(function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('data', this._checkDataSize.bind(this));\n this._handleErrors(stream);\n }\n\n this._pipeNext(stream);\n }.bind(this));\n};\n\nCombinedStream.prototype._pipeNext = function(stream) {\n this._currentStream = stream;\n\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('end', this._getNext.bind(this));\n stream.pipe(this, {end: false});\n return;\n }\n\n var value = stream;\n this.write(value);\n this._getNext();\n};\n\nCombinedStream.prototype._handleErrors = function(stream) {\n var self = this;\n stream.on('error', function(err) {\n self._emitError(err);\n });\n};\n\nCombinedStream.prototype.write = function(data) {\n this.emit('data', data);\n};\n\nCombinedStream.prototype.pause = function() {\n if (!this.pauseStreams) {\n return;\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();\n this.emit('pause');\n};\n\nCombinedStream.prototype.resume = function() {\n if (!this._released) {\n this._released = true;\n this.writable = true;\n this._getNext();\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();\n this.emit('resume');\n};\n\nCombinedStream.prototype.end = function() {\n this._reset();\n this.emit('end');\n};\n\nCombinedStream.prototype.destroy = function() {\n this._reset();\n this.emit('close');\n};\n\nCombinedStream.prototype._reset = function() {\n this.writable = false;\n this._streams = [];\n this._currentStream = null;\n};\n\nCombinedStream.prototype._checkDataSize = function() {\n this._updateDataSize();\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';\n this._emitError(new Error(message));\n};\n\nCombinedStream.prototype._updateDataSize = function() {\n this.dataSize = 0;\n\n var self = this;\n this._streams.forEach(function(stream) {\n if (!stream.dataSize) {\n return;\n }\n\n self.dataSize += stream.dataSize;\n });\n\n if (this._currentStream && this._currentStream.dataSize) {\n this.dataSize += this._currentStream.dataSize;\n }\n};\n\nCombinedStream.prototype._emitError = function(err) {\n this._reset();\n this.emit('error', err);\n};\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","var Stream = require('stream').Stream;\nvar util = require('util');\n\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n this.source = null;\n this.dataSize = 0;\n this.maxDataSize = 1024 * 1024;\n this.pauseStream = true;\n\n this._maxDataSizeExceeded = false;\n this._released = false;\n this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\n\nDelayedStream.create = function(source, options) {\n var delayedStream = new this();\n\n options = options || {};\n for (var option in options) {\n delayedStream[option] = options[option];\n }\n\n delayedStream.source = source;\n\n var realEmit = source.emit;\n source.emit = function() {\n delayedStream._handleEmit(arguments);\n return realEmit.apply(source, arguments);\n };\n\n source.on('error', function() {});\n if (delayedStream.pauseStream) {\n source.pause();\n }\n\n return delayedStream;\n};\n\nObject.defineProperty(DelayedStream.prototype, 'readable', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this.source.readable;\n }\n});\n\nDelayedStream.prototype.setEncoding = function() {\n return this.source.setEncoding.apply(this.source, arguments);\n};\n\nDelayedStream.prototype.resume = function() {\n if (!this._released) {\n this.release();\n }\n\n this.source.resume();\n};\n\nDelayedStream.prototype.pause = function() {\n this.source.pause();\n};\n\nDelayedStream.prototype.release = function() {\n this._released = true;\n\n this._bufferedEvents.forEach(function(args) {\n this.emit.apply(this, args);\n }.bind(this));\n this._bufferedEvents = [];\n};\n\nDelayedStream.prototype.pipe = function() {\n var r = Stream.prototype.pipe.apply(this, arguments);\n this.resume();\n return r;\n};\n\nDelayedStream.prototype._handleEmit = function(args) {\n if (this._released) {\n this.emit.apply(this, args);\n return;\n }\n\n if (args[0] === 'data') {\n this.dataSize += args[1].length;\n this._checkIfMaxDataSizeExceeded();\n }\n\n this._bufferedEvents.push(args);\n};\n\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n if (this._maxDataSizeExceeded) {\n return;\n }\n\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n this._maxDataSizeExceeded = true;\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'\n this.emit('error', new Error(message));\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","'use strict';\n\n\nvar loader = require('./lib/loader');\nvar dumper = require('./lib/dumper');\n\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nmodule.exports.Type = require('./lib/type');\nmodule.exports.Schema = require('./lib/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./lib/schema/json');\nmodule.exports.CORE_SCHEMA = require('./lib/schema/core');\nmodule.exports.DEFAULT_SCHEMA = require('./lib/schema/default');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.YAMLException = require('./lib/exception');\n\n// Re-export all types in case user wants to create custom schema\nmodule.exports.types = {\n binary: require('./lib/type/binary'),\n float: require('./lib/type/float'),\n map: require('./lib/type/map'),\n null: require('./lib/type/null'),\n pairs: require('./lib/type/pairs'),\n set: require('./lib/type/set'),\n timestamp: require('./lib/type/timestamp'),\n bool: require('./lib/type/bool'),\n int: require('./lib/type/int'),\n merge: require('./lib/type/merge'),\n omap: require('./lib/type/omap'),\n seq: require('./lib/type/seq'),\n str: require('./lib/type/str')\n};\n\n// Removed functions from JS-YAML 3.0.x\nmodule.exports.safeLoad = renamed('safeLoad', 'load');\nmodule.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll');\nmodule.exports.safeDump = renamed('safeDump', 'dump');\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_SCHEMA = require('./schema/default');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nmodule.exports.dump = dump;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nmodule.exports = YAMLException;\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar makeSnippet = require('./snippet');\nvar DEFAULT_SCHEMA = require('./schema/default');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = makeSnippet(mark);\n\n return new YAMLException(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n return this.extend(definition);\n}\n\n\nSchema.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof Type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type) {\n if (!(type instanceof Type)) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type.multi) {\n throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type) {\n if (!(type instanceof Type)) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nmodule.exports = Schema;\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nmodule.exports = require('./json');\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nmodule.exports = require('./core').extend({\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nmodule.exports = require('./failsafe').extend({\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","'use strict';\n\n\nvar common = require('./common');\n\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nmodule.exports = makeSnippet;\n","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n","'use strict';\n\n/*eslint-disable no-bitwise*/\n\n\nvar Type = require('../type');\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","/*!\n * mime-db\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015-2022 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module exports.\n */\n\nmodule.exports = require('./db.json')\n","/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n var mime = match && db[match[1].toLowerCase()]\n\n if (mime && mime.charset) {\n return mime.charset\n }\n\n // default text/* to utf-8\n if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n return 'UTF-8'\n }\n\n return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n // TODO: should this even be in this module?\n if (!str || typeof str !== 'string') {\n return false\n }\n\n var mime = str.indexOf('/') === -1\n ? exports.lookup(str)\n : str\n\n if (!mime) {\n return false\n }\n\n // TODO: use content-type or other module\n if (mime.indexOf('charset') === -1) {\n var charset = exports.charset(mime)\n if (charset) mime += '; charset=' + charset.toLowerCase()\n }\n\n return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n // get extensions\n var exts = match && exports.extensions[match[1].toLowerCase()]\n\n if (!exts || !exts.length) {\n return false\n }\n\n return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n if (!path || typeof path !== 'string') {\n return false\n }\n\n // get the extension (\"ext\" or \".ext\" or full path)\n var extension = extname('x.' + path)\n .toLowerCase()\n .substr(1)\n\n if (!extension) {\n return false\n }\n\n return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n /* istanbul ignore if */\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n",";(function (sax) { // wrapper for non-node envs\n sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n sax.SAXParser = SAXParser\n sax.SAXStream = SAXStream\n sax.createStream = createStream\n\n // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n // since that's the earliest that a buffer overrun could occur. This way, checks are\n // as rare as required, but as often as necessary to ensure never crossing this bound.\n // Furthermore, buffers are only tested at most once per write(), so passing a very\n // large string into write() might have undesirable effects, but this is manageable by\n // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme\n // edge case, result in creating at most one complete copy of the string passed in.\n // Set to Infinity to have unlimited buffers.\n sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n var buffers = [\n 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n 'procInstName', 'procInstBody', 'entity', 'attribName',\n 'attribValue', 'cdata', 'script'\n ]\n\n sax.EVENTS = [\n 'text',\n 'processinginstruction',\n 'sgmldeclaration',\n 'doctype',\n 'comment',\n 'opentagstart',\n 'attribute',\n 'opentag',\n 'closetag',\n 'opencdata',\n 'cdata',\n 'closecdata',\n 'error',\n 'end',\n 'ready',\n 'script',\n 'opennamespace',\n 'closenamespace'\n ]\n\n function SAXParser (strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt)\n }\n\n var parser = this\n clearBuffers(parser)\n parser.q = parser.c = ''\n parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n parser.opt = opt || {}\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n parser.tags = []\n parser.closed = parser.closedRoot = parser.sawRoot = false\n parser.tag = parser.error = null\n parser.strict = !!strict\n parser.noscript = !!(strict || parser.opt.noscript)\n parser.state = S.BEGIN\n parser.strictEntities = parser.opt.strictEntities\n parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n parser.attribList = []\n\n // namespaces form a prototype chain.\n // it always points at the current tag,\n // which protos to its parent tag.\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS)\n }\n\n // mostly just for error reporting\n parser.trackPosition = parser.opt.position !== false\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0\n }\n emit(parser, 'onready')\n }\n\n if (!Object.create) {\n Object.create = function (o) {\n function F () {}\n F.prototype = o\n var newf = new F()\n return newf\n }\n }\n\n if (!Object.keys) {\n Object.keys = function (o) {\n var a = []\n for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n return a\n }\n }\n\n function checkBufferLength (parser) {\n var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n var maxActual = 0\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length\n if (len > maxAllowed) {\n // Text/cdata nodes can get big, and since they're buffered,\n // we can get here under normal conditions.\n // Avoid issues by emitting the text node now,\n // so at least it won't get any bigger.\n switch (buffers[i]) {\n case 'textNode':\n closeText(parser)\n break\n\n case 'cdata':\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n break\n\n case 'script':\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n break\n\n default:\n error(parser, 'Max buffer length exceeded: ' + buffers[i])\n }\n }\n maxActual = Math.max(maxActual, len)\n }\n // schedule the next check for the earliest possible buffer overrun.\n var m = sax.MAX_BUFFER_LENGTH - maxActual\n parser.bufferCheckPosition = m + parser.position\n }\n\n function clearBuffers (parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = ''\n }\n }\n\n function flushBuffers (parser) {\n closeText(parser)\n if (parser.cdata !== '') {\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n }\n if (parser.script !== '') {\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n }\n\n SAXParser.prototype = {\n end: function () { end(this) },\n write: write,\n resume: function () { this.error = null; return this },\n close: function () { return this.write(null) },\n flush: function () { flushBuffers(this) }\n }\n\n var Stream\n try {\n Stream = require('stream').Stream\n } catch (ex) {\n Stream = function () {}\n }\n\n var streamWraps = sax.EVENTS.filter(function (ev) {\n return ev !== 'error' && ev !== 'end'\n })\n\n function createStream (strict, opt) {\n return new SAXStream(strict, opt)\n }\n\n function SAXStream (strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt)\n }\n\n Stream.apply(this)\n\n this._parser = new SAXParser(strict, opt)\n this.writable = true\n this.readable = true\n\n var me = this\n\n this._parser.onend = function () {\n me.emit('end')\n }\n\n this._parser.onerror = function (er) {\n me.emit('error', er)\n\n // if didn't throw, then means error was handled.\n // go ahead and clear error, so we can write again.\n me._parser.error = null\n }\n\n this._decoder = null\n\n streamWraps.forEach(function (ev) {\n Object.defineProperty(me, 'on' + ev, {\n get: function () {\n return me._parser['on' + ev]\n },\n set: function (h) {\n if (!h) {\n me.removeAllListeners(ev)\n me._parser['on' + ev] = h\n return h\n }\n me.on(ev, h)\n },\n enumerable: true,\n configurable: false\n })\n })\n }\n\n SAXStream.prototype = Object.create(Stream.prototype, {\n constructor: {\n value: SAXStream\n }\n })\n\n SAXStream.prototype.write = function (data) {\n if (typeof Buffer === 'function' &&\n typeof Buffer.isBuffer === 'function' &&\n Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = require('string_decoder').StringDecoder\n this._decoder = new SD('utf8')\n }\n data = this._decoder.write(data)\n }\n\n this._parser.write(data.toString())\n this.emit('data', data)\n return true\n }\n\n SAXStream.prototype.end = function (chunk) {\n if (chunk && chunk.length) {\n this.write(chunk)\n }\n this._parser.end()\n return true\n }\n\n SAXStream.prototype.on = function (ev, handler) {\n var me = this\n if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser['on' + ev] = function () {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n args.splice(0, 0, ev)\n me.emit.apply(me, args)\n }\n }\n\n return Stream.prototype.on.call(me, ev, handler)\n }\n\n // this really needs to be replaced with character classes.\n // XML allows all manner of ridiculous numbers and digits.\n var CDATA = '[CDATA['\n var DOCTYPE = 'DOCTYPE'\n var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n // This implementation works on strings, a single character at a time\n // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n // without a significant breaking change to either this parser, or the\n // JavaScript language. Implementation of an emoji-capable xml parser\n // is left as an exercise for the reader.\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n function isWhitespace (c) {\n return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\n }\n\n function isQuote (c) {\n return c === '\"' || c === '\\''\n }\n\n function isAttribEnd (c) {\n return c === '>' || isWhitespace(c)\n }\n\n function isMatch (regex, c) {\n return regex.test(c)\n }\n\n function notMatch (regex, c) {\n return !isMatch(regex, c)\n }\n\n var S = 0\n sax.STATE = {\n BEGIN: S++, // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++, // leading whitespace\n TEXT: S++, // general stuff\n TEXT_ENTITY: S++, // & and such.\n OPEN_WAKA: S++, // <\n SGML_DECL: S++, // \n SCRIPT: S++, //