mirror of https://github.com/aminya/setup-cpp
3 lines
633 KiB
JavaScript
3 lines
633 KiB
JavaScript
function getProxyUrl(e){let t,r,i="https:"===e.protocol;return checkBypass(e)||(r=i?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY,r&&(t=new URL(r))),t}function checkBypass(e){if(!e.hostname)return!1;let t,r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;e.port?t=+e.port:"http:"===e.protocol?t=80:"https:"===e.protocol&&(t=443);let i=[e.hostname.toUpperCase()];"number"==typeof t&&i.push(`${i[0]}:${t}`);for(let n of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if(i.some((e=>e===n)))return!0;return!1}function downloadTool(e,t,r,i){return __awaiter$8(this,void 0,void 0,(function*(){t=t||path$8.join(_getTempDirectory(),v4_1.default()),yield io$2.mkdirP(path$8.dirname(t)),core$8.debug("Downloading "+e),core$8.debug("Destination "+t);const n=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),a=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),o=new retry_helper_1.RetryHelper(3,n,a);return yield o.execute((()=>__awaiter$8(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",r,i)}))),(e=>!(e instanceof HTTPError&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))}function downloadToolAttempt(e,t,r,i){return __awaiter$8(this,void 0,void 0,(function*(){if(fs$4.existsSync(t))throw Error(`Destination file path ${t} already exists`);const n=new httpm.HttpClient(userAgent,[],{allowRetries:!1});r&&(core$8.debug("set auth"),void 0===i&&(i={}),i.authorization=r);const a=yield n.get(e,i);if(200!==a.message.statusCode){const t=new HTTPError(a.message.statusCode);throw core$8.debug(`Failed to download from "${e}". Code(${a.message.statusCode}) Message(${a.message.statusMessage})`),t}const o=util$6.promisify(stream$2.pipeline),s=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>a.message))();let l=!1;try{return yield o(s,fs$4.createWriteStream(t)),core$8.debug("download complete"),l=!0,t}finally{if(!l){core$8.debug("download failed");try{yield io$2.rmRF(t)}catch(c){core$8.debug(`Failed to delete '${t}'. ${c.message}`)}}}}))}function extract7z(e,t,r){return __awaiter$8(this,void 0,void 0,(function*(){assert_1$4.ok(IS_WINDOWS$7,"extract7z() not supported on current OS"),assert_1$4.ok(e,'parameter "file" is required'),t=yield _createExtractFolder(t);const i=process.cwd();if(process.chdir(t),r)try{const t=["x",core$8.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],i={silent:!0};yield exec_1$1.exec(`"${r}"`,t,i)}finally{process.chdir(i)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${path$8.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],n={silent:!0};try{const e=yield io$2.which("powershell",!0);yield exec_1$1.exec(`"${e}"`,r,n)}finally{process.chdir(i)}}return t}))}function extractTar$1(e,t,r="xz"){return __awaiter$8(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield _createExtractFolder(t),core$8.debug("Checking tar --version");let i="";yield exec_1$1.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>i+=""+e,stderr:e=>i+=""+e}}),core$8.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let a;a=r instanceof Array?r:[r],core$8.isDebug()&&!r.includes("v")&&a.push("-v");let o=t,s=e;return IS_WINDOWS$7&&n&&(a.push("--force-local"),o=t.replace(/\\/g,"/"),s=e.replace(/\\/g,"/")),n&&(a.push("--warning=no-unknown-keyword"),a.push("--overwrite")),a.push("-C",o,"-f",s),yield exec_1$1.exec("tar",a),t}))}function extractXar(e,t,r=[]){return __awaiter$8(this,void 0,void 0,(function*(){let i;assert_1$4.ok(IS_MAC$1,"extractXar() not supported on current OS"),assert_1$4.ok(e,'parameter "file" is required'),t=yield _createExtractFolder(t),i=r instanceof Array?r:[r],i.push("-x","-C",t,"-f",e),core$8.isDebug()&&i.push("-v");const n=yield io$2.which("xar",!0);return yield exec_1$1.exec(`"${n}"`,_unique(i)),t}))}function extractZip(e,t){return __awaiter$8(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield _createExtractFolder(t),IS_WINDOWS$7?yield extractZipWin(e,t):yield extractZipNix(e,t),t}))}function extractZipWin(e,t){return __awaiter$8(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=yield io$2.which("pwsh",!1);if(n){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${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(" ")];core$8.debug("Using pwsh at path: "+n),yield exec_1$1.exec(`"${n}"`,e)}else{const e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`].join(" ")],t=yield io$2.which("powershell",!0);core$8.debug("Using powershell at path: "+t),yield exec_1$1.exec(`"${t}"`,e)}}))}function extractZipNix(e,t){return __awaiter$8(this,void 0,void 0,(function*(){const r=yield io$2.which("unzip",!0),i=[e];core$8.isDebug()||i.unshift("-q"),i.unshift("-o"),yield exec_1$1.exec(`"${r}"`,i,{cwd:t})}))}function cacheDir(e,t,r,i){return __awaiter$8(this,void 0,void 0,(function*(){if(r=semver$1.clean(r)||r,i=i||os$1.arch(),core$8.debug(`Caching tool ${t} ${r} ${i}`),core$8.debug("source dir: "+e),!fs$4.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const n=yield _createToolPath(t,r,i);for(const t of fs$4.readdirSync(e)){const r=path$8.join(e,t);yield io$2.cp(r,n,{recursive:!0})}return _completeToolPath(t,r,i),n}))}function cacheFile(e,t,r,i,n){return __awaiter$8(this,void 0,void 0,(function*(){if(i=semver$1.clean(i)||i,n=n||os$1.arch(),core$8.debug(`Caching tool ${r} ${i} ${n}`),core$8.debug("source file: "+e),!fs$4.statSync(e).isFile())throw Error("sourceFile is not a file");const a=yield _createToolPath(r,i,n),o=path$8.join(a,t);return core$8.debug("destination file "+o),yield io$2.cp(e,o),_completeToolPath(r,i,n),a}))}function find(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||os$1.arch(),isExplicitVersion(t)||(t=evaluateVersions(findAllVersions(e,r),t));let i="";if(t){t=semver$1.clean(t)||"";const n=path$8.join(_getCacheDirectory(),e,t,r);core$8.debug("checking cache: "+n),fs$4.existsSync(n)&&fs$4.existsSync(n+".complete")?(core$8.debug(`Found tool in cache ${e} ${t} ${r}`),i=n):core$8.debug("not found")}return i}function findAllVersions(e,t){const r=[];t=t||os$1.arch();const i=path$8.join(_getCacheDirectory(),e);if(fs$4.existsSync(i)){const e=fs$4.readdirSync(i);for(const n of e)if(isExplicitVersion(n)){const e=path$8.join(i,n,t||"");fs$4.existsSync(e)&&fs$4.existsSync(e+".complete")&&r.push(n)}}return r}function getManifestFromRepo(e,t,r,i="master"){return __awaiter$8(this,void 0,void 0,(function*(){let n=[];const a=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`,o=new httpm.HttpClient("tool-cache"),s={};r&&(core$8.debug("set auth"),s.authorization=r);const l=yield o.getJson(a,s);if(!l.result)return n;let c="";for(const e of l.result.tree)if("versions-manifest.json"===e.path){c=e.url;break}s.accept="application/vnd.github.VERSION.raw";let m=yield(yield o.get(c,s)).readBody();if(m){m=m.replace(/^\uFEFF/,"");try{n=JSON.parse(m)}catch(d){core$8.debug("Invalid json")}}return n}))}function findFromManifest(e,t,r,i=os$1.arch()){return __awaiter$8(this,void 0,void 0,(function*(){return yield mm._findMatch(e,t,r,i)}))}function _createExtractFolder(e){return __awaiter$8(this,void 0,void 0,(function*(){return e||(e=path$8.join(_getTempDirectory(),v4_1.default())),yield io$2.mkdirP(e),e}))}function _createToolPath(e,t,r){return __awaiter$8(this,void 0,void 0,(function*(){const i=path$8.join(_getCacheDirectory(),e,semver$1.clean(t)||t,r||"");core$8.debug("destination "+i);const n=i+".complete";return yield io$2.rmRF(i),yield io$2.rmRF(n),yield io$2.mkdirP(i),i}))}function _completeToolPath(e,t,r){const i=path$8.join(_getCacheDirectory(),e,semver$1.clean(t)||t,r||"");fs$4.writeFileSync(i+".complete",""),core$8.debug("finished caching tool")}function isExplicitVersion(e){const t=semver$1.clean(e)||"";core$8.debug("isExplicit: "+t);const r=null!=semver$1.valid(t);return core$8.debug("explicit? "+r),r}function evaluateVersions(e,t){let r="";core$8.debug(`evaluating ${e.length} versions`);for(let i=(e=e.sort(((e,t)=>semver$1.gt(e,t)?1:-1))).length-1;i>=0;i--){const n=e[i];if(semver$1.satisfies(n,t)){r=n;break}}return core$8.debug(r?"matched: "+r:"match not found"),r}function _getCacheDirectory(){const e=process.env.RUNNER_TOOL_CACHE||"";return assert_1$4.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function _getTempDirectory(){const e=process.env.RUNNER_TEMP||"";return assert_1$4.ok(e,"Expected RUNNER_TEMP to be defined"),e}function _getGlobal(e,t){const r=commonjsGlobal[e];return void 0!==r?r:t}function _unique(e){return Array.from(new Set(e))}function getOptions(e){const t={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return e&&("boolean"==typeof e.followSymbolicLinks&&(t.followSymbolicLinks=e.followSymbolicLinks,core$7.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)),"boolean"==typeof e.implicitDescendants&&(t.implicitDescendants=e.implicitDescendants,core$7.debug(`implicitDescendants '${t.implicitDescendants}'`)),"boolean"==typeof e.omitBrokenSymbolicLinks&&(t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks,core$7.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`))),t}function dirname$1(e){if(e=safeTrimTrailingSeparator(e),IS_WINDOWS$6&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e))return e;let t=path$7.dirname(e);return IS_WINDOWS$6&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)&&(t=safeTrimTrailingSeparator(t)),t}function ensureAbsoluteRoot(e,t){if(assert_1$3.default(e,"ensureAbsoluteRoot parameter 'root' must not be empty"),assert_1$3.default(t,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),hasAbsoluteRoot(t))return t;if(IS_WINDOWS$6){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();return assert_1$3.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),t[0].toUpperCase()===e[0].toUpperCase()?2===t.length?`${t[0]}:\\${e.substr(3)}`:(e.endsWith("\\")||(e+="\\"),`${t[0]}:\\${e.substr(3)}${t.substr(2)}`):`${t[0]}:\\${t.substr(2)}`}if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();return assert_1$3.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),`${e[0]}:\\${t.substr(1)}`}}return assert_1$3.default(hasAbsoluteRoot(e),"ensureAbsoluteRoot parameter 'root' must have an absolute root"),e.endsWith("/")||IS_WINDOWS$6&&e.endsWith("\\")||(e+=path$7.sep),e+t}function hasAbsoluteRoot(e){return assert_1$3.default(e,"hasAbsoluteRoot parameter 'itemPath' must not be empty"),e=normalizeSeparators(e),IS_WINDOWS$6?e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e):e.startsWith("/")}function hasRoot(e){return assert_1$3.default(e,"isRooted parameter 'itemPath' must not be empty"),e=normalizeSeparators(e),IS_WINDOWS$6?e.startsWith("\\")||/^[A-Z]:/i.test(e):e.startsWith("/")}function normalizeSeparators(e){return e=e||"",IS_WINDOWS$6?(e=e.replace(/\//g,"\\"),(/^\\\\+[^\\]/.test(e)?"\\":"")+e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function safeTrimTrailingSeparator(e){return e?(e=normalizeSeparators(e)).endsWith(path$7.sep)?e===path$7.sep||IS_WINDOWS$6&&/^[A-Z]:\\$/i.test(e)?e:e.substr(0,e.length-1):e:""}function getSearchPaths(e){e=e.filter((e=>!e.negate));const t={};for(const i of e)t[IS_WINDOWS$5?i.searchPath.toUpperCase():i.searchPath]="candidate";const r=[];for(const i of e){const e=IS_WINDOWS$5?i.searchPath.toUpperCase():i.searchPath;if("included"===t[e])continue;let n=!1,a=e,o=pathHelper$2.dirname(a);for(;o!==a;){if(t[o]){n=!0;break}a=o,o=pathHelper$2.dirname(a)}n||(r.push(i.searchPath),t[e]="included")}return r}function match(e,t){let r=internal_match_kind_1$2.MatchKind.None;for(const i of e)i.negate?r&=~i.match(t):r|=i.match(t);return r}function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}function balanced$1(e,t,r){e instanceof RegExp&&(e=maybeMatch(e,r)),t instanceof RegExp&&(t=maybeMatch(t,r));var i=range$1(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}function range$1(e,t,r){var i,n,a,o,s,l=r.indexOf(e),c=r.indexOf(t,l+1),m=l;if(l>=0&&c>0){if(e===t)return[l,c];for(i=[],a=r.length;m>=0&&!s;)m==l?(i.push(m),l=r.indexOf(e,m+1)):1==i.length?s=[i.pop(),c]:(a>(n=i.pop())&&(a=n,o=c),c=r.indexOf(t,m+1)),m=c>l&&l>=0?l:c;i.length&&(s=[a,o])}return s}function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(e){return e.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],r=balanced("{","}",e);if(!r)return e.split(",");var i=r.body,n=r.post,a=r.pre.split(",");a[a.length-1]+="{"+i+"}";var o=parseCommaParts(n);return n.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),t.push.apply(t,a),t}function expandTop(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),expand$1(escapeBraces(e),!0).map(unescapeBraces)):[]}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return t>=e}function gte(e,t){return e>=t}function expand$1(e,t){var r=[],i=balanced("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var n,a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),s=a||o,l=i.body.indexOf(",")>=0;if(!s&&!l)return i.post.match(/,.*\}/)?expand$1(e=i.pre+"{"+i.body+escClose+i.post):[e];if(s)n=i.body.split(/\.\./);else if(1===(n=parseCommaParts(i.body)).length&&1===(n=expand$1(n[0],!1).map(embrace)).length)return(d=i.post.length?expand$1(i.post,!1):[""]).map((function(e){return i.pre+n[0]+e}));var c,m=i.pre,d=i.post.length?expand$1(i.post,!1):[""];if(s){var p=numeric(n[0]),u=numeric(n[1]),h=Math.max(n[0].length,n[1].length),g=3==n.length?Math.abs(numeric(n[2])):1,y=lte;p>u&&(g*=-1,y=gte);var f=n.some(isPadded);c=[];for(var b=p;y(b,u);b+=g){var x;if(o)"\\"===(x=String.fromCharCode(b))&&(x="");else if(x=b+"",f){var S=h-x.length;if(S>0){var N=Array(S+1).join("0");x=0>b?"-"+N+x.slice(1):N+x}}c.push(x)}}else c=concatMap(n,(function(e){return expand$1(e,!1)}));for(var C=0;c.length>C;C++)for(var P=0;d.length>P;P++){var v=m+c[C]+d[P];(!t||s||v)&&r.push(v)}return r}function charSet(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}function filter(e,t){return t=t||{},function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){t=t||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function minimatch(e,t,r){return assertValidPattern(t),r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch))return new Minimatch(e,t);assertValidPattern(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===path$6.sep||(e=e.split(path$6.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function make(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(slashSplit)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0}function parseNegate(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var i=0,n=e.length;n>i&&"!"===e.charAt(i);i++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}}function braceExpand(e,t){return t||(t=this instanceof Minimatch?this.options:{}),assertValidPattern(e=void 0===e?this.pattern:e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:expand(e)}function parse$2(e,t){function r(){if(n){switch(n){case"*":o+=star,s=!0;break;case"?":o+=qmark,s=!0;break;default:o+="\\"+n}g.debug("clearStateChar %j %j",n,o),n=!1}}assertValidPattern(e);var i=this.options;if("**"===e){if(!i.noglobstar)return GLOBSTAR;e="*"}if(""===e)return"";for(var n,a,o="",s=!!i.nocase,l=!1,c=[],m=[],d=!1,p=-1,u=-1,h="."===e.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,y=0,f=e.length;f>y&&(a=e.charAt(y));y++)if(this.debug("%s\t%s %s %j",e,y,o,a),l&&reSpecials[a])o+="\\"+a,l=!1;else switch(a){case"/":return!1;case"\\":r(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,y,o,a),d){this.debug(" in class"),"!"===a&&y===u+1&&(a="^"),o+=a;continue}g.debug("call clearStateChar %j",n),r(),n=a,i.noext&&r();continue;case"(":if(d){o+="(";continue}if(!n){o+="\\(";continue}c.push({type:n,start:y-1,reStart:o.length,open:plTypes[n].open,close:plTypes[n].close}),this.debug("plType %j %j",n,o+="!"===n?"(?:(?!(?:":"(?:"),n=!1;continue;case")":if(d||!c.length){o+="\\)";continue}r(),s=!0;var b=c.pop();o+=b.close,"!"===b.type&&m.push(b),b.reEnd=o.length;continue;case"|":if(d||!c.length||l){o+="\\|",l=!1;continue}r(),o+="|";continue;case"[":if(r(),d){o+="\\"+a;continue}d=!0,u=y,p=o.length,o+=a;continue;case"]":if(y===u+1||!d){o+="\\"+a,l=!1;continue}var x=e.substring(u+1,y);try{RegExp("["+x+"]")}catch(z){var S=this.parse(x,SUBPARSE);o=o.substr(0,p)+"\\["+S[0]+"\\]",s=s||S[1],d=!1;continue}s=!0,d=!1,o+=a;continue;default:r(),l?l=!1:!reSpecials[a]||"^"===a&&d||(o+="\\"),o+=a}for(d&&(x=e.substr(u+1),S=this.parse(x,SUBPARSE),o=o.substr(0,p)+"\\["+S[0],s=s||S[1]),b=c.pop();b;b=c.pop()){var N=o.slice(b.reStart+b.open.length);this.debug("setting tail",o,b),N=N.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,r){return r||(r="\\"),t+t+r+"|"})),this.debug("tail=%j\n %s",N,N,b,o);var C="*"===b.type?star:"?"===b.type?qmark:"\\"+b.type;s=!0,o=o.slice(0,b.reStart)+C+"\\("+N}r(),l&&(o+="\\\\");var P=!1;switch(o.charAt(0)){case"[":case".":case"(":P=!0}for(var v=m.length-1;v>-1;v--){var _=m[v],R=o.slice(0,_.reStart),E=o.slice(_.reStart,_.reEnd-8),T=o.slice(_.reEnd-8,_.reEnd),O=o.slice(_.reEnd);T+=O;var w=R.split("(").length-1,A=O;for(y=0;w>y;y++)A=A.replace(/\)[+*?]?/,"");var B="";""===(O=A)&&t!==SUBPARSE&&(B="$"),o=R+E+O+B+T}if(""!==o&&s&&(o="(?=.)"+o),P&&(o=h+o),t===SUBPARSE)return[o,s];if(!s)return globUnescape(e);var I=i.nocase?"i":"";try{var H=RegExp("^"+o+"$",I)}catch(z){return/$./}return H._glob=e,H._src=o,H}function makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?star:t.dot?twoStarDot:twoStarNoDot,i=t.nocase?"i":"",n=e.map((function(e){return e.map((function(e){return e===GLOBSTAR?r:"string"==typeof e?regExpEscape(e):e._src})).join("\\/")})).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=RegExp(n,i)}catch(a){this.regexp=!1}return this.regexp}function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function create(e,t){return __awaiter$6(this,void 0,void 0,(function*(){return yield internal_globber_1.DefaultGlobber.create(e,t)}))}function v1$1(e,t,r){var i=t&&r||0,n=t||[],a=(e=e||{}).node||_nodeId,o=void 0!==e.clockseq?e.clockseq:_clockseq;if(null==a||null==o){var s=rng();null==a&&(a=_nodeId=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==o&&(o=_clockseq=16383&(s[6]<<8|s[7]))}var l=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:_lastNSecs+1,m=l-_lastMSecs+(c-_lastNSecs)/1e4;if(0>m&&void 0===e.clockseq&&(o=o+1&16383),(0>m||l>_lastMSecs)&&void 0===e.nsecs&&(c=0),c>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=l,_lastNSecs=c,_clockseq=o;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;n[i++]=d>>>24&255,n[i++]=d>>>16&255,n[i++]=d>>>8&255,n[i++]=255&d;var p=l/4294967296*1e4&268435455;n[i++]=p>>>8&255,n[i++]=255&p,n[i++]=p>>>24&15|16,n[i++]=p>>>16&255,n[i++]=o>>>8|128,n[i++]=255&o;for(var u=0;6>u;++u)n[i+u]=a[u];return t||bytesToUuid(n)}function createTempDirectory(){return __awaiter$5(this,void 0,void 0,(function*(){const e="win32"===process.platform;let t=process.env.RUNNER_TEMP||"";if(!t){let r;r=e?process.env.USERPROFILE||"C:\\":"darwin"===process.platform?"/Users":"/home",t=path$2.join(r,"actions","temp")}const r=path$2.join(t,(0,uuid_1.v4)());return yield io$1.mkdirP(r),r}))}function getArchiveFileSizeInBytes(e){return fs$2.statSync(e).size}function resolvePaths(e){var t,r,i,n;return __awaiter$5(this,void 0,void 0,(function*(){const a=[],o=null!==(n=process.env.GITHUB_WORKSPACE)&&void 0!==n?n:process.cwd(),s=yield glob.create(e.join("\n"),{implicitDescendants:!1});try{for(var l,c=!0,m=__asyncValues$1(s.globGenerator());l=yield m.next(),!(t=l.done);c=!0){c=!1;const e=path$2.relative(o,l.value).replace(RegExp("\\"+path$2.sep,"g"),"/");core$5.debug("Matched: "+e),a.push(""===e?".":""+e)}}catch(d){r={error:d}}finally{try{c||t||!(i=m.return)||(yield i.call(m))}finally{if(r)throw r.error}}return a}))}function unlinkFile(e){return __awaiter$5(this,void 0,void 0,(function*(){return util$5.promisify(fs$2.unlink)(e)}))}function getVersion(e,t=[]){return __awaiter$5(this,void 0,void 0,(function*(){let r="";t.push("--version"),core$5.debug(`Checking ${e} ${t.join(" ")}`);try{yield exec.exec(""+e,t,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>r+=""+e,stderr:e=>r+=""+e}})}catch(i){core$5.debug(i.message)}return r=r.trim(),core$5.debug(r),r}))}function getCompressionMethod(){return __awaiter$5(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]),t=semver.clean(e);return core$5.debug("zstd version: "+t),""===e?constants_1$3.CompressionMethod.Gzip:constants_1$3.CompressionMethod.ZstdWithoutLong}))}function getCacheFileName(e){return e===constants_1$3.CompressionMethod.Gzip?constants_1$3.CacheFilename.Gzip:constants_1$3.CacheFilename.Zstd}function getGnuTarPathOnWindows(){return __awaiter$5(this,void 0,void 0,(function*(){return fs$2.existsSync(constants_1$3.GnuTarPathOnWindows)?constants_1$3.GnuTarPathOnWindows:(yield getVersion("tar")).toLowerCase().includes("gnu tar")?io$1.which("tar"):""}))}function assertDefined(e,t){if(void 0===t)throw Error(`Expected ${e} but value was undefiend`);return t}function isGhes(){const e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),t="GITHUB.COM"===e,r=e.endsWith(".GHE.COM")||e.endsWith(".GHE.LOCALHOST");return!t&&!r}function createEmptyPipeline(){return HttpPipeline.create()}function log(e,...t){process$1.stderr.write(`${require$$1.format(e,...t)}${EOL$1}`)}function enable(e){enabledString=e,enabledNamespaces=[],skippedNamespaces=[];const t=/\*/g,r=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const i of r)i.startsWith("-")?skippedNamespaces.push(RegExp(`^${i.substr(1)}$`)):enabledNamespaces.push(RegExp(`^${i}$`));for(const i of debuggers)i.enabled=enabled(i.namespace)}function enabled(e){if(e.endsWith("*"))return!0;for(const t of skippedNamespaces)if(t.test(e))return!1;for(const t of enabledNamespaces)if(t.test(e))return!0;return!1}function disable(){const e=enabledString||"";return enable(""),e}function createDebugger(e){const t=Object.assign((function(...r){t.enabled&&(r.length>0&&(r[0]=`${e} ${r[0]}`),t.log(...r))}),{enabled:enabled(e),destroy:destroy,log:debugObj.log,namespace:e,extend:extend});return debuggers.push(t),t}function destroy(){const e=debuggers.indexOf(this);return e>=0&&(debuggers.splice(e,1),!0)}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);return t.log=this.log,t}function setLogLevel(e){if(e&&!isAzureLogLevel(e))throw Error(`Unknown log level '${e}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`);azureLogLevel=e;const t=[];for(const r of registeredLoggers)shouldEnable(r)&&t.push(r.namespace);debugObj.enable(t.join(","))}function createClientLogger(e){const t=AzureLogger.extend(e);return patchLogMethod(AzureLogger,t),{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});if(patchLogMethod(e,r),shouldEnable(r)){const e=debugObj.disable();debugObj.enable(e+","+r.namespace)}return registeredLoggers.add(r),r}function shouldEnable(e){return!(!azureLogLevel||levelMap[e.level]>levelMap[azureLogLevel])}function isAzureLogLevel(e){return AZURE_LOG_LEVELS.includes(e)}function createAbortablePromise(e,t){const{cleanupBeforeAbort:r,abortSignal:i,abortErrorMsg:n}=null!=t?t:{};return new Promise(((t,a)=>{function o(){a(new AbortError$1(null!=n?n:"The operation was aborted."))}function s(){null==i||i.removeEventListener("abort",l)}function l(){null==r||r(),s(),o()}if(null==i?void 0:i.aborted)return o();try{e((e=>{s(),t(e)}),(e=>{s(),a(e)}))}catch(c){a(c)}null==i||i.addEventListener("abort",l)}))}function getRandomIntegerInclusive(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function delay$2(e,t){let r;const{abortSignal:i,abortErrorMsg:n}={};return createAbortablePromise((t=>{r=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:null!=n?n:StandardAbortMessage$1})}function isObject(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function isError(e){return!!isObject(e)&&("string"==typeof e.name&&"string"==typeof e.message)}function getErrorMessage(e){if(isError(e))return e.message;{let r;try{r="object"==typeof e&&e?JSON.stringify(e):e+""}catch(t){r="[unable to stringify input]"}return"Unknown error "+r}}function randomUUID(){return uuidFunction()}function stringToUint8Array(e,t){return Buffer.from(e,t)}function logPolicy(e={}){var t;const r=null!==(t=e.logger)&&void 0!==t?t:logger$2.info,i=new Sanitizer({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:logPolicyName,async sendRequest(e,t){if(!r.enabled)return t(e);r("Request: "+i.sanitize(e));const n=await t(e);return r("Response status code: "+n.status),r("Headers: "+i.sanitize(n.headers)),n}}}function redirectPolicy(e={}){const{maxRetries:t=20}=e;return{name:redirectPolicyName,async sendRequest(e,r){const i=await r(e);return handleRedirect(r,i,t)}}}async function handleRedirect(e,t,r,i=0){const{request:n,status:a,headers:o}=t,s=o.get("location");if(s&&(300===a||301===a&&allowedRedirect.includes(n.method)||302===a&&allowedRedirect.includes(n.method)||303===a&&"POST"===n.method||307===a)&&r>i){const t=new URL(s,n.url);n.url=""+t,303===a&&(n.method="GET",n.headers.delete("Content-Length"),delete n.body),n.headers.delete("Authorization");const o=await e(n);return handleRedirect(e,o,r,i+1)}return t}function getHeaderName(){return"User-Agent"}async function setPlatformSpecificData(e){if(process$1&&process$1.versions){const t=process$1.versions;t.bun?e.set("Bun",t.bun):t.deno?e.set("Deno",t.deno):t.node&&e.set("Node",t.node)}e.set("OS",`(${os$2.arch()}-${os$2.type()}-${os$2.release()})`)}function getUserAgentString(e){const t=[];for(const[r,i]of e)t.push(i?`${r}/${i}`:r);return t.join(" ")}function getUserAgentHeaderName(){return getHeaderName()}async function getUserAgentValue(e){const t=new Map;t.set("core-rest-pipeline",SDK_VERSION$1),await setPlatformSpecificData(t);const r=getUserAgentString(t);return e?`${e} ${r}`:r}function userAgentPolicy(e={}){const t=getUserAgentValue(e.userAgentPrefix);return{name:userAgentPolicyName,sendRequest:async(e,r)=>(e.headers.has(UserAgentHeaderName)||e.headers.set(UserAgentHeaderName,await t),r(e))}}function __rest(e,t){var r={};for(var i in e)({}).hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);i.length>n;n++)0>t.indexOf(i[n])&&{}.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function __values$1(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,r){function i(e,t){c[e]&&(l[e]=function(t){return new Promise((function(r,i){m.push([e,t,r,i])>1||n(e,t)}))},t&&(l[e]=t(l[e])))}function n(e,t){try{(r=c[e](t)).value instanceof __await?Promise.resolve(r.value.v).then(a,o):s(m[0][2],r)}catch(i){s(m[0][3],i)}var r}function a(e){n("next",e)}function o(e){n("throw",e)}function s(e,t){e(t),m.shift(),m.length&&n(m[0][0],m[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=r.apply(e,t||[]),m=[];return l=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,o)}})),l[Symbol.asyncIterator]=function(){return this},l}function __asyncDelegator(e){function t(t,n){r[t]=e[t]?function(r){return(i=!i)?{value:__await(e[t](r)),done:!1}:n?n(r):r}:n}var r,i;return r={},t("next"),t("throw",(function(e){throw e})),t("return"),r[Symbol.iterator]=function(){return this},r}function __asyncValues(e){function t(t){r[t]=e[t]&&function(r){return new Promise((function(i,n){!function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}(i,n,(r=e[t](r)).done,r.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values$1?__values$1(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)}function isBlob(e){return"function"==typeof e.stream}function hasRawContent(e){return"function"==typeof e[rawContent]}function getRawContent(e){return hasRawContent(e)?e[rawContent]():e.stream()}function streamAsyncIterator(){return __asyncGenerator(this,arguments,(function*(){const e=this.getReader();try{for(;;){const{done:t,value:r}=yield __await(e.read());if(t)return yield __await(void 0);yield yield __await(r)}}finally{e.releaseLock()}}))}function makeAsyncIterable(e){e[Symbol.asyncIterator]||(e[Symbol.asyncIterator]=streamAsyncIterator.bind(e)),e.values||(e.values=streamAsyncIterator.bind(e))}function ensureNodeStream(e){return e instanceof ReadableStream?(makeAsyncIterable(e),Readable.fromWeb(e)):e}function toStream(e){return e instanceof Uint8Array?Readable.from(Buffer.from(e)):isBlob(e)?toStream(getRawContent(e)):ensureNodeStream(e)}async function concat(e){return function(){const t=e.map((e=>"function"==typeof e?e():e)).map(toStream);return Readable.from(function(){return __asyncGenerator(this,arguments,(function*(){var e,r,i;for(const l of t)try{for(var n,a=!0,o=(r=void 0,__asyncValues(l));!(e=(n=yield __await(o.next())).done);a=!0){a=!1;const e=n.value;yield yield __await(e)}}catch(s){r={error:s}}finally{try{a||e||!(i=o.return)||(yield __await(i.call(o)))}finally{if(r)throw r.error}}}))}())}}function generateBoundary(){return"----AzSDKFormBoundary"+randomUUID()}function encodeHeaders(e){let t="";for(const[r,i]of e)t+=`${r}: ${i}\r\n`;return t}function getLength(e){return e instanceof Uint8Array?e.byteLength:isBlob(e)?-1===e.size?void 0:e.size:void 0}function getTotalLength(e){let t=0;for(const r of e){const e=getLength(r);if(void 0===e)return;t+=e}return t}async function buildRequestBody(e,t,r){const i=[stringToUint8Array("--"+r,"utf-8"),...t.flatMap((e=>[stringToUint8Array("\r\n","utf-8"),stringToUint8Array(encodeHeaders(e.headers),"utf-8"),stringToUint8Array("\r\n","utf-8"),e.body,stringToUint8Array("\r\n--"+r,"utf-8")])),stringToUint8Array("--\r\n\r\n","utf-8")],n=getTotalLength(i);n&&e.headers.set("Content-Length",n),e.body=await concat(i)}function assertValidBoundary(e){if(e.length>maxBoundaryLength)throw Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!validBoundaryCharacters.has(e))))throw Error(`Multipart boundary "${e}" contains invalid characters`)}function multipartPolicy(){return{name:multipartPolicyName,async sendRequest(e,t){var r;if(!e.multipartBody)return t(e);if(e.body)throw Error("multipartBody and regular body cannot be set at the same time");let i=e.multipartBody.boundary;const n=null!==(r=e.headers.get("Content-Type"))&&void 0!==r?r:"multipart/mixed",a=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!a)throw Error("Got multipart request body, but content-type header was not multipart: "+n);const[,o,s]=a;if(s&&i&&s!==i)throw Error(`Multipart boundary was specified as ${s} in the header, but got ${i} in the request body`);return null!=i||(i=s),i?assertValidBoundary(i):i=generateBoundary(),e.headers.set("Content-Type",`${o}; boundary=${i}`),await buildRequestBody(e,e.multipartBody.parts,i),e.multipartBody=void 0,t(e)}}}function decompressResponsePolicy(){return{name:decompressResponsePolicyName,sendRequest:async(e,t)=>("HEAD"!==e.method&&e.headers.set("Accept-Encoding","gzip,deflate"),t(e))}}function delay$1(e,t,r){return new Promise(((i,n)=>{let a,o;const s=()=>n(new AbortError$1((null==r?void 0:r.abortErrorMsg)?null==r?void 0:r.abortErrorMsg:StandardAbortMessage)),l=()=>{(null==r?void 0:r.abortSignal)&&o&&r.abortSignal.removeEventListener("abort",o)};if(o=()=>(a&&clearTimeout(a),l(),s()),(null==r?void 0:r.abortSignal)&&r.abortSignal.aborted)return s();a=setTimeout((()=>{l(),i(t)}),e),(null==r?void 0:r.abortSignal)&&r.abortSignal.addEventListener("abort",o)}))}function parseHeaderValueAsNumber(e,t){const r=e.headers.get(t);if(!r)return;const i=+r;return Number.isNaN(i)?void 0:i}function getRetryAfterInMs(e){if(e&&[429,503].includes(e.status))try{for(const i of AllRetryAfterHeaders){const t=parseHeaderValueAsNumber(e,i);if(0===t||t)return t*(i===RetryAfterHeader?1e3:1)}const t=e.headers.get(RetryAfterHeader);if(!t)return;const r=Date.parse(t)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch(t){return}}function isThrottlingRetryResponse(e){return Number.isFinite(getRetryAfterInMs(e))}function throttlingRetryStrategy(){return{name:"throttlingRetryStrategy",retry({response:e}){const t=getRetryAfterInMs(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}function exponentialRetryStrategy(e={}){var t,r;const i=null!==(t=e.retryDelayInMs)&&void 0!==t?t:DEFAULT_CLIENT_RETRY_INTERVAL,n=null!==(r=e.maxRetryDelayInMs)&&void 0!==r?r:DEFAULT_CLIENT_MAX_RETRY_INTERVAL;let a=i;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:r,responseError:i}){const o=isSystemError(i),s=o&&e.ignoreSystemErrors,l=isExponentialRetryResponse(r),c=l&&e.ignoreHttpStatusCodes;if(r&&(isThrottlingRetryResponse(r)||!l)||c||s)return{skipStrategy:!0};if(i&&!o&&!l)return{errorToThrow:i};const m=Math.min(n,a*Math.pow(2,t));return a=m/2+getRandomIntegerInclusive(0,m/2),{retryAfterInMs:a}}}}function isExponentialRetryResponse(e){return!(!e||void 0===e.status||500>e.status&&408!==e.status||501===e.status||505===e.status)}function isSystemError(e){return!!e&&("ETIMEDOUT"===e.code||"ESOCKETTIMEDOUT"===e.code||"ECONNREFUSED"===e.code||"ECONNRESET"===e.code||"ENOENT"===e.code||"ENOTFOUND"===e.code)}function retryPolicy(e,t={maxRetries:DEFAULT_RETRY_POLICY_COUNT}){const r=t.logger||retryPolicyLogger;return{name:retryPolicyName,async sendRequest(i,n){var a,o;let s,l,c=-1;e:for(;;){c+=1,s=void 0,l=void 0;try{r.info(`Retry ${c}: Attempting to send request`,i.requestId),s=await n(i),r.info(`Retry ${c}: Received a response from request`,i.requestId)}catch(m){if(r.error(`Retry ${c}: Received an error from request`,i.requestId),l=m,!m||"RestError"!==l.name)throw m;s=l.response}if(null===(a=i.abortSignal)||void 0===a?void 0:a.aborted)throw r.error(`Retry ${c}: Request aborted.`),new AbortError$1;if(c>=(null!==(o=t.maxRetries)&&void 0!==o?o:DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${c}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),l)throw l;if(s)return s;throw Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${c}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||retryPolicyLogger;e.info(`Retry ${c}: Processing retry strategy ${t.name}.`);const r=t.retry({retryCount:c,response:s,responseError:l});if(r.skipStrategy){e.info(`Retry ${c}: Skipped.`);continue t}const{errorToThrow:n,retryAfterInMs:a,redirectTo:o}=r;if(n)throw e.error(`Retry ${c}: Retry strategy ${t.name} throws error:`,n),n;if(a||0===a){e.info(`Retry ${c}: Retry strategy ${t.name} retries after ${a}`),await delay$1(a,void 0,{abortSignal:i.abortSignal});continue e}if(o){e.info(`Retry ${c}: Retry strategy ${t.name} redirects to ${o}`),i.url=o;continue e}}if(l)throw r.info("None of the retry strategies could work with the received error. Throwing it."),l;if(s)return r.info("None of the retry strategies could work with the received response. Returning it."),s}}}}function defaultRetryPolicy(e={}){var t;return{name:defaultRetryPolicyName,sendRequest:retryPolicy([throttlingRetryStrategy(),exponentialRetryStrategy(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}function normalizeName(e){return e.toLowerCase()}function*headerIterator(e){for(const t of e.values())yield[t.name,t.value]}function createHttpHeaders(e){return new HttpHeadersImpl(e)}function formDataToFormDataMap(e){var t;const r={};for(const[i,n]of e.entries())null!==(t=r[i])&&void 0!==t||(r[i]=[]),r[i].push(n);return r}function formDataPolicy(){return{name:formDataPolicyName,async sendRequest(e,t){if(isNodeLike&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=formDataToFormDataMap(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=wwwFormUrlEncode(e.formData):await prepareFormData(e.formData,e),e.formData=void 0}return t(e)}}}function wwwFormUrlEncode(e){const t=new URLSearchParams;for(const[r,i]of Object.entries(e))if(Array.isArray(i))for(const e of i)t.append(r,""+e);else t.append(r,""+i);return""+t}async function prepareFormData(e,t){const r=t.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=r?r:"multipart/form-data");const i=[];for(const[n,a]of Object.entries(e))for(const e of Array.isArray(a)?a:[a])if("string"==typeof e)i.push({headers:createHttpHeaders({"Content-Disposition":`form-data; name="${n}"`}),body:stringToUint8Array(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw Error(`Unexpected value for key ${n}: ${e}. Value should be serialized to string first.`);{const t=e.name||"blob",r=createHttpHeaders();r.set("Content-Disposition",`form-data; name="${n}"; filename="${t}"`),r.set("Content-Type",e.type||"application/octet-stream"),i.push({headers:r,body:e})}}t.multipartBody={parts:i}}function requireMs(){function e(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}if(hasRequiredMs)return ms;hasRequiredMs=1;var t=1e3,r=60*t,i=60*r,n=24*i,a=7*n;return ms=function(o,s){s=s||{};var l,c,m=typeof o;if("string"===m&&o.length>0)return function(e){if(100>=(e+="").length){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*a;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(o);if("number"===m&&isFinite(o))return s.long?n>(c=Math.abs(l=o))?i>c?r>c?t>c?l+" ms":e(l,c,t,"second"):e(l,c,r,"minute"):e(l,c,i,"hour"):e(l,c,n,"day"):function(e){var a=Math.abs(e);return n>a?i>a?r>a?t>a?e+"ms":Math.round(e/t)+"s":Math.round(e/r)+"m":Math.round(e/i)+"h":Math.round(e/n)+"d"}(o);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))}}function requireCommon(){return hasRequiredCommon?common:(hasRequiredCommon=1,common=function(e){function t(e){function i(...e){if(!i.enabled)return;const r=i,a=+new Date;r.diff=a-(n||a),r.prev=n,r.curr=a,n=a,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((i,n)=>{if("%%"===i)return"%";o++;const a=t.formatters[n];return"function"==typeof a&&(i=a.call(r,e[o]),e.splice(o,1),o--),i})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}let n,a,o,s=null;return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(a!==t.namespaces&&(a=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,r){const i=t(this.namespace+(void 0===r?":":r)+e);return i.log=this.log,i}function i(e){return(""+e).substring(2,(""+e).length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),n=i.length;for(r=0;n>r;r++)i[r]&&("-"===(e=i[r].replace(/\*/g,".*?"))[0]?t.skips.push(RegExp("^"+e.slice(1)+"$")):t.names.push(RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,i;for(r=0,i=t.skips.length;i>r;r++)if(t.skips[r].test(e))return!1;for(r=0,i=t.names.length;i>r;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=requireMs(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;e.length>t;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t})}function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let i=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(n=i))})),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(r){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(r){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=requireCommon()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(browser,browser.exports)),browser.exports}function requireHasFlag(){return hasRequiredHasFlag?hasFlag:(hasRequiredHasFlag=1,hasFlag=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return-1!==i&&(-1===n||n>i)})}function requireSupportsColor(){function e(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function t(e,t){if(0===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(e&&!t&&void 0===o)return 0;const i=o||0;if("dumb"===a.TERM)return i;if("win32"===process.platform){const e=r.release().split(".");return 10>+e[0]||10586>+e[2]?1:14931>+e[2]?2:3}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:i;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return 3>e?2:3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:i}if(hasRequiredSupportsColor)return supportsColor_1;hasRequiredSupportsColor=1;const r=require$$0__default,i=require$$1$1,n=requireHasFlag(),{env:a}=process;let o;return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?o=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=1),"FORCE_COLOR"in a&&(o="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),supportsColor_1={supportsColor:function(r){return e(t(r,r&&r.isTTY))},stdout:e(t(!0,i.isatty(1))),stderr:e(t(!0,i.isatty(2)))}}function requireNode(){return hasRequiredNode||(hasRequiredNode=1,function(e,t){const r=require$$1$1,i=require$$9__default;t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let i=0;r.length>i;i++)e.inspectOpts[r[i]]=t.inspectOpts[r[i]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:i,useColors:n}=this;if(n){const t=this.color,n="[3"+(8>t?t:"8;5;"+t),a=` ${n};1m${i} [0m`;r[0]=a+r[0].split("\n").join("\n"+a),r.push(n+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+i+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=requireSupportsColor();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(a){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:+i),e[r]=i,e}),{}),e.exports=requireCommon()(t);const{formatters:n}=e.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(node,node.exports)),node.exports}async function toBuffer(e){let t=0;const r=[];for await(const i of e)t+=i.length,r.push(i);return Buffer.concat(r,t)}async function json(e){const t=(await toBuffer(e)).toString("utf8");try{return JSON.parse(t)}catch(r){const e=r;throw e.message+=` (input: ${t})`,e}}function req(e,t={}){const r=(("string"==typeof e?e:e.href).startsWith("https:")?https:http).request(e,t),i=new Promise(((e,t)=>{r.once("response",e).once("error",t).end()}));return r.then=i.then.bind(i),r}function parseProxyResponse(e){return new Promise(((t,r)=>{function i(){const a=e.read();a?function(a){l.push(a),s+=a.length;const o=Buffer.concat(l,s),c=o.indexOf("\r\n\r\n");if(-1===c)return debug$2("have not received end of HTTP headers yet..."),void i();const m=o.slice(0,c).toString("ascii").split("\r\n"),d=m.shift();if(!d)return e.destroy(),r(Error("No header received from proxy CONNECT response"));const p=d.split(" "),u=+p[1],h=p.slice(2).join(" "),g={};for(const t of m){if(!t)continue;const i=t.indexOf(":");if(-1===i)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));const n=t.slice(0,i).toLowerCase(),a=t.slice(i+1).trimStart(),o=g[n];"string"==typeof o?g[n]=[o,a]:Array.isArray(o)?o.push(a):g[n]=a}debug$2("got proxy server response: %o %o",d,g),n(),t({connect:{statusCode:u,statusText:h,headers:g},buffered:o})}(a):e.once("readable",i)}function n(){e.removeListener("end",a),e.removeListener("error",o),e.removeListener("readable",i)}function a(){n(),debug$2("onend"),r(Error("Proxy connection ended before receiving CONNECT response"))}function o(e){n(),debug$2("onerror %o",e),r(e)}let s=0;const l=[];e.on("error",o),e.on("end",a),i()}))}function resume(e){e.resume()}function omit$1(e,...t){const r={};let i;for(i in e)t.includes(i)||(r[i]=e[i]);return r}function omit(e,...t){const r={};let i;for(i in e)t.includes(i)||(r[i]=e[i]);return r}function getEnvironmentValue(e){return process.env[e]?process.env[e]:process.env[e.toLowerCase()]?process.env[e.toLowerCase()]:void 0}function loadEnvironmentProxyValue(){if(!process)return;const e=getEnvironmentValue(HTTPS_PROXY),t=getEnvironmentValue(ALL_PROXY),r=getEnvironmentValue(HTTP_PROXY);return e||t||r}function isBypassed(e,t,r){if(0===t.length)return!1;const i=new URL(e).hostname;if(null==r?void 0:r.has(i))return r.get(i);let n=!1;for(const a of t)"."===a[0]?(i.endsWith(a)||i.length===a.length-1&&i===a.slice(1))&&(n=!0):i===a&&(n=!0);return null==r||r.set(i,n),n}function loadNoProxy(){const e=getEnvironmentValue(NO_PROXY);return noProxyListLoaded=!0,e?e.split(",").map((e=>e.trim())).filter((e=>e.length)):[]}function getDefaultProxySettings(e){if(!e&&!(e=loadEnvironmentProxyValue()))return;const t=new URL(e);return{host:(t.protocol?t.protocol+"//":"")+t.hostname,port:Number.parseInt(t.port||"80"),username:t.username,password:t.password}}function getDefaultProxySettingsInternal(){const e=loadEnvironmentProxyValue();return e?new URL(e):void 0}function getUrlFromProxySettings(e){let t;try{t=new URL(e.host)}catch(r){throw Error(`Expecting a valid host string in proxy settings, but found "${e.host}".`)}return t.port=e.port+"",e.username&&(t.username=e.username),e.password&&(t.password=e.password),t}function setProxyAgentOnRequest(e,t,r){if(e.agent)return;const i="https:"!==new URL(e.url).protocol;e.tlsSettings&&logger$2.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");const n=e.headers.toJSON();i?(t.httpProxyAgent||(t.httpProxyAgent=new HttpProxyAgent_1(r,{headers:n})),e.agent=t.httpProxyAgent):(t.httpsProxyAgent||(t.httpsProxyAgent=new HttpsProxyAgent_1(r,{headers:n})),e.agent=t.httpsProxyAgent)}function proxyPolicy(e,t){noProxyListLoaded||globalNoProxyList.push(...loadNoProxy());const r=e?getUrlFromProxySettings(e):getDefaultProxySettingsInternal(),i={};return{name:proxyPolicyName,sendRequest:async(e,t)=>(e.proxySettings||!r||isBypassed(e.url,globalNoProxyList,globalBypassedMap)?e.proxySettings&&setProxyAgentOnRequest(e,i,getUrlFromProxySettings(e.proxySettings)):setProxyAgentOnRequest(e,i,r),t(e))}}function setClientRequestIdPolicy(e="x-ms-client-request-id"){return{name:setClientRequestIdPolicyName,sendRequest:async(t,r)=>(t.headers.has(e)||t.headers.set(e,t.requestId),r(t))}}function tlsPolicy(e){return{name:tlsPolicyName,sendRequest:async(t,r)=>(t.tlsSettings||(t.tlsSettings=e),r(t))}}function createTracingContext(e={}){let t=new TracingContextImpl(e.parentContext);return e.span&&(t=t.setValue(knownContextKeys.span,e.span)),e.namespace&&(t=t.setValue(knownContextKeys.namespace,e.namespace)),t}function createDefaultTracingSpan(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}}}function createDefaultInstrumenter(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:createDefaultTracingSpan(),tracingContext:createTracingContext({parentContext:t.tracingContext})}),withContext:(e,t,...r)=>t(...r)}}function getInstrumenter(){return state$2.instrumenterImplementation||(state$2.instrumenterImplementation=createDefaultInstrumenter()),state$2.instrumenterImplementation}function createTracingClient(e){function t(e,t,r){var o;const s=getInstrumenter().startSpan(e,Object.assign(Object.assign({},r),{packageName:n,packageVersion:a,tracingContext:null===(o=null==t?void 0:t.tracingOptions)||void 0===o?void 0:o.tracingContext}));let l=s.tracingContext;const c=s.span;return l.getValue(knownContextKeys.namespace)||(l=l.setValue(knownContextKeys.namespace,i)),c.setAttribute("az.namespace",l.getValue(knownContextKeys.namespace)),{span:c,updatedOptions:Object.assign({},t,{tracingOptions:Object.assign(Object.assign({},null==t?void 0:t.tracingOptions),{tracingContext:l})})}}function r(e,t,...r){return getInstrumenter().withContext(e,t,...r)}const{namespace:i,packageName:n,packageVersion:a}=e;return{startSpan:t,withSpan:async function(e,i,n,a){const{span:o,updatedOptions:s}=t(e,i,a);try{const e=await r(s.tracingOptions.tracingContext,(()=>Promise.resolve(n(s,o))));return o.setStatus({status:"success"}),e}catch(l){throw o.setStatus({status:"error",error:l}),l}finally{o.end()}},withContext:r,parseTraceparentHeader:function(e){return getInstrumenter().parseTraceparentHeader(e)},createRequestHeaders:function(e){return getInstrumenter().createRequestHeaders(e)}}}function isRestError(e){return e instanceof RestError||isError(e)&&"RestError"===e.name}function tracingPolicy(e={}){const t=getUserAgentValue(e.userAgentPrefix),r=new Sanitizer({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),i=tryCreateTracingClient();return{name:tracingPolicyName,async sendRequest(e,n){var a;if(!i)return n(e);const o=await t,s={"http.url":r.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":o,requestId:e.requestId};o&&(s["http.user_agent"]=o);const{span:l,tracingContext:c}=null!==(a=tryCreateSpan(i,e,s))&&void 0!==a?a:{};if(!l||!c)return n(e);try{const t=await i.withContext(c,n,e);return tryProcessResponse(l,t),t}catch(m){throw tryProcessError(l,m),m}}}}function tryCreateTracingClient(){try{return createTracingClient({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:SDK_VERSION$1})}catch(e){return void logger$2.warning("Error when creating the TracingClient: "+getErrorMessage(e))}}function tryCreateSpan(e,t,r){try{const{span:i,updatedOptions:n}=e.startSpan("HTTP "+t.method,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:r});if(!i.isRecording())return void i.end();const a=e.createRequestHeaders(n.tracingOptions.tracingContext);for(const[e,r]of Object.entries(a))t.headers.set(e,r);return{span:i,tracingContext:n.tracingOptions.tracingContext}}catch(i){return void logger$2.warning("Skipping creating a tracing span due to an error: "+getErrorMessage(i))}}function tryProcessError(e,t){try{e.setStatus({status:"error",error:isError(t)?t:void 0}),isRestError(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(r){logger$2.warning("Skipping tracing span processing due to an error: "+getErrorMessage(r))}}function tryProcessResponse(e,t){try{e.setAttribute("http.status_code",t.status);const r=t.headers.get("x-ms-request-id");r&&e.setAttribute("serviceRequestId",r),e.setStatus({status:"success"}),e.end()}catch(r){logger$2.warning("Skipping tracing span processing due to an error: "+getErrorMessage(r))}}function createPipelineFromOptions(e){var t;const r=createEmptyPipeline();return isNodeLike&&(e.tlsOptions&&r.addPolicy(tlsPolicy(e.tlsOptions)),r.addPolicy(proxyPolicy(e.proxyOptions)),r.addPolicy(decompressResponsePolicy())),r.addPolicy(formDataPolicy(),{beforePolicies:[multipartPolicyName]}),r.addPolicy(userAgentPolicy(e.userAgentOptions)),r.addPolicy(setClientRequestIdPolicy(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),r.addPolicy(multipartPolicy(),{afterPhase:"Deserialize"}),r.addPolicy(defaultRetryPolicy(e.retryOptions),{phase:"Retry"}),r.addPolicy(tracingPolicy(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),isNodeLike&&r.addPolicy(redirectPolicy(e.redirectOptions),{afterPhase:"Retry"}),r.addPolicy(logPolicy(e.loggingOptions),{afterPhase:"Sign"}),r}function isReadableStream(e){return e&&"function"==typeof e.pipe}function isStreamComplete(e){return new Promise((t=>{const r=()=>{t(),e.removeListener("close",r),e.removeListener("end",r),e.removeListener("error",r)};e.on("close",r),e.on("end",r),e.on("error",r)}))}function isArrayBuffer(e){return e&&"number"==typeof e.byteLength}function getResponseHeaders(e){const t=createHttpHeaders();for(const r of Object.keys(e.headers)){const i=e.headers[r];Array.isArray(i)?i.length>0&&t.set(r,i[0]):i&&t.set(r,i)}return t}function getDecodedResponseStream(e,t){const r=t.get("Content-Encoding");if("gzip"===r){const t=zlib.createGunzip();return e.pipe(t),t}if("deflate"===r){const t=zlib.createInflate();return e.pipe(t),t}return e}function streamToText(e){return new Promise(((t,r)=>{const i=[];e.on("data",(e=>{Buffer.isBuffer(e)?i.push(e):i.push(Buffer.from(e))})),e.on("end",(()=>{t(Buffer.concat(i).toString("utf8"))})),e.on("error",(e=>{r(e&&"AbortError"===(null==e?void 0:e.name)?e:new RestError("Error reading response as text: "+e.message,{code:RestError.PARSE_ERROR}))}))}))}function getBodyLength(e){return e?Buffer.isBuffer(e)?e.length:isReadableStream(e)?null:isArrayBuffer(e)?e.byteLength:"string"==typeof e?Buffer.from(e).length:null:0}function createNodeHttpClient(){return new NodeHttpClient}function createDefaultHttpClient(){return createNodeHttpClient()}function createPipelineRequest(e){return new PipelineRequestImpl(e)}async function beginRefresh(e,t,r){async function i(){if(Date.now()>=r){const t=await e();if(null===t)throw Error("Failed to refresh access token.");return t}try{return await e()}catch(t){return null}}let n=await i();for(;null===n;)await delay$1(t),n=await i();return n}function createTokenCycler(e,t){function r(t,r){var l;return s.isRefreshing||(n=beginRefresh((()=>e.getToken(t,r)),o.retryIntervalInMs,null!==(l=null==a?void 0:a.expiresOnTimestamp)&&void 0!==l?l:Date.now()).then((e=>(n=null,a=e,i=r.tenantId,a))).catch((e=>{throw n=null,a=null,i=void 0,e}))),n}let i,n=null,a=null;const o=Object.assign(Object.assign({},DEFAULT_CYCLER_OPTIONS),t),s={get isRefreshing(){return null!==n},get shouldRefresh(){var e;return!s.isRefreshing&&(!(!(null==a?void 0:a.refreshAfterTimestamp)||a.refreshAfterTimestamp>=Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};return async(e,t)=>{const n=!!t.claims;return n&&(a=null),i!==t.tenantId||n||s.mustRefresh?r(e,t):(s.shouldRefresh&&r(e,t),a)}}async function defaultAuthorizeRequest(e){const{scopes:t,getAccessToken:r,request:i}=e,n={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions},a=await r(t,n);a&&e.request.headers.set("Authorization","Bearer "+a.token)}function getChallenge$1(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}function bearerTokenAuthenticationPolicy(e){var t;const{credential:r,scopes:i,challengeCallbacks:n}=e,a=e.logger||logger$2,o=Object.assign({authorizeRequest:null!==(t=null==n?void 0:n.authorizeRequest)&&void 0!==t?t:defaultAuthorizeRequest,authorizeRequestOnChallenge:null==n?void 0:n.authorizeRequestOnChallenge},n),s=r?createTokenCycler(r):()=>Promise.resolve(null);return{name:bearerTokenAuthenticationPolicyName,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let r,n;await o.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:s,logger:a});try{r=await t(e)}catch(l){n=l,r=l.response}if(o.authorizeRequestOnChallenge&&401===(null==r?void 0:r.status)&&getChallenge$1(r)&&await o.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:r,getAccessToken:s,logger:a}))return t(e);if(n)throw n;return r}}}function isTokenCredential(e){return e&&"function"==typeof e.getToken&&(void 0===e.signRequest||e.getToken.length>0)}function createDisableKeepAlivePolicy(){return{name:disableKeepAlivePolicyName,sendRequest:async(e,t)=>(e.disableKeepAlive=!0,t(e))}}function pipelineContainsDisableKeepAlivePolicy(e){return e.getOrderedPolicies().some((e=>e.name===disableKeepAlivePolicyName))}function encodeByteArray(e){return(e instanceof Buffer?e:Buffer.from(e.buffer)).toString("base64")}function decodeString(e){return Buffer.from(e,"base64")}function isPrimitiveBody(e,t){return"Composite"!==t&&"Dictionary"!==t&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e||null!==(null==t?void 0:t.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==e)}function isDuration(e){return validateISODuration.test(e)}function isValidUuid(e){return validUuidRegex.test(e)}function handleNullableResponseAndWrappableBody(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}function flattenResponse(e,t){var r,i;const n=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},n),{body:e.parsedBody});const a=t&&t.bodyMapper,o=!!(null==a?void 0:a.nullable),s=null==a?void 0:a.type.name;if("Stream"===s)return Object.assign(Object.assign({},n),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const l="Composite"===s&&a.type.modelProperties||{},c=Object.keys(l).some((e=>""===l[e].serializedName));if("Sequence"===s||c){const t=null!==(r=e.parsedBody)&&void 0!==r?r:[];for(const r of Object.keys(l))l[r].serializedName&&(t[r]=null===(i=e.parsedBody)||void 0===i?void 0:i[r]);if(n)for(const e of Object.keys(n))t[e]=n[e];return!o||e.parsedBody||n||0!==Object.getOwnPropertyNames(l).length?t:null}return handleNullableResponseAndWrappableBody({body:e.parsedBody,headers:n,hasNullableType:o,shouldWrapBody:isPrimitiveBody(e.parsedBody,s)})}function createSerializer(e={},t=!1){return new SerializerImpl(e,t)}function trimEnd(e,t){let r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}function bufferToBase64Url(e){if(e){if(!(e instanceof Uint8Array))throw Error("Please provide an input of type Uint8Array for converting to Base64Url.");return trimEnd(encodeByteArray(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}}function base64UrlToByteArray(e){if(e){if(e&&"string"!=typeof e.valueOf())throw Error("Please provide an input of type string for converting to Uint8Array");return decodeString(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}function splitSerializeName(e){const t=[];let r="";if(e){const i=e.split(".");for(const e of i)"\\"===e.charAt(e.length-1)?r+=e.substr(0,e.length-1)+".":(r+=e,t.push(r),r="")}return t}function dateToUnixTime(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(e)return new Date(1e3*e)}function serializeBasicTypes(e,t,r){if(null!=r)if(null!==e.match(/^Number$/i)){if("number"!=typeof r)throw Error(`${t} with value ${r} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof r.valueOf())throw Error(`${t} with value "${r}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof r.valueOf()||!isValidUuid(r))throw Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof r)throw Error(`${t} with value ${r} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof r;if(!("string"===e||"function"==typeof r.pipe||"function"==typeof r.tee||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||("function"==typeof Blob||"object"==typeof Blob)&&r instanceof Blob||"function"===e))throw Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.")}return r}function serializeEnumType(e,t,r){if(!t)throw Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r)))throw Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return r}function serializeByteArrayType(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw Error(e+" must be of type Uint8Array.");t=encodeByteArray(t)}return t}function serializeBase64UrlType(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw Error(e+" must be of type Uint8Array.");t=bufferToBase64Url(t)}return t}function serializeDateTypes(e,t,r){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw 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(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw 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(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw 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(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw 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(null!==e.match(/^TimeSpan$/i)&&!isDuration(t))throw Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`);return t}function serializeSequenceType(e,t,r,i,n,a){var o;if(!Array.isArray(r))throw Error(i+" must be of type Array.");let s=t.type.element;if(!s||"object"!=typeof s)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}.`);"Composite"===s.type.name&&s.type.className&&(s=null!==(o=e.modelMappers[s.type.className])&&void 0!==o?o:s);const l=[];for(let c=0;r.length>c;c++){const t=e.serialize(s,r[c],i,a);if(n&&s.xmlNamespace){const e=s.xmlNamespacePrefix?"xmlns:"+s.xmlNamespacePrefix:"xmlns";"Composite"===s.type.name?(l[c]=Object.assign({},t),l[c][XML_ATTRKEY$1]={[e]:s.xmlNamespace}):(l[c]={},l[c][a.xml.xmlCharKey]=t,l[c][XML_ATTRKEY$1]={[e]:s.xmlNamespace})}else l[c]=t}return l}function serializeDictionaryType(e,t,r,i,n,a){if("object"!=typeof r)throw Error(i+" must be of type object.");const o=t.type.value;if(!o||"object"!=typeof o)throw Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}.`);const s={};for(const l of Object.keys(r)){const t=e.serialize(o,r[l],i,a);s[l]=getXmlObjectValue(o,t,n,a)}if(n&&t.xmlNamespace){const e=t.xmlNamespacePrefix?"xmlns:"+t.xmlNamespacePrefix:"xmlns",r=s;return r[XML_ATTRKEY$1]={[e]:t.xmlNamespace},r}return s}function resolveAdditionalProperties(e,t,r){const i=t.type.additionalProperties;if(!i&&t.type.className){const i=resolveReferencedMapper(e,t,r);return null==i?void 0:i.type.additionalProperties}return i}function resolveReferencedMapper(e,t,r){const i=t.type.className;if(!i)throw Error(`Class name for model "${r}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[i]}function resolveModelProperties(e,t,r){let i=t.type.modelProperties;if(!i){const n=resolveReferencedMapper(e,t,r);if(!n)throw Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(i=null==n?void 0:n.type.modelProperties,!i)throw Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(n)}" of type "${t.type.className}" for object "${r}".`)}return i}function serializeCompositeType(e,t,r,i,n,a){if(getPolymorphicDiscriminatorRecursively(e,t)&&(t=getPolymorphicMapper(e,t,r,"clientName")),null!=r){const o={},s=resolveModelProperties(e,t,i);for(const c of Object.keys(s)){const l=s[c];if(l.readOnly)continue;let m,d=o;if(e.isXML)m=l.xmlIsWrapped?l.xmlName:l.xmlElementName||l.xmlName;else{const e=splitSerializeName(l.serializedName);m=e.pop();for(const t of e){null!=d[t]||null==r[c]&&void 0===l.defaultValue||(d[t]={}),d=d[t]}}if(null!=d){if(n&&t.xmlNamespace){const e=t.xmlNamespacePrefix?"xmlns:"+t.xmlNamespacePrefix:"xmlns";d[XML_ATTRKEY$1]=Object.assign(Object.assign({},d[XML_ATTRKEY$1]),{[e]:t.xmlNamespace})}const o=""!==l.serializedName?i+"."+l.serializedName:i;let s=r[c];const p=getPolymorphicDiscriminatorRecursively(e,t);p&&p.clientName===c&&null==s&&(s=t.serializedName);const u=e.serialize(l,s,o,a);if(void 0!==u&&null!=m){const e=getXmlObjectValue(l,u,n,a);n&&l.xmlIsAttribute?(d[XML_ATTRKEY$1]=d[XML_ATTRKEY$1]||{},d[XML_ATTRKEY$1][m]=u):d[m]=n&&l.xmlIsWrapped?{[l.xmlElementName]:e}:e}}}const l=resolveAdditionalProperties(e,t,i);if(l){const t=Object.keys(s);for(const n in r)t.every((e=>e!==n))&&(o[n]=e.serialize(l,r[n],i+'["'+n+'"]',a))}return o}return r}function getXmlObjectValue(e,t,r,i){if(!r||!e.xmlNamespace)return t;const n=e.xmlNamespacePrefix?"xmlns:"+e.xmlNamespacePrefix:"xmlns",a={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[XML_ATTRKEY$1])return t;{const e=Object.assign({},t);return e[XML_ATTRKEY$1]=a,e}}const o={};return o[i.xml.xmlCharKey]=t,o[XML_ATTRKEY$1]=a,o}function isSpecialXmlProperty(e,t){return[XML_ATTRKEY$1,t.xml.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,r,i,n){var a,o;const s=null!==(a=n.xml.xmlCharKey)&&void 0!==a?a:XML_CHARKEY$1;getPolymorphicDiscriminatorRecursively(e,t)&&(t=getPolymorphicMapper(e,t,r,"serializedName"));const l=resolveModelProperties(e,t,i);let c={};const m=[];for(const p of Object.keys(l)){const a=l[p],d=splitSerializeName(l[p].serializedName);m.push(d[0]);const{serializedName:u,xmlName:h,xmlElementName:g}=a;let y=i;""!==u&&void 0!==u&&(y=i+"."+u);const f=a.headerCollectionPrefix;if(f){const t={};for(const i of Object.keys(r))i.startsWith(f)&&(t[i.substring(f.length)]=e.deserialize(a.type.value,r[i],y,n)),m.push(i);c[p]=t}else if(e.isXML)if(a.xmlIsAttribute&&r[XML_ATTRKEY$1])c[p]=e.deserialize(a,r[XML_ATTRKEY$1][h],y,n);else if(a.xmlIsMsText)void 0!==r[s]?c[p]=r[s]:"string"==typeof r&&(c[p]=r);else{const t=g||h||u;if(a.xmlIsWrapped){const t=r[h],i=null!==(o=null==t?void 0:t[g])&&void 0!==o?o:[];c[p]=e.deserialize(a,i,y,n),m.push(h)}else c[p]=e.deserialize(a,r[t],y,n),m.push(t)}else{let i,o=r,s=0;for(const e of d){if(!o)break;s++,o=o[e]}null===o&&d.length>s&&(o=void 0),i=o;const m=t.type.polymorphicDiscriminator;let u;if(m&&p===m.clientName&&null==i&&(i=t.serializedName),Array.isArray(r[p])&&""===l[p].serializedName){i=r[p];const t=e.deserialize(a,i,y,n);for(const[e,r]of Object.entries(c))({}).hasOwnProperty.call(t,e)||(t[e]=r);c=t}else void 0===i&&void 0===a.defaultValue||(u=e.deserialize(a,i,y,n),c[p]=u)}}const d=t.type.additionalProperties;if(d){const t=e=>{for(const t in l)if(splitSerializeName(l[t].serializedName)[0]===e)return!1;return!0};for(const a in r)t(a)&&(c[a]=e.deserialize(d,r[a],i+'["'+a+'"]',n))}else if(r&&!n.ignoreUnknownProperties)for(const p of Object.keys(r))void 0!==c[p]||m.includes(p)||isSpecialXmlProperty(p,n)||(c[p]=r[p]);return c}function deserializeDictionaryType(e,t,r,i,n){const a=t.type.value;if(!a||"object"!=typeof a)throw 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 o of Object.keys(r))t[o]=e.deserialize(a,r[o],i,n);return t}return r}function deserializeSequenceType(e,t,r,i,n){var a;let o=t.type.element;if(!o||"object"!=typeof o)throw Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+i);if(r){Array.isArray(r)||(r=[r]),"Composite"===o.type.name&&o.type.className&&(o=null!==(a=e.modelMappers[o.type.className])&&void 0!==a?a:o);const t=[];for(let a=0;r.length>a;a++)t[a]=e.deserialize(o,r[a],`${i}[${a}]`,n);return t}return r}function getIndexDiscriminator(e,t,r){const i=[r];for(;i.length;){const r=i.shift(),n=t===r?t:r+"."+t;if({}.hasOwnProperty.call(e,n))return e[n];for(const[t,a]of Object.entries(e))t.startsWith(r+".")&&a.type.uberParent===r&&a.type.className&&i.push(a.type.className)}}function getPolymorphicMapper(e,t,r,i){var n;const a=getPolymorphicDiscriminatorRecursively(e,t);if(a){let o=a[i];if(o){"serializedName"===i&&(o=o.replace(/\\/gi,""));const a=r[o],s=null!==(n=t.type.uberParent)&&void 0!==n?n:t.type.className;if("string"==typeof a&&s){const r=getIndexDiscriminator(e.modelMappers.discriminators,a,s);r&&(t=r)}}}return t}function getPolymorphicDiscriminatorRecursively(e,t){return t.type.polymorphicDiscriminator||getPolymorphicDiscriminatorSafely(e,t.type.uberParent)||getPolymorphicDiscriminatorSafely(e,t.type.className)}function getPolymorphicDiscriminatorSafely(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}function getOperationArgumentValueFromParameter(e,t,r){let i=t.parameterPath;const n=t.mapper;let a;if("string"==typeof i&&(i=[i]),Array.isArray(i)){if(i.length>0)if(n.isConstant)a=n.defaultValue;else{let t=getPropertyFromParameterPath(e,i);!t.propertyFound&&r&&(t=getPropertyFromParameterPath(r,i));let o=!1;t.propertyFound||(o=n.required||"options"===i[0]&&2===i.length),a=o?n.defaultValue:t.propertyValue}}else{n.required&&(a={});for(const t in i){const o=getOperationArgumentValueFromParameter(e,{parameterPath:i[t],mapper:n.type.modelProperties[t]},r);void 0!==o&&(a||(a={}),a[t]=o)}}return a}function getPropertyFromParameterPath(e,t){const r={propertyFound:!1};let i=0;for(;t.length>i;++i){const r=t[i];if(!e||!(r in e))break;e=e[r]}return i===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}function hasOriginalRequest(e){return originalRequestSymbol$1 in e}function getOperationRequestInfo(e){if(hasOriginalRequest(e))return getOperationRequestInfo(e[originalRequestSymbol$1]);let t=state.operationRequestMap.get(e);return t||(t={},state.operationRequestMap.set(e,t)),t}function deserializationPolicy(e={}){var t,r,i,n,a,o,s;const l=null!==(r=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==r?r:defaultJsonContentTypes,c=null!==(n=null===(i=e.expectedContentTypes)||void 0===i?void 0:i.xml)&&void 0!==n?n:defaultXmlContentTypes,m=e.parseXML,d=e.serializerOptions,p={xml:{rootName:null!==(a=null==d?void 0:d.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==d?void 0:d.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==d?void 0:d.xml.xmlCharKey)&&void 0!==s?s:XML_CHARKEY$1}};return{name:deserializationPolicyName,async sendRequest(e,t){const r=await t(e);return deserializeResponseBody(l,c,r,p,m)}}}function getOperationResponseMap(e){let t;const r=getOperationRequestInfo(e.request),i=null==r?void 0:r.operationSpec;return i&&(t=(null==r?void 0:r.operationResponseGetter)?null==r?void 0:r.operationResponseGetter(i,e):i.responses[e.status]),t}function shouldDeserializeResponse(e){const t=getOperationRequestInfo(e.request),r=null==t?void 0:t.shouldDeserialize;let i;return i=void 0===r||("boolean"==typeof r?r:r(e)),i}async function deserializeResponseBody(e,t,r,i,n){const a=await parse$1(e,t,r,i,n);if(!shouldDeserializeResponse(a))return a;const o=getOperationRequestInfo(a.request),s=null==o?void 0:o.operationSpec;if(!s||!s.responses)return a;const l=getOperationResponseMap(a),{error:c,shouldReturnResponse:m}=handleErrorResponse(a,s,l,i);if(c)throw c;if(m)return a;if(l){if(l.bodyMapper){let e=a.parsedBody;s.isXML&&l.bodyMapper.type.name===MapperTypeNames.Sequence&&(e="object"==typeof e?e[l.bodyMapper.xmlElementName]:[]);try{a.parsedBody=s.serializer.deserialize(l.bodyMapper,e,"operationRes.parsedBody",i)}catch(d){throw new RestError(`Error ${d} occurred in deserializing the responseBody - ${a.bodyAsText}`,{statusCode:a.status,request:a.request,response:a})}}else"HEAD"===s.httpMethod&&(a.parsedBody=r.status>=200&&300>r.status);l.headersMapper&&(a.parsedHeaders=s.serializer.deserialize(l.headersMapper,a.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return a}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}function handleErrorResponse(e,t,r,i){var n;const a=e.status>=200&&300>e.status;if(isOperationSpecEmpty(t)?a:r){if(!r)return{error:null,shouldReturnResponse:!1};if(!r.isError)return{error:null,shouldReturnResponse:!1}}const o=null!=r?r:t.responses.default,s=(null===(n=e.request.streamResponseStatusCodes)||void 0===n?void 0:n.has(e.status))?"Unexpected status code: "+e.status:e.bodyAsText,l=new RestError(s,{statusCode:e.status,request:e.request,response:e});if(!o)throw l;const c=o.bodyMapper,m=o.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let n;if(c){let e=r;if(t.isXML&&c.type.name===MapperTypeNames.Sequence){e=[];const t=c.xmlElementName;"object"==typeof r&&t&&(e=r[t])}n=t.serializer.deserialize(c,e,"error.response.parsedBody",i)}const a=r.error||n||r;l.code=a.code,a.message&&(l.message=a.message),c&&(l.response.parsedBody=n)}e.headers&&m&&(l.response.parsedHeaders=t.serializer.deserialize(m,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(d){l.message=`Error "${d.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}async function parse$1(e,t,r,i,n){var a;if(!(null===(a=r.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(r.status))&&r.bodyAsText){const a=r.bodyAsText,s=r.headers.get("Content-Type")||"",l=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===l.length||l.some((t=>-1!==e.indexOf(t))))return r.parsedBody=JSON.parse(a),r;if(l.some((e=>-1!==t.indexOf(e)))){if(!n)throw Error("Parsing XML not supported.");const e=await n(a,i.xml);return r.parsedBody=e,r}}catch(o){throw new RestError(`Error "${o}" occurred while parsing the response body - ${r.bodyAsText}.`,{code:o.code||RestError.PARSE_ERROR,statusCode:r.status,request:r.request,response:r})}}return r}function getStreamingResponseStatusCodes(e){const t=new Set;for(const r in e.responses){const i=e.responses[r];i.bodyMapper&&i.bodyMapper.type.name===MapperTypeNames.Stream&&t.add(+r)}return t}function getPathStringFromParameter(e){const{parameterPath:t,mapper:r}=e;let i;return i="string"==typeof t?t:Array.isArray(t)?t.join("."):r.serializedName,i}function serializationPolicy(e={}){const t=e.stringifyXML;return{name:serializationPolicyName,async sendRequest(e,r){const i=getOperationRequestInfo(e),n=null==i?void 0:i.operationSpec,a=null==i?void 0:i.operationArguments;return n&&a&&(serializeHeaders(e,a,n),serializeRequestBody(e,a,n,t)),r(e)}}}function serializeHeaders(e,t,r){var i,n;if(r.headerParameters)for(const o of r.headerParameters){let i=getOperationArgumentValueFromParameter(t,o);if(null!=i||o.mapper.required){i=r.serializer.serialize(o.mapper,i,getPathStringFromParameter(o));const t=o.mapper.headerCollectionPrefix;if(t)for(const r of Object.keys(i))e.headers.set(t+r,i[r]);else e.headers.set(o.mapper.serializedName||getPathStringFromParameter(o),i)}}const a=null===(n=null===(i=t.options)||void 0===i?void 0:i.requestOptions)||void 0===n?void 0:n.customHeaders;if(a)for(const o of Object.keys(a))e.headers.set(o,a[o])}function serializeRequestBody(e,t,r,i=function(){throw Error("XML serialization unsupported!")}){var n,a,o,s,l;const c=null===(n=t.options)||void 0===n?void 0:n.serializerOptions,m={xml:{rootName:null!==(a=null==c?void 0:c.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==c?void 0:c.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==c?void 0:c.xml.xmlCharKey)&&void 0!==s?s:XML_CHARKEY$1}},d=m.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){e.body=getOperationArgumentValueFromParameter(t,r.requestBody);const n=r.requestBody.mapper,{required:a,serializedName:o,xmlName:s,xmlElementName:c,xmlNamespace:u,xmlNamespacePrefix:h,nullable:g}=n,y=n.type.name;try{if(null!=e.body||g&&null===e.body||a){const t=getPathStringFromParameter(r.requestBody);e.body=r.serializer.serialize(n,e.body,t,m);const a=y===MapperTypeNames.Stream;if(r.isXML){const t=h?"xmlns:"+h:"xmlns",r=getXmlValueWithNamespace(u,t,y,e.body,m);y===MapperTypeNames.Sequence?e.body=i(prepareXMLRootList(r,c||s||o,t,u),{rootName:s||o,xmlCharKey:d}):a||(e.body=i(r,{rootName:s||o,xmlCharKey:d}))}else{if(y===MapperTypeNames.String&&((null===(l=r.contentType)||void 0===l?void 0:l.match("text/plain"))||"text"===r.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(p){throw Error(`Error "${p.message}" occurred in serializing the payload - ${JSON.stringify(o,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){e.formData={};for(const i of r.formDataParameters){const n=getOperationArgumentValueFromParameter(t,i);if(null!=n){const t=i.mapper.serializedName||getPathStringFromParameter(i);e.formData[t]=r.serializer.serialize(i.mapper,n,getPathStringFromParameter(i),m)}}}}function getXmlValueWithNamespace(e,t,r,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){const r={};return r[n.xml.xmlCharKey]=i,r[XML_ATTRKEY$1]={[t]:e},r}return i}function prepareXMLRootList(e,t,r,i){if(Array.isArray(e)||(e=[e]),!r||!i)return{[t]:e};const n={[t]:e};return n[XML_ATTRKEY$1]={[r]:i},n}function createClientPipeline(e={}){const t=createPipelineFromOptions(null!=e?e:{});return e.credentialOptions&&t.addPolicy(bearerTokenAuthenticationPolicy({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(serializationPolicy(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(deserializationPolicy(e.deserializationOptions),{phase:"Deserialize"}),t}function getCachedDefaultHttpClient$1(){return cachedHttpClient||(cachedHttpClient=createDefaultHttpClient()),cachedHttpClient}function getRequestUrl(e,t,r,i){const n=calculateUrlReplacements(t,r,i);let a=!1,o=replaceAll(e,n);if(t.path){let e=replaceAll(t.path,n);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),isAbsoluteUrl(e)?(o=e,a=!0):o=appendPath(o,e)}const{queryParams:s,sequenceParams:l}=calculateQueryParameters(t,r,i);return o=appendQueryParams(o,s,l,a),o}function replaceAll(e,t){let r=e;for(const[i,n]of t)r=r.split(i).join(n);return r}function calculateUrlReplacements(e,t,r){var i;const n=new Map;if(null===(i=e.urlParameters)||void 0===i?void 0:i.length)for(const a of e.urlParameters){let i=getOperationArgumentValueFromParameter(t,a,r);const o=getPathStringFromParameter(a);i=e.serializer.serialize(a.mapper,i,o),a.skipEncoding||(i=encodeURIComponent(i)),n.set(`{${a.mapper.serializedName||o}}`,i)}return n}function isAbsoluteUrl(e){return e.includes("://")}function appendPath(e,t){if(!t)return e;const r=new URL(e);let i=r.pathname;i.endsWith("/")||(i+="/"),t.startsWith("/")&&(t=t.substring(1));const n=t.indexOf("?");if(-1!==n){const e=t.substring(0,n),a=t.substring(n+1);i+=e,a&&(r.search=r.search?`${r.search}&${a}`:a)}else i+=t;return r.pathname=i,""+r}function calculateQueryParameters(e,t,r){var i;const n=new Map,a=new Set;if(null===(i=e.queryParameters)||void 0===i?void 0:i.length)for(const o of e.queryParameters){"Sequence"===o.mapper.type.name&&o.mapper.serializedName&&a.add(o.mapper.serializedName);let i=getOperationArgumentValueFromParameter(t,o,r);if(null!=i||o.mapper.required){i=e.serializer.serialize(o.mapper,i,getPathStringFromParameter(o));const t=o.collectionFormat?CollectionFormatToDelimiterMap[o.collectionFormat]:"";if(Array.isArray(i)&&(i=i.map((e=>null==e?"":e))),"Multi"===o.collectionFormat&&0===i.length)continue;!Array.isArray(i)||"SSV"!==o.collectionFormat&&"TSV"!==o.collectionFormat||(i=i.join(t)),o.skipEncoding||(i=Array.isArray(i)?i.map((e=>encodeURIComponent(e))):encodeURIComponent(i)),!Array.isArray(i)||"CSV"!==o.collectionFormat&&"Pipes"!==o.collectionFormat||(i=i.join(t)),n.set(o.mapper.serializedName||getPathStringFromParameter(o),i)}}return{queryParams:n,sequenceParams:a}}function simpleParseQueryParams(e){const t=new Map;if(!e||"?"!==e[0])return t;const r=(e=e.slice(1)).split("&");for(const i of r){const[e,r]=i.split("=",2),n=t.get(e);n?Array.isArray(n)?n.push(r):t.set(e,[n,r]):t.set(e,r)}return t}function appendQueryParams(e,t,r,i=!1){if(0===t.size)return e;const n=new URL(e),a=simpleParseQueryParams(n.search);for(const[s,l]of t){const e=a.get(s);if(Array.isArray(e))if(Array.isArray(l)){e.push(...l);const t=new Set(e);a.set(s,Array.from(t))}else e.push(l);else e?(Array.isArray(l)?l.unshift(e):r.has(s)&&a.set(s,[e,l]),i||a.set(s,l)):a.set(s,l)}const o=[];for(const[s,l]of a)if("string"==typeof l)o.push(`${s}=${l}`);else if(Array.isArray(l))for(const e of l)o.push(`${s}=${e}`);else o.push(`${s}=${l}`);return n.search=o.length?"?"+o.join("&"):"",""+n}function createDefaultPipeline(e){const t=getCredentialScopes(e),r=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return createClientPipeline(Object.assign(Object.assign({},e),{credentialOptions:r}))}function getCredentialScopes(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return e.endpoint+"/.default";if(e.baseUri)return e.baseUri+"/.default";if(e.credential&&!e.credentialScopes)throw Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}function isUuid(e){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e)}function extractTenantId(e){const t=new URL(e.authorization_uri).pathname.split("/")[1];if(t&&isUuid(t))return t}function buildScopes(e,t){if(!t.resource_id)return e.scopes;const r=new URL(t.resource_id);r.pathname=Constants.DefaultScope;let i=""+r;return"https://disk.azure.com/.default"===i&&(i="https://disk.azure.com//.default"),[i]}function getChallenge(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}function parseChallenge(e){return(e.slice(7).trim()+" ").split(" ").filter((e=>e)).map((e=>(([e,t])=>({[e]:t}))(e.trim().split("=")))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}function requestToOptions(e){return{abortSignal:e.abortSignal,requestOptions:{timeout:e.timeout},tracingOptions:e.tracingOptions}}function toPipelineRequest(e,t={}){const r=e[originalRequestSymbol],i=createHttpHeaders(e.headers.toJson({preserveCase:!0}));if(r)return r.headers=i,r;{const r=createPipelineRequest({url:e.url,method:e.method,headers:i,withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,disableKeepAlive:!!e.keepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes});return t.originalRequest&&(r[originalClientRequestSymbol]=t.originalRequest),r}}function toWebResourceLike(e,t){var r;const i=null!==(r=null==t?void 0:t.originalRequest)&&void 0!==r?r:e,n={url:e.url,method:e.method,headers:toHttpHeadersLike(e.headers),withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.headers.get("x-ms-client-request-id")||e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,keepAlive:!!e.disableKeepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,clone(){throw Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return(null==t?void 0:t.createProxy)?new Proxy(n,{get:(t,r,a)=>r===originalRequestSymbol?e:"clone"===r?()=>toWebResourceLike(toPipelineRequest(n,{originalRequest:i}),{createProxy:!0,originalRequest:i}):Reflect.get(t,r,a),set:(t,r,i,n)=>("keepAlive"===r&&(e.disableKeepAlive=!i),"string"==typeof r&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes"].includes(r)&&(e[r]=i),Reflect.set(t,r,i,n))}):n}function toHttpHeadersLike(e){return new HttpHeaders(e.toJSON({preserveCase:!0}))}function getHeaderKey(e){return e.toLowerCase()}function toCompatResponse(e,t){let r=toWebResourceLike(e.request),i=toHttpHeadersLike(e.headers);return(null==t?void 0:t.createProxy)?new Proxy(e,{get:(t,n,a)=>"headers"===n?i:"request"===n?r:n===originalResponse?e:Reflect.get(t,n,a),set:(e,t,n,a)=>("headers"===t?i=n:"request"===t&&(r=n),Reflect.set(e,t,n,a))}):Object.assign(Object.assign({},e),{request:r,headers:i})}function toPipelineResponse(e){const t=e[originalResponse],r=createHttpHeaders(e.headers.toJson({preserveCase:!0}));return t?(t.headers=r,t):Object.assign(Object.assign({},e),{headers:r,request:toPipelineRequest(e.request)})}function createRequestPolicyFactoryPolicy(e){const t=e.slice().reverse();return{name:requestPolicyFactoryPolicyName,async sendRequest(e,r){let i={sendRequest:async e=>toCompatResponse(await r(toPipelineRequest(e)),{createProxy:!0})};for(const a of t)i=a.create(i,mockRequestPolicyOptions);const n=toWebResourceLike(e,{createProxy:!0});return toPipelineResponse(await i.sendRequest(n))}}}function convertHttpClient(e){return{sendRequest:async t=>toPipelineResponse(await e.sendRequest(toWebResourceLike(t,{createProxy:!0})))}}function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;e.length>t;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(r,t-r);if(t>5&&"xml"===i)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;e.length>t;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;e.length>t;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;e.length>t;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}function readAttributeStr(e,t){let r="",i="",n=!1;for(;e.length>t;t++){if(e[t]===doubleQuote||e[t]===singleQuote)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){n=!0;break}r+=e[t]}return""===i&&{value:r,index:t,tagClosed:n}}function validateAttributeString(e,t){const r=util$3.getAllMatches(e,validAttrStrRegxp),i={};for(let n=0;r.length>n;n++){if(0===r[n][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",getPositionFromMatch(r[n]));if(void 0!==r[n][3]&&void 0===r[n][4])return getErrorObject("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",getPositionFromMatch(r[n]));if(void 0===r[n][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",getPositionFromMatch(r[n]));const e=r[n][2];if(!validateAttrName(e))return getErrorObject("InvalidAttr","Attribute '"+e+"' is an invalid name.",getPositionFromMatch(r[n]));if(i.hasOwnProperty(e))return getErrorObject("InvalidAttr","Attribute '"+e+"' is repeated.",getPositionFromMatch(r[n]));i[e]=1}return!0}function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);e.length>t;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return validateNumberAmpersand(e,++t);let r=0;for(;e.length>t;t++,r++)if(!e[t].match(/\w/)||r>=20){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return util$3.isName(e)}function validateTagName(e){return util$3.isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}function readDocType$1(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,n=!1,a=!1,o="";for(;e.length>t;t++)if("<"!==e[t]||a)if(">"===e[t]){if(a?"-"===e[t-1]&&"-"===e[t-2]&&(a=!1,i--):i--,0===i)break}else"["===e[t]?n=!0:o+=e[t];else{if(n&&isEntity(e,t))t+=7,[entityName,val,t]=readEntityExp(e,t+1),-1===val.indexOf("&")&&(r[validateEntityName(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(n&&isElement(e,t))t+=8;else if(n&&isAttlist(e,t))t+=8;else if(n&&isNotation(e,t))t+=9;else{if(!isComment)throw Error("Invalid DOCTYPE");a=!0}i++,o=""}if(0!==i)throw Error("Unclosed DOCTYPE")}return{entities:r,i:t}}function readEntityExp(e,t){let r="";for(;e.length>t&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw Error("External entites are not supported");const i=e[t++];let n="";for(;e.length>t&&e[t]!==i;t++)n+=e[t];return[r,n,t]}function isComment(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function isEntity(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function isElement(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function isAttlist(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function isNotation(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function validateEntityName(e){if(util$2.isName(e))return e;throw Error("Invalid entity name "+e)}function toNumber$1(e,t={}){if(t=Object.assign({},consider,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&hexRegex.test(r))return Number.parseInt(r,16);{const i=numRegex.exec(r);if(i){const n=i[1],a=i[2];let o=trimZeros(i[3]);const s=i[4]||i[6];if(!t.leadingZeros&&a.length>0&&n&&"."!==r[2])return e;if(t.leadingZeros||0>=a.length||n||"."===r[1]){const i=+r,l=""+i;return-1!==l.search(/[eE]/)||s?t.eNotation?i:e:-1!==r.indexOf(".")?"0"===l&&""===o||l===o||n&&l==="-"+o?i:e:a?o===l||n+o===l?i:e:r===l||r===n+l?i:e}return e}return e}}function trimZeros(e){return e&&-1!==e.indexOf(".")?("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e):e}function getIgnoreAttributesFn$2(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}function addExternalEntities(e){const t=Object.keys(e);for(let r=0;t.length>r;r++){const i=t[r];this.lastEntities[i]={regex:RegExp("&"+i+";","g"),val:e[i]}}}function parseTextData(e,t,r,i,n,a,o){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,r,n,a);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}function buildAttributesMap(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const r=util$1.getAllMatches(e,attrsRegx),i=r.length,n={};for(let e=0;i>e;e++){const i=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(i,t))continue;let a=r[e][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==a){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const e=this.options.attributeValueProcessor(i,a,t);n[o]=null==e?a:typeof e!=typeof a||e!==a?e:parseValue(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(n[o]=!0)}if(!Object.keys(n).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=n,e}return n}}function addChild(e,t,r){const i=this.options.updateTag(t.tagname,r,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}function saveTextToParentTag(e,t,r,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r){const i="*."+r;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function tagExpWithClosingIndex(e,t,r=">"){let i,n="";for(let a=t;e.length>a;a++){let t=e[a];if(i)t===i&&(i="");else if('"'===t||"'"===t)i=t;else if(t===r[0]){if(!r[1])return{data:n,index:a};if(e[a+1]===r[1])return{data:n,index:a}}else"\t"===t&&(t=" ");n+=t}}function findClosingIndex(e,t,r,i){const n=e.indexOf(t,r);if(-1===n)throw Error(i);return n+t.length-1}function readTagExp(e,t,r,i=">"){const n=tagExpWithClosingIndex(e,t+1,i);if(!n)return;let a=n.data;const o=n.index,s=a.search(/\s/);let l=a,c=!0;-1!==s&&(l=a.substring(0,s),a=a.substring(s+1).trimStart());const m=l;if(r){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),c=l!==n.data.substr(e+1))}return{tagName:l,tagExp:a,closeIndex:o,attrExpPresent:c,rawTagName:m}}function readStopNodeData(e,t,r){const i=r;let n=1;for(;e.length>r;r++)if("<"===e[r])if("/"===e[r+1]){const a=findClosingIndex(e,">",r,t+" is not closed");if(e.substring(r+2,a).trim()===t&&(n--,0===n))return{tagContent:e.substring(i,r),i:a};r=a}else if("?"===e[r+1])r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2;else{const i=readTagExp(e,r,">");i&&((i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&n++,r=i.closeIndex)}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&toNumber(e,r)}return util$1.isExist(e)?e:""}function prettify$1(e,t){return compress(e,t)}function compress(e,t,r){let i;const n={};for(let a=0;e.length>a;a++){const o=e[a],s=propName$1(o);let l="";if(l=void 0===r?s:r+"."+s,s===t.textNodeName)void 0===i?i=o[s]:i+=""+o[s];else{if(void 0===s)continue;if(o[s]){let e=compress(o[s],t,l);const r=isLeafTag(e,t);o[":@"]?assignAttributes(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==n[s]&&n.hasOwnProperty(s)?(Array.isArray(n[s])||(n[s]=[n[s]]),n[s].push(e)):n[s]=t.isArray(s,l,r)?[e]:e}}}return"string"==typeof i?i.length>0&&(n[t.textNodeName]=i):void 0!==i&&(n[t.textNodeName]=i),n}function propName$1(e){const t=Object.keys(e);for(let r=0;t.length>r;r++){const e=t[r];if(":@"!==e)return e}}function assignAttributes(e,t,r,i){if(t){const n=Object.keys(t),a=n.length;for(let o=0;a>o;o++){const a=n[o];e[a]=i.isArray(a,r+"."+a,!0,!0)?[t[a]]:t[a]}}}function isLeafTag(e,t){const{textNodeName:r}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r=EOL),arrToStr(e,t,"",r)}function arrToStr(e,t,r,i){let n="",a=!1;for(let o=0;e.length>o;o++){const s=e[o],l=propName(s);if(void 0===l)continue;let c="";if(c=0===r.length?l:`${r}.${l}`,l===t.textNodeName){let e=s[l];isStopNode(c,t)||(e=t.tagValueProcessor(l,e),e=replaceEntitiesValue(e,t)),a&&(n+=i),n+=e,a=!1;continue}if(l===t.cdataPropName){a&&(n+=i),n+=`<![CDATA[${s[l][0][t.textNodeName]}]]>`,a=!1;continue}if(l===t.commentPropName){n+=i+`\x3c!--${s[l][0][t.textNodeName]}--\x3e`,a=!0;continue}if("?"===l[0]){const e=attr_to_str(s[":@"],t);let r=s[l][0][t.textNodeName];r=0!==r.length?" "+r:"",n+=("?xml"===l?"":i)+`<${l}${r}${e}?>`,a=!0;continue}let m=i;""!==m&&(m+=t.indentBy);const d=i+`<${l}${attr_to_str(s[":@"],t)}`,p=arrToStr(s[l],t,c,m);-1!==t.unpairedTags.indexOf(l)?n+=t.suppressUnpairedNode?d+">":d+"/>":p&&0!==p.length||!t.suppressEmptyNode?p&&p.endsWith(">")?n+=d+`>${p}${i}</${l}>`:(n+=d+">",p&&""!==i&&(p.includes("/>")||p.includes("</"))?n+=i+t.indentBy+p+i:n+=p,n+=`</${l}>`):n+=d+"/>",a=!0}return n}function propName(e){const t=Object.keys(e);for(let r=0;t.length>r;r++){const i=t[r];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let n=t.attributeValueProcessor(i,e[i]);n=replaceEntitiesValue(n,t),r+=!0===n&&t.suppressBooleanAttributes?" "+i.substr(t.attributeNamePrefix.length):` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+r)return!0;return!1}function replaceEntitiesValue(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;t.entities.length>r;r++){const i=t.entities[r];e=e.replace(i.regex,i.val)}return e}function Builder(e){this.options=Object.assign({},defaultOptions,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function processTextOrObjNode(e,t,r,i){const n=this.j2x(e,r+1,i.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}function getCommonOptions(e){var t;return{attributesGroupName:XML_ATTRKEY,textNodeName:null!==(t=e.xmlCharKey)&&void 0!==t?t:XML_CHARKEY,ignoreAttributes:!1,suppressBooleanAttributes:!1}}function getSerializerOptions(e={}){var t,r;return Object.assign(Object.assign({},getCommonOptions(e)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:null!==(t=e.rootName)&&void 0!==t?t:"root",cdataPropName:null!==(r=e.cdataPropName)&&void 0!==r?r:"__cdata"})}function getParserOptions(e={}){return Object.assign(Object.assign({},getCommonOptions(e)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:e.stopNodes,processEntities:!0})}function stringifyXML(e,t={}){const r=getSerializerOptions(t);return('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+new fxp.XMLBuilder(r).build({[r.rootNodeName]:e})).replace(/\n/g,"")}async function parseXML(e,t={}){if(!e)throw Error("Document is empty");const r=fxp.XMLValidator.validate(e);if(!0!==r)throw r;const i=new fxp.XMLParser(getParserOptions(t)).parse(e);if(i["?xml"]&&delete i["?xml"],!t.includeRoot)for(const n of Object.keys(i)){const e=i[n];return"object"==typeof e?Object.assign({},e):e}return i}function abortSignal(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=listenersMap.get(e);t&&t.slice().forEach((t=>{t.call(e,{type:"abort"})})),abortedMap.set(e,!0)}function escapeURLPath(e){const t=new URL(e);let r=t.pathname;return r=r||"/",r=escape(r),t.pathname=r,""+t}function getProxyUriFromDevConnString(e){let t="";if(-1!==e.search("DevelopmentStorageProxyUri=")){const r=e.split(";");for(const e of r)e.trim().startsWith("DevelopmentStorageProxyUri=")&&(t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return t}function getValueInConnString(e,t){const r=e.split(";");for(const i of r)if(i.trim().startsWith(t))return i.trim().match(t+"=(.*)")[1];return""}function extractConnectionStringParts(e){let t="";e.startsWith("UseDevelopmentStorage=true")&&(t=getProxyUriFromDevConnString(e),e=DevelopmentConnectionString);let r=getValueInConnString(e,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,-1!==e.search("DefaultEndpointsProtocol=")&&-1!==e.search("AccountKey=")){let i="",n="",a=Buffer.from("accountKey","base64"),o="";if(n=getValueInConnString(e,"AccountName"),a=Buffer.from(getValueInConnString(e,"AccountKey"),"base64"),!r){i=getValueInConnString(e,"DefaultEndpointsProtocol");const t=i.toLowerCase();if("https"!==t&&"http"!==t)throw Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(o=getValueInConnString(e,"EndpointSuffix"),!o)throw Error("Invalid EndpointSuffix in the provided Connection String");r=`${i}://${n}.blob.${o}`}if(!n)throw Error("Invalid AccountName in the provided Connection String");if(0===a.length)throw Error("Invalid AccountKey in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:n,accountKey:a,proxyUri:t}}{let t=getValueInConnString(e,"SharedAccessSignature"),i=getValueInConnString(e,"AccountName");if(i||(i=getAccountNameFromUrl(r)),!r)throw Error("Invalid BlobEndpoint in the provided SAS Connection String");if(!t)throw Error("Invalid SharedAccessSignature in the provided SAS Connection String");return t.startsWith("?")&&(t=t.substring(1)),{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=new URL(e);let i=r.pathname;return i=i?i.endsWith("/")?`${i}${t}`:`${i}/${t}`:t,r.pathname=i,""+r}function setURLParameter(e,t,r){const i=new URL(e),n=encodeURIComponent(t),a=r?encodeURIComponent(r):void 0,o=""===i.search?"?":i.search,s=[];for(const l of o.slice(1).split("&"))if(l){const[e]=l.split("=",2);e!==n&&s.push(l)}return a&&s.push(`${n}=${a}`),i.search=s.length?"?"+s.join("&"):"",""+i}function getURLParameter(e,t){var r;return null!==(r=new URL(e).searchParams.get(t))&&void 0!==r?r:void 0}function setURLHost(e,t){const r=new URL(e);return r.hostname=t,""+r}function getURLPath(e){try{return new URL(e).pathname}catch(t){return}}function getURLScheme(e){try{const t=new URL(e);return t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol}catch(t){return}}function getURLPathAndQuery(e){const t=new URL(e),r=t.pathname;if(!r)throw new RangeError("Invalid url without valid path.");let i=t.search||"";return i=i.trim(),""!==i&&(i=i.startsWith("?")?i:"?"+i),`${r}${i}`}function getURLQueries(e){let t=new URL(e).search;if(!t)return{};t=t.trim(),t=t.startsWith("?")?t.substring(1):t;let r=t.split("&");r=r.filter((e=>{const t=e.indexOf("="),r=e.lastIndexOf("=");return t>0&&t===r&&e.length-1>r}));const i={};for(const n of r){const e=n.split("=");i[e[0]]=e[1]}return i}function appendToURLQuery(e,t){const r=new URL(e);let i=r.search;return i?i+="&"+t:i=t,r.search=i,""+r}function truncatedISO8061Date(e,t=!0){const r=e.toISOString();return t?r.substring(0,r.length-1)+"0000Z":r.substring(0,r.length-5)+"Z"}function base64encode(e){return isNode?Buffer.from(e).toString("base64"):btoa(e)}function generateBlockID(e,t){return e.length>42&&(e=e.slice(0,42)),base64encode(e+padStart(""+t,48-e.length,"0"))}async function delay(e,t,r){return new Promise(((i,n)=>{let a;const o=()=>{void 0!==a&&clearTimeout(a),n(r)};a=setTimeout((()=>{void 0!==t&&t.removeEventListener("abort",o),i()}),e),void 0!==t&&t.addEventListener("abort",o)}))}function padStart(e,t,r=" "){return"".padStart?e.padStart(t,r):(r=r||" ",e.length>t?e:((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),r.slice(0,t)+e))}function iEqual(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function getAccountNameFromUrl(e){const t=new URL(e);let r;try{return r="blob"===t.hostname.split(".")[1]?t.hostname.split(".")[0]:isIpEndpointStyle(t)?t.pathname.split("/")[1]:"",r}catch(i){throw Error("Unable to extract accountName with provided information.")}}function isIpEndpointStyle(e){return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[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(e.host)||!!e.port&&PathStylePorts.includes(e.port)}function toBlobTagsString(e){if(void 0===e)return;const t=[];for(const r in e)if({}.hasOwnProperty.call(e,r)){const i=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(i)}`)}return t.join("&")}function toBlobTags(e){if(void 0===e)return;const t={blobTagSet:[]};for(const r in e)({}).hasOwnProperty.call(e,r)&&t.blobTagSet.push({key:r,value:e[r]});return t}function toTags(e){if(void 0===e)return;const t={};for(const r of e.blobTagSet)t[r.key]=r.value;return t}function toQuerySerialization(e){if(void 0!==e)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||!1}}};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;if("policy-id"in e)return;const t=[];for(const r in e){const i=r.split("_"),n="or-";i[0].startsWith(n)&&(i[0]=i[0].substring(n.length));const a={ruleId:i[1],replicationStatus:e[r]},o=t.findIndex((e=>e.policyId===i[0]));o>-1?t[o].rules.push(a):t.push({policyId:i[0],rules:[a]})}return t}function httpAuthorizationToString(e){return e?e.scheme+" "+e.value:void 0}function BlobNameToString(e){return e.encoded?decodeURIComponent(e.content):e.content}function ConvertInternalResponseOfListBlobFlat(e){return Object.assign(Object.assign({},e),{segment:{blobItems:e.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)})))}})}function ConvertInternalResponseOfListBlobHierarchy(e){var t;return Object.assign(Object.assign({},e),{segment:{blobPrefixes:null===(t=e.segment.blobPrefixes)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)}))),blobItems:e.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)})))}})}function*ExtractPageRangeInfoItems(e){let t=[],r=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(r=e.clearRange);let i=0,n=0;for(;t.length>i&&r.length>n;)r[n].start>t[i].start?(yield{start:t[i].start,end:t[i].end,isClear:!1},++i):(yield{start:r[n].start,end:r[n].end,isClear:!0},++n);for(;t.length>i;++i)yield{start:t[i].start,end:t[i].end,isClear:!1};for(;r.length>n;++n)yield{start:r[n].start,end:r[n].end,isClear:!0}}function EscapePath(e){const t=e.split("/");for(let r=0;t.length>r;r++)t[r]=encodeURIComponent(t[r]);return t.join("/")}function assertResponse(e){if("_response"in e)return e;throw new TypeError("Unexpected response object "+e)}function compareHeader(e,t){return isLessThan(e,t)?-1:1}function isLessThan(e,t){const r=[table_lv0,table_lv2,table_lv4];let i=0,n=0,a=0;for(;r.length>i;){if(i===r.length-1&&n!==a)return n>a;const o=e.length>n?r[i][e[n].charCodeAt(0)]:1,s=t.length>a?r[i][t[a].charCodeAt(0)]:1;if(1===o&&1===s)n=0,a=0,++i;else if(o===s)++n,++a;else if(0===o)++n;else{if(0!==s)return s>o;++a}}return!1}function getCachedDefaultHttpClient(){return _defaultHttpClient||(_defaultHttpClient=createDefaultHttpClient()),_defaultHttpClient}function storageBrowserPolicy(){return{name:storageBrowserPolicyName,sendRequest:async(e,t)=>(isNode||("GET"!==e.method&&"HEAD"!==e.method||(e.url=setURLParameter(e.url,URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,""+(new Date).getTime())),e.headers.delete(HeaderConstants.COOKIE),e.headers.delete(HeaderConstants.CONTENT_LENGTH)),t(e))}}function storageRetryPolicy(e={}){function t({isPrimaryRetry:e,attempt:t,response:r,error:i}){var n,a;if(t>=m)return logger.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${m}, no further try.`),!1;if(i){for(const e of retriableErrors)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&(""+i.code).toUpperCase()===e)return logger.info(`RetryPolicy: Network error ${e} found, will retry.`),!0;if("PARSE_ERROR"===(null==i?void 0:i.code)&&(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag')))return logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(r||i){const t=null!==(a=null!==(n=null==r?void 0:r.status)&&void 0!==n?n:null==i?void 0:i.statusCode)&&void 0!==a?a:0;if(!e&&404===t)return logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return logger.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!1}function r(e,t){let r=0;if(e)switch(c){case StorageRetryPolicyType.EXPONENTIAL:r=Math.min((Math.pow(2,t-1)-1)*d,p);break;case StorageRetryPolicyType.FIXED:r=d}else r=1e3*Math.random();return logger.info(`RetryPolicy: Delay for ${r}ms`),r}var i,n,a,o,s,l;const c=null!==(i=e.retryPolicyType)&&void 0!==i?i:DEFAULT_RETRY_OPTIONS.retryPolicyType,m=null!==(n=e.maxTries)&&void 0!==n?n:DEFAULT_RETRY_OPTIONS.maxTries,d=null!==(a=e.retryDelayInMs)&&void 0!==a?a:DEFAULT_RETRY_OPTIONS.retryDelayInMs,p=null!==(o=e.maxRetryDelayInMs)&&void 0!==o?o:DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,u=null!==(s=e.secondaryHost)&&void 0!==s?s:DEFAULT_RETRY_OPTIONS.secondaryHost,h=null!==(l=e.tryTimeoutInMs)&&void 0!==l?l:DEFAULT_RETRY_OPTIONS.tryTimeoutInMs;return{name:storageRetryPolicyName,async sendRequest(e,i){h&&(e.url=setURLParameter(e.url,URLConstants.Parameters.TIMEOUT,Math.floor(h/1e3)+""));const n=e.url,a=u?setURLHost(e.url,u):void 0;let o,s,l=!1,c=1,m=!0;for(;m;){const p=l||!a||!["GET","HEAD","OPTIONS"].includes(e.method)||c%2==1;e.url=p?n:a,o=void 0,s=void 0;try{logger.info(`RetryPolicy: =====> Try=${c} ${p?"Primary":"Secondary"}`),o=await i(e),l=l||!p&&404===o.status}catch(d){if(!isRestError(d))throw logger.error("RetryPolicy: Caught error, message: "+getErrorMessage(d)),d;logger.error(`RetryPolicy: Caught error, message: ${d.message}, code: ${d.code}`),s=d}m=t({isPrimaryRetry:p,attempt:c,response:o,error:s}),m&&await delay(r(p,c),e.abortSignal,RETRY_ABORT_ERROR),c++}if(o)return o;throw null!=s?s:new RestError("RetryPolicy failed without known error.")}}}function storageSharedKeyCredentialPolicy(e){function t(e,t){const r=e.headers.get(t);return r?t===HeaderConstants.CONTENT_LENGTH&&"0"===r?"":r:""}return{name:storageSharedKeyCredentialPolicyName,sendRequest:async(r,i)=>(function(r){r.headers.set(HeaderConstants.X_MS_DATE,(new Date).toUTCString()),r.body&&("string"==typeof r.body||Buffer.isBuffer(r.body))&&r.body.length>0&&r.headers.set(HeaderConstants.CONTENT_LENGTH,Buffer.byteLength(r.body));const i=[r.method.toUpperCase(),t(r,HeaderConstants.CONTENT_LANGUAGE),t(r,HeaderConstants.CONTENT_ENCODING),t(r,HeaderConstants.CONTENT_LENGTH),t(r,HeaderConstants.CONTENT_MD5),t(r,HeaderConstants.CONTENT_TYPE),t(r,HeaderConstants.DATE),t(r,HeaderConstants.IF_MODIFIED_SINCE),t(r,HeaderConstants.IF_MATCH),t(r,HeaderConstants.IF_NONE_MATCH),t(r,HeaderConstants.IF_UNMODIFIED_SINCE),t(r,HeaderConstants.RANGE)].join("\n")+"\n"+function(e){let t=[];for(const[i,n]of e.headers)i.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)&&t.push({name:i,value:n});t.sort(((e,t)=>compareHeader(e.name.toLowerCase(),t.name.toLowerCase()))),t=t.filter(((e,t,r)=>0>=t||e.name.toLowerCase()!==r[t-1].name.toLowerCase()));let r="";return t.forEach((e=>{r+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`})),r}(r)+function(t){const r=getURLPath(t.url)||"/";let i="";i+=`/${e.accountName}${r}`;const n=getURLQueries(t.url),a={};if(n){const e=[];for(const t in n)if({}.hasOwnProperty.call(n,t)){const r=t.toLowerCase();a[r]=n[t],e.push(r)}e.sort();for(const t of e)i+=`\n${t}:${decodeURIComponent(a[t])}`}return i}(r),n=createHmac("sha256",e.accountKey).update(i,"utf8").digest("base64");r.headers.set(HeaderConstants.AUTHORIZATION,`SharedKey ${e.accountName}:${n}`)}(r),i(r))}}function storageCorrectContentLengthPolicy(){return{name:storageCorrectContentLengthPolicyName,sendRequest:async(e,t)=>(function(e){e.body&&("string"==typeof e.body||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(HeaderConstants.CONTENT_LENGTH,Buffer.byteLength(e.body))}(e),t(e))}}function isPipelineLike(e){if(!e||"object"!=typeof e)return!1;const t=e;return Array.isArray(t.factories)&&"object"==typeof t.options&&"function"==typeof t.toServiceClientOptions}function newPipeline(e,t={}){e||(e=new AnonymousCredential);const r=new Pipeline([],t);return r._credential=e,r}function processDownlevelPipeline(e){const t=[isAnonymousCredential,isStorageSharedKeyCredential,isCoreHttpBearerTokenFactory,isStorageBrowserPolicyFactory,isStorageRetryPolicyFactory,isStorageTelemetryPolicyFactory,isCoreHttpPolicyFactory];if(e.factories.length){const r=e.factories.filter((e=>!t.some((t=>t(e)))));if(r.length){const e=r.some((e=>isInjectorPolicyFactory(e)));return{wrappedPolicies:createRequestPolicyFactoryPolicy(r),afterRetry:e}}}}function getCoreClientOptions(e){var t;const r=e.options,{httpClient:i}=r,n=__rest(r,["httpClient"]);let a=e._coreHttpClient;a||(a=i?convertHttpClient(i):getCachedDefaultHttpClient(),e._coreHttpClient=a);let o=e._corePipeline;if(!o){const r="azsdk-js-azure-storage-blob/"+SDK_VERSION,i=n.userAgentOptions&&n.userAgentOptions.userAgentPrefix?`${n.userAgentOptions.userAgentPrefix} ${r}`:""+r;o=createClientPipeline(Object.assign(Object.assign({},n),{loggingOptions:{additionalAllowedHeaderNames:StorageBlobLoggingAllowedHeaderNames,additionalAllowedQueryParameters:StorageBlobLoggingAllowedQueryParameters,logger:logger.info},userAgentOptions:{userAgentPrefix:i},serializationOptions:{stringifyXML:stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:parseXML,serializerOptions:{xml:{xmlCharKey:"#"}}}})),o.removePolicy({phase:"Retry"}),o.removePolicy({name:decompressResponsePolicyName}),o.addPolicy(storageCorrectContentLengthPolicy()),o.addPolicy(storageRetryPolicy(n.retryOptions),{phase:"Retry"}),o.addPolicy(storageBrowserPolicy());const a=processDownlevelPipeline(e);a&&o.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);const s=getCredentialFromPipeline(e);isTokenCredential(s)?o.addPolicy(bearerTokenAuthenticationPolicy({credential:s,scopes:null!==(t=n.audience)&&void 0!==t?t:StorageOAuthScopes,challengeCallbacks:{authorizeRequestOnChallenge:authorizeRequestOnTenantChallenge}}),{phase:"Sign"}):s instanceof StorageSharedKeyCredential&&o.addPolicy(storageSharedKeyCredentialPolicy({accountName:s.accountName,accountKey:s.accountKey}),{phase:"Sign"}),e._corePipeline=o}return Object.assign(Object.assign({},n),{allowInsecureConnection:!0,httpClient:a,pipeline:o})}function getCredentialFromPipeline(e){if(e._credential)return e._credential;let t=new AnonymousCredential;for(const r of e.factories)if(isTokenCredential(r.credential))t=r.credential;else if(isStorageSharedKeyCredential(r))return r;return t}function isStorageSharedKeyCredential(e){return e instanceof StorageSharedKeyCredential||"StorageSharedKeyCredential"===e.constructor.name}function isAnonymousCredential(e){return e instanceof AnonymousCredential||"AnonymousCredential"===e.constructor.name}function isCoreHttpBearerTokenFactory(e){return isTokenCredential(e.credential)}function isStorageBrowserPolicyFactory(e){return e instanceof StorageBrowserPolicyFactory||"StorageBrowserPolicyFactory"===e.constructor.name}function isStorageRetryPolicyFactory(e){return e instanceof StorageRetryPolicyFactory||"StorageRetryPolicyFactory"===e.constructor.name}function isStorageTelemetryPolicyFactory(e){return"TelemetryPolicyFactory"===e.constructor.name}function isInjectorPolicyFactory(e){return"InjectorPolicyFactory"===e.constructor.name}function isCoreHttpPolicyFactory(e){const t=e.create({sendRequest:async e=>({request:e,headers:e.headers.clone(),status:500})},{log(e,t){},shouldLog:e=>!1}).constructor.name;return["GenerateClientRequestIdPolicy","TracingPolicy","LogPolicy","ProxyPolicy","DisableResponseDecompressionPolicy","KeepAlivePolicy","DeserializationPolicy"].some((e=>t.startsWith(e)))}function ipRangeToString(e){return e.end?`${e.start}-${e.end}`:e.start}function generateBlobSASQueryParameters(e,t,r){const i=e.version?e.version:SERVICE_VERSION,n=t instanceof StorageSharedKeyCredential?t:void 0;let a;if(void 0===n&&void 0!==r&&(a=new UserDelegationKeyCredential(r,t)),void 0===n&&void 0===a)throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");if(i>="2020-12-06")return void 0!==n?generateBlobSASQueryParameters20201206(e,n):generateBlobSASQueryParametersUDK20201206(e,a);if(i>="2018-11-09")return void 0!==n?generateBlobSASQueryParameters20181109(e,n):"2020-02-10">i?generateBlobSASQueryParametersUDK20181109(e,a):generateBlobSASQueryParametersUDK20200210(e,a);if(i>="2015-04-05"){if(void 0!==n)return generateBlobSASQueryParameters20150405(e,n);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){if(!((e=SASSignatureValuesSanityCheckAndAutofill(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,i="c";e.blobName&&(i="b"),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const n=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",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"),a=t.computeHMACSHA256(n);return new SASQueryParameters(e.version,a,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20181109(e,t){if(!((e=SASSignatureValuesSanityCheckAndAutofill(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,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId)),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const a=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),o=t.computeHMACSHA256(a);return new SASQueryParameters(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function generateBlobSASQueryParameters20201206(e,t){if(!((e=SASSignatureValuesSanityCheckAndAutofill(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,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId)),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const a=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",getCanonicalName(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),o=t.computeHMACSHA256(a);return new SASQueryParameters(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope)}function generateBlobSASQueryParametersUDK20181109(e,t){if(!(e=SASSignatureValuesSanityCheckAndAutofill(e)).permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId)),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const a=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),o=t.computeHMACSHA256(a);return new SASQueryParameters(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}function generateBlobSASQueryParametersUDK20200210(e,t){if(!(e=SASSignatureValuesSanityCheckAndAutofill(e)).permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId)),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const a=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,"",e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),o=t.computeHMACSHA256(a);return new SASQueryParameters(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}function generateBlobSASQueryParametersUDK20201206(e,t){if(!(e=SASSignatureValuesSanityCheckAndAutofill(e)).permissions||!e.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r,i="c",n=e.snapshotTime;e.blobName&&(i="b",e.snapshotTime?i="bs":e.versionId&&(i="bv",n=e.versionId)),e.permissions&&(r=e.blobName?""+BlobSASPermissions.parse(""+e.permissions):""+ContainerSASPermissions.parse(""+e.permissions));const a=[r||"",e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",e.expiresOn?truncatedISO8061Date(e.expiresOn,!1):"",getCanonicalName(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?truncatedISO8061Date(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?truncatedISO8061Date(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,"",e.correlationId,e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",e.version,i,n,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),o=t.computeHMACSHA256(a);return new SASQueryParameters(e.version,o,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,i,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}`];return r&&i.push("/"+r),i.join("")}function SASSignatureValuesSanityCheckAndAutofill(e){const t=e.version?e.version:SERVICE_VERSION;if(e.snapshotTime&&"2018-11-09">t)throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(void 0===e.blobName&&e.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(e.versionId&&"2019-10-10">t)throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(void 0===e.blobName&&e.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(e.permissions&&e.permissions.setImmutabilityPolicy&&"2020-08-04">t)throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(e.permissions&&e.permissions.deleteVersion&&"2019-10-10">t)throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&"2019-10-10">t)throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(e.permissions&&e.permissions.tag&&"2019-12-12">t)throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if("2020-02-10">t&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if("2021-04-10">t&&e.permissions&&e.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if("2020-02-10">t&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(e.encryptionScope&&"2020-12-06">t)throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return e.version=t,e}function arraysEqual(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;e.length>r;++r)if(e[r]!==t[r])return!1;return!0}function toAccessTier(e){if(void 0!==e)return e}function ensureCpkIfSpecified(e,t){if(e&&!t)throw new RangeError("Customer-provided encryption key must be used over HTTPS.");e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm=EncryptionAlgorithmAES25)}function getBlobServiceAccountAudience(e){return`https://${e}.blob.core.windows.net/.default`}function rangeResponseFromModel(e){const t=(e._response.parsedBody.pageRange||[]).map((e=>({offset:e.start,count:e.end-e.start}))),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}})})}function makeBlobBeginCopyFromURLPollOperation(e){return{state:Object.assign({},e),cancel:cancel,toString:toString,update:update}}function rangeToString(e){if(0>e.offset)throw new RangeError("Range.offset cannot be smaller than 0.");if(e.count&&0>=e.count)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}-`}async function streamToBuffer(e,t,r,i,n){let a=0;const o=i-r;return new Promise(((i,s)=>{const l=setTimeout((()=>s(Error("The operation cannot be completed in timeout."))),REQUEST_TIMEOUT);e.on("readable",(()=>{if(a>=o)return clearTimeout(l),void i();let s=e.read();if(!s)return;"string"==typeof s&&(s=Buffer.from(s,n));const c=a+s.length>o?o-a:s.length;t.fill(s.slice(0,c),r+a,r+a+c),a+=c})),e.on("end",(()=>{clearTimeout(l),o>a&&s(Error(`Stream drains before getting enough data needed. Data read: ${a}, data need: ${o}`)),i()})),e.on("error",(e=>{clearTimeout(l),s(e)}))}))}async function streamToBuffer2(e,t,r){let i=0;const n=t.length;return new Promise(((a,o)=>{e.on("readable",(()=>{let a=e.read();a&&("string"==typeof a&&(a=Buffer.from(a,r)),i+a.length>n?o(Error("Stream exceeds buffer size. Buffer size: "+n)):(t.fill(a,i,i+a.length),i+=a.length))})),e.on("end",(()=>{a(i)})),e.on("error",o)}))}async function readStreamToLocalFile(e,t){return new Promise(((r,i)=>{const n=fs$5.createWriteStream(t);e.on("error",(e=>{i(e)})),n.on("error",(e=>{i(e)})),n.on("close",r),e.pipe(n)}))}async function getBodyAsText(e){let t=Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);const r=await streamToBuffer2(e.readableStreamBody,t);return t=t.slice(0,r),""+t}function utf8ByteLength(e){return Buffer.byteLength(e)}function batchRequestAssemblePolicy(e){return{name:"batchRequestAssemblePolicy",sendRequest:async t=>(e.appendSubRequestToBody(t),{request:t,status:200,headers:createHttpHeaders()})}}function batchHeaderFilterPolicy(){return{name:"batchHeaderFilterPolicy",async sendRequest(e,t){let r="";for(const[i]of e.headers)iEqual(i,HeaderConstants.X_MS_VERSION)&&(r=i);return""!==r&&e.headers.delete(r),t(e)}}}function generateAccountSASQueryParameters(e,t){const r=e.version?e.version:SERVICE_VERSION;if(e.permissions&&e.permissions.setImmutabilityPolicy&&"2020-08-04">r)throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(e.permissions&&e.permissions.deleteVersion&&"2019-10-10">r)throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&"2019-10-10">r)throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");if(e.permissions&&e.permissions.tag&&"2019-12-12">r)throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission.");if(e.permissions&&e.permissions.filter&&"2019-12-12">r)throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");if(e.encryptionScope&&"2020-12-06">r)throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");const i=AccountSASPermissions.parse(""+e.permissions),n=""+AccountSASServices.parse(e.services),a=""+AccountSASResourceTypes.parse(e.resourceTypes);let o;o="2020-12-06">r?[t.accountName,i,n,a,e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",truncatedISO8061Date(e.expiresOn,!1),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,""].join("\n"):[t.accountName,i,n,a,e.startsOn?truncatedISO8061Date(e.startsOn,!1):"",truncatedISO8061Date(e.expiresOn,!1),e.ipRange?ipRangeToString(e.ipRange):"",e.protocol?e.protocol:"",r,e.encryptionScope?e.encryptionScope:"",""].join("\n");const s=t.computeHMACSHA256(o);return new SASQueryParameters(r,s,""+i,n,a,e.protocol,e.startsOn,e.expiresOn,e.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,e.encryptionScope)}function isSuccessStatusCode(e){return!!e&&e>=200&&300>e}function isServerErrorStatusCode(e){return!e||e>=500}function isRetryableStatusCode(e){return!!e&&[http_client_1$2.HttpCodes.BadGateway,http_client_1$2.HttpCodes.ServiceUnavailable,http_client_1$2.HttpCodes.GatewayTimeout].includes(e)}function sleep(e){return __awaiter$4(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,i=constants_1$2.DefaultRetryAttempts,n=constants_1$2.DefaultRetryDelay,a=void 0){return __awaiter$4(this,void 0,void 0,(function*(){let o="",s=1;for(;i>=s;){let c,m,d=!1;try{c=yield t()}catch(l){a&&(c=a(l)),d=!0,o=l.message}if(c&&(m=r(c),!isServerErrorStatusCode(m)))return c;if(m&&(d=isRetryableStatusCode(m),o="Cache service responded with "+m),core$4.debug(`${e} - Attempt ${s} of ${i} failed with error: ${o}`),!d){core$4.debug(e+" - Error is not retryable");break}yield sleep(n),s++}throw Error(`${e} failed: ${o}`)}))}function retryTypedResponse(e,t,r=constants_1$2.DefaultRetryAttempts,i=constants_1$2.DefaultRetryDelay){return __awaiter$4(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,i,(e=>e instanceof http_client_1$2.HttpClientError?{statusCode:e.statusCode,result:null,headers:{},error:e}:void 0))}))}function retryHttpClientResponse(e,t,r=constants_1$2.DefaultRetryAttempts,i=constants_1$2.DefaultRetryDelay){return __awaiter$4(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,i)}))}function pipeResponseToStream(e,t){return __awaiter$3(this,void 0,void 0,(function*(){const r=util.promisify(stream$1.pipeline);yield r(e.message,t)}))}function downloadCacheHttpClient(e,t){return __awaiter$3(this,void 0,void 0,(function*(){const r=fs$1.createWriteStream(t),i=new http_client_1$1.HttpClient("actions/cache"),n=yield(0,requestUtils_1$1.retryHttpClientResponse)("downloadCache",(()=>__awaiter$3(this,void 0,void 0,(function*(){return i.get(e)}))));n.message.socket.setTimeout(constants_1$1.SocketTimeout,(()=>{n.message.destroy(),core$3.debug(`Aborting download, socket timed out after ${constants_1$1.SocketTimeout} ms`)})),yield pipeResponseToStream(n,r);const a=n.message.headers["content-length"];if(a){const e=parseInt(a),r=utils$3.getArchiveFileSizeInBytes(t);if(r!==e)throw Error(`Incomplete download. Expected file size: ${e}, actual file size: ${r}`)}else core$3.debug("Unable to validate download, no Content-Length header")}))}function downloadCacheHttpClientConcurrent(e,t,r){var i;return __awaiter$3(this,void 0,void 0,(function*(){const n=yield fs$1.promises.open(t,"w"),a=new http_client_1$1.HttpClient("actions/cache",void 0,{socketTimeout:r.timeoutInMs,keepAlive:!0});try{const t=(yield(0,requestUtils_1$1.retryHttpClientResponse)("downloadCacheMetadata",(()=>__awaiter$3(this,void 0,void 0,(function*(){return yield a.request("HEAD",e,null,{})}))))).message.headers["content-length"];if(null==t)throw Error("Content-Length not found on blob response");const o=parseInt(t);if(Number.isNaN(o))throw Error("Could not interpret Content-Length: "+o);const s=[],l=4194304;for(let r=0;o>r;r+=l){const t=Math.min(l,o-r);s.push({offset:r,promiseGetter:()=>__awaiter$3(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(a,e,r,t)}))})}s.reverse();let c=0,m=0;const d=new DownloadProgress(o);d.startDisplayTimer();const p=d.onProgress(),u=[];let h;const g=()=>__awaiter$3(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(u));yield n.write(e.buffer,0,e.count,e.offset),c--,delete u[e.offset],m+=e.count,p({loadedBytes:m})}));for(;h=s.pop();)u[h.offset]=h.promiseGetter(),c++,c<(null!==(i=r.downloadConcurrency)&&void 0!==i?i:10)||(yield g());for(;c>0;)yield g()}finally{a.dispose(),yield n.close()}}))}function downloadSegmentRetry(e,t,r,i){return __awaiter$3(this,void 0,void 0,(function*(){let n=0;for(;;)try{const n=3e4,a=yield promiseWithTimeout(n,downloadSegment(e,t,r,i));if("string"==typeof a)throw Error("downloadSegmentRetry failed due to timeout");return a}catch(a){if(n>=5)throw a;n++}}))}function downloadSegment(e,t,r,i){return __awaiter$3(this,void 0,void 0,(function*(){const n=yield(0,requestUtils_1$1.retryHttpClientResponse)("downloadCachePart",(()=>__awaiter$3(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+i-1}`})}))));if(!n.readBodyBuffer)throw Error("Expected HttpClientResponse to implement readBodyBuffer");return{offset:r,count:i,buffer:yield n.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var i;return __awaiter$3(this,void 0,void 0,(function*(){const n=new storage_blob_1.BlockBlobClient(e,void 0,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}}),a=yield n.getProperties(),o=null!==(i=a.contentLength)&&void 0!==i?i:-1;if(0>o)core$3.debug("Unable to determine content length, downloading file with http-client..."),yield downloadCacheHttpClient(e,t);else{const e=Math.min(134217728,buffer.constants.MAX_LENGTH),i=new DownloadProgress(o),a=fs$1.openSync(t,"w");try{i.startDisplayTimer();const t=new abort_controller_1.AbortController,s=t.signal;for(;!i.isDone();){const l=i.segmentOffset+i.segmentSize,c=Math.min(e,o-l);i.nextSegment(c);const m=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,n.downloadToBuffer(l,c,{abortSignal:s,concurrency:r.downloadConcurrency,onProgress:i.onProgress()}));if("timeout"===m)throw t.abort(),Error("Aborting cache download as the download time exceeded the timeout.");Buffer.isBuffer(m)&&fs$1.writeFileSync(a,m)}}finally{i.stopDisplayTimer(),fs$1.closeSync(a)}}}))}function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:33554432};return e&&("number"==typeof e.uploadConcurrency&&(t.uploadConcurrency=e.uploadConcurrency),"number"==typeof e.uploadChunkSize&&(t.uploadChunkSize=e.uploadChunkSize)),core$2.debug("Upload concurrency: "+t.uploadConcurrency),core$2.debug("Upload chunk size: "+t.uploadChunkSize),t}function getDownloadOptions(e){const t={useAzureSdk:!1,concurrentBlobDownloads:!0,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:!1};e&&("boolean"==typeof e.useAzureSdk&&(t.useAzureSdk=e.useAzureSdk),"boolean"==typeof e.concurrentBlobDownloads&&(t.concurrentBlobDownloads=e.concurrentBlobDownloads),"number"==typeof e.downloadConcurrency&&(t.downloadConcurrency=e.downloadConcurrency),"number"==typeof e.timeoutInMs&&(t.timeoutInMs=e.timeoutInMs),"number"==typeof e.segmentTimeoutInMs&&(t.segmentTimeoutInMs=e.segmentTimeoutInMs),"boolean"==typeof e.lookupOnly&&(t.lookupOnly=e.lookupOnly));const r=process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS;return r&&!isNaN(+r)&&isFinite(+r)&&(t.segmentTimeoutInMs=6e4*+r),core$2.debug("Use Azure SDK: "+t.useAzureSdk),core$2.debug("Download concurrency: "+t.downloadConcurrency),core$2.debug("Request timeout (ms): "+t.timeoutInMs),core$2.debug("Cache segment download timeout mins env var: "+process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS),core$2.debug("Segment download timeout (ms): "+t.segmentTimeoutInMs),core$2.debug("Lookup only: "+t.lookupOnly),t}function getCacheApiUrl(e){const t=process.env.ACTIONS_CACHE_URL||"";if(!t)throw Error("Cache Service Url not found, unable to restore cache.");const r=`${t}_apis/artifactcache/${e}`;return core$1.debug("Resource Url: "+r),r}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){return{headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}}}function createHttpClient(){const e=process.env.ACTIONS_RUNTIME_TOKEN||"",t=new auth_1.BearerCredentialHandler(e);return new http_client_1.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t,r=!1){const i=e.slice();return t&&i.push(t),"win32"!==process.platform||r||i.push("windows-only"),i.push(versionSalt),crypto.createHash("sha256").update(i.join("|")).digest("hex")}function getCacheEntry(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i=createHttpClient(),n=getCacheVersion(t,null==r?void 0:r.compressionMethod,null==r?void 0:r.enableCrossOsArchive),a=`cache?keys=${encodeURIComponent(e.join(","))}&version=${n}`,o=yield(0,requestUtils_1.retryTypedResponse)("getCacheEntry",(()=>__awaiter$2(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(a))}))));if(204===o.statusCode)return core$1.isDebug()&&(yield printCachesListForDiagnostics(e[0],i,n)),null;if(!(0,requestUtils_1.isSuccessStatusCode)(o.statusCode))throw Error("Cache service responded with "+o.statusCode);const s=o.result,l=null==s?void 0:s.archiveLocation;if(!l)throw Error("Cache not found.");return core$1.setSecret(l),core$1.debug("Cache Result:"),core$1.debug(JSON.stringify(s)),s}))}function printCachesListForDiagnostics(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i="caches?key="+encodeURIComponent(e),n=yield(0,requestUtils_1.retryTypedResponse)("listCache",(()=>__awaiter$2(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(i))}))));if(200===n.statusCode){const t=n.result,i=null==t?void 0:t.totalCount;if(i&&i>0){core$1.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(null==t?void 0:t.artifactCaches)||[])core$1.debug(`Cache Key: ${null==e?void 0:e.cacheKey}, Cache Version: ${null==e?void 0:e.cacheVersion}, Cache Scope: ${null==e?void 0:e.scope}, Cache Created: ${null==e?void 0:e.creationTime}`)}}}))}function downloadCache(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i=new url_1.URL(e),n=(0,options_1.getDownloadOptions)(r);i.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield(0,downloadUtils_1.downloadCacheStorageSDK)(e,t,n):n.concurrentBlobDownloads?yield(0,downloadUtils_1.downloadCacheHttpClientConcurrent)(e,t,n):yield(0,downloadUtils_1.downloadCacheHttpClient)(e,t):yield(0,downloadUtils_1.downloadCacheHttpClient)(e,t)}))}function reserveCache(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i=createHttpClient(),n=getCacheVersion(t,null==r?void 0:r.compressionMethod,null==r?void 0:r.enableCrossOsArchive),a={key:e,version:n,cacheSize:null==r?void 0:r.cacheSize};return yield(0,requestUtils_1.retryTypedResponse)("reserveCache",(()=>__awaiter$2(this,void 0,void 0,(function*(){return i.postJson(getCacheApiUrl("caches"),a)}))))}))}function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,i,n){return __awaiter$2(this,void 0,void 0,(function*(){core$1.debug(`Uploading chunk of size ${n-i+1} bytes at offset ${i} with content range: ${getContentRange(i,n)}`);const a={"Content-Type":"application/octet-stream","Content-Range":getContentRange(i,n)},o=yield(0,requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${n})`,(()=>__awaiter$2(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),a)}))));if(!(0,requestUtils_1.isSuccessStatusCode)(o.message.statusCode))throw Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)}))}function uploadFile(e,t,r,i){return __awaiter$2(this,void 0,void 0,(function*(){const n=utils$2.getArchiveFileSizeInBytes(r),a=getCacheApiUrl("caches/"+t),o=fs.openSync(r,"r"),s=(0,options_1.getUploadOptions)(i),l=utils$2.assertDefined("uploadConcurrency",s.uploadConcurrency),c=utils$2.assertDefined("uploadChunkSize",s.uploadChunkSize),m=[...Array(l).keys()];core$1.debug("Awaiting all uploads");let d=0;try{yield Promise.all(m.map((()=>__awaiter$2(this,void 0,void 0,(function*(){for(;n>d;){const t=d,i=d+Math.min(n-d,c)-1;d+=c,yield uploadChunk(e,a,(()=>fs.createReadStream(r,{fd:o,start:t,end:i,autoClose:!1}).on("error",(e=>{throw Error("Cache upload failed because file read failed with "+e.message)}))),t,i)}})))))}finally{fs.closeSync(o)}}))}function commitCache(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i={size:r};return yield(0,requestUtils_1.retryTypedResponse)("commitCache",(()=>__awaiter$2(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl("caches/"+t),i)}))))}))}function saveCache$1(e,t,r){return __awaiter$2(this,void 0,void 0,(function*(){const i=createHttpClient();core$1.debug("Upload cache"),yield uploadFile(i,e,t,r),core$1.debug("Commiting cache");const n=utils$2.getArchiveFileSizeInBytes(t);core$1.info(`Cache Size: ~${Math.round(n/1048576)} MB (${n} B)`);const a=yield commitCache(i,e,n);if(!(0,requestUtils_1.isSuccessStatusCode)(a.statusCode))throw Error(`Cache service responded with ${a.statusCode} during commit cache.`);core$1.info("Cache saved successfully")}))}function getTarPath(){return __awaiter$1(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield utils$1.getGnuTarPathOnWindows(),t=constants_1.SystemTarPathOnWindows;if(e)return{path:e,type:constants_1.ArchiveToolType.GNU};if((0,fs_1.existsSync)(t))return{path:t,type:constants_1.ArchiveToolType.BSD};break}case"darwin":{const e=yield io.which("gtar",!1);return e?{path:e,type:constants_1.ArchiveToolType.GNU}:{path:yield io.which("tar",!0),type:constants_1.ArchiveToolType.BSD}}}return{path:yield io.which("tar",!0),type:constants_1.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,i=""){return __awaiter$1(this,void 0,void 0,(function*(){const n=[`"${e.path}"`],a=utils$1.getCacheFileName(t),o="cache.tar",s=getWorkingDirectory(),l=e.type===constants_1.ArchiveToolType.BSD&&t!==constants_1.CompressionMethod.Gzip&&IS_WINDOWS$1;switch(r){case"create":n.push("--posix","-cf",l?o:a.replace(RegExp("\\"+path$1.sep,"g"),"/"),"--exclude",l?o:a.replace(RegExp("\\"+path$1.sep,"g"),"/"),"-P","-C",s.replace(RegExp("\\"+path$1.sep,"g"),"/"),"--files-from",constants_1.ManifestFilename);break;case"extract":n.push("-xf",l?o:i.replace(RegExp("\\"+path$1.sep,"g"),"/"),"-P","-C",s.replace(RegExp("\\"+path$1.sep,"g"),"/"));break;case"list":n.push("-tf",l?o:i.replace(RegExp("\\"+path$1.sep,"g"),"/"),"-P")}if(e.type===constants_1.ArchiveToolType.GNU)switch(process.platform){case"win32":n.push("--force-local");break;case"darwin":n.push("--delay-directory-restore")}return n}))}function getCommands(e,t,r=""){return __awaiter$1(this,void 0,void 0,(function*(){let i;const n=yield getTarPath(),a=yield getTarArgs(n,e,t,r),o="create"!==t?yield getDecompressionProgram(n,e,r):yield getCompressionProgram(n,e),s=n.type===constants_1.ArchiveToolType.BSD&&e!==constants_1.CompressionMethod.Gzip&&IS_WINDOWS$1;return i=s&&"create"!==t?[[...o].join(" "),[...a].join(" ")]:[[...a].join(" "),[...o].join(" ")],s?i:[i.join(" ")]}))}function getWorkingDirectory(){var e;return null!==(e=process.env.GITHUB_WORKSPACE)&&void 0!==e?e:process.cwd()}function getDecompressionProgram(e,t,r){return __awaiter$1(this,void 0,void 0,(function*(){const i=e.type===constants_1.ArchiveToolType.BSD&&t!==constants_1.CompressionMethod.Gzip&&IS_WINDOWS$1;switch(t){case constants_1.CompressionMethod.Zstd:return i?["zstd -d --long=30 --force -o",constants_1.TarFilename,r.replace(RegExp("\\"+path$1.sep,"g"),"/")]:["--use-compress-program",IS_WINDOWS$1?'"zstd -d --long=30"':"unzstd --long=30"];case constants_1.CompressionMethod.ZstdWithoutLong:return i?["zstd -d --force -o",constants_1.TarFilename,r.replace(RegExp("\\"+path$1.sep,"g"),"/")]:["--use-compress-program",IS_WINDOWS$1?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return __awaiter$1(this,void 0,void 0,(function*(){const r=utils$1.getCacheFileName(t),i=e.type===constants_1.ArchiveToolType.BSD&&t!==constants_1.CompressionMethod.Gzip&&IS_WINDOWS$1;switch(t){case constants_1.CompressionMethod.Zstd:return i?["zstd -T0 --long=30 --force -o",r.replace(RegExp("\\"+path$1.sep,"g"),"/"),constants_1.TarFilename]:["--use-compress-program",IS_WINDOWS$1?'"zstd -T0 --long=30"':"zstdmt --long=30"];case constants_1.CompressionMethod.ZstdWithoutLong:return i?["zstd -T0 --force -o",r.replace(RegExp("\\"+path$1.sep,"g"),"/"),constants_1.TarFilename]:["--use-compress-program",IS_WINDOWS$1?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return __awaiter$1(this,void 0,void 0,(function*(){for(const i of e)try{yield(0,exec_1.exec)(i,void 0,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(r){throw Error(`${i.split(" ")[0]} failed with error: ${null==r?void 0:r.message}`)}}))}function listTar(e,t){return __awaiter$1(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}function extractTar(e,t){return __awaiter$1(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield io.mkdirP(r);const i=yield getCommands(t,"extract",e);yield execCommands(i)}))}function createTar(e,t,r){return __awaiter$1(this,void 0,void 0,(function*(){(0,fs_1.writeFileSync)(path$1.join(e,constants_1.ManifestFilename),t.join("\n"));const i=yield getCommands(r,"create");yield execCommands(i,e)}))}function checkPaths(e){if(!e||0===e.length)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.`);if(!/^[^,]*$/.test(e))throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}function isFeatureAvailable(){return!!process.env.ACTIONS_CACHE_URL}function restoreCache(e,t,r,i,n=!1){return __awaiter(this,void 0,void 0,(function*(){checkPaths(e),r=r||[];const a=[t,...r];if(core.debug("Resolved Keys:"),core.debug(JSON.stringify(a)),a.length>10)throw new ValidationError("Key Validation Error: Keys are limited to a maximum of 10.");for(const e of a)checkKey(e);const o=yield utils.getCompressionMethod();let s="";try{const t=yield cacheHttpClient.getCacheEntry(a,e,{compressionMethod:o,enableCrossOsArchive:n});if(!(null==t?void 0:t.archiveLocation))return;if(null==i?void 0:i.lookupOnly)return core.info("Lookup only - skipping download"),t.cacheKey;s=path.join(yield utils.createTempDirectory(),utils.getCacheFileName(o)),core.debug("Archive Path: "+s),yield cacheHttpClient.downloadCache(t.archiveLocation,s,i),core.isDebug()&&(yield(0,tar_1.listTar)(s,o));const r=utils.getArchiveFileSizeInBytes(s);return core.info(`Cache Size: ~${Math.round(r/1048576)} MB (${r} B)`),yield(0,tar_1.extractTar)(s,o),core.info("Cache restored successfully"),t.cacheKey}catch(l){if(l.name===ValidationError.name)throw l;core.warning("Failed to restore: "+l.message)}finally{try{yield utils.unlinkFile(s)}catch(l){core.debug("Failed to delete archive: "+l)}}}))}function saveCache(e,t,r,i=!1){var n,a,o,s,l;return __awaiter(this,void 0,void 0,(function*(){checkPaths(e),checkKey(t);const c=yield utils.getCompressionMethod();let m=-1;const d=yield utils.resolvePaths(e);if(core.debug("Cache Paths:"),core.debug(""+JSON.stringify(d)),0===d.length)throw Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");const p=yield utils.createTempDirectory(),u=path.join(p,utils.getCacheFileName(c));core.debug("Archive Path: "+u);try{yield(0,tar_1.createTar)(p,d,c),core.isDebug()&&(yield(0,tar_1.listTar)(u,c));const h=10737418240,g=utils.getArchiveFileSizeInBytes(u);if(core.debug("File Size: "+g),g>h&&!utils.isGhes())throw Error(`Cache size of ~${Math.round(g/1048576)} MB (${g} B) is over the 10GB limit, not saving cache.`);core.debug("Reserving Cache");const y=yield cacheHttpClient.reserveCache(t,e,{compressionMethod:c,enableCrossOsArchive:i,cacheSize:g});if(!(null===(n=null==y?void 0:y.result)||void 0===n?void 0:n.cacheId))throw 400===(null==y?void 0:y.statusCode)?Error(null!==(s=null===(o=null==y?void 0:y.error)||void 0===o?void 0:o.message)&&void 0!==s?s:`Cache size of ~${Math.round(g/1048576)} MB (${g} B) is over the data cap limit, not saving cache.`):new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${null===(l=null==y?void 0:y.error)||void 0===l?void 0:l.message}`);m=null===(a=null==y?void 0:y.result)||void 0===a?void 0:a.cacheId,core.debug(`Saving Cache (ID: ${m})`),yield cacheHttpClient.saveCache(m,u,r)}catch(h){const e=h;if(e.name===ValidationError.name)throw h;e.name===ReserveCacheError.name?core.info("Failed to save: "+e.message):core.warning("Failed to save: "+e.message)}finally{try{yield utils.unlinkFile(u)}catch(h){core.debug("Failed to delete archive: "+h)}}return m}))}function isDigit(e){return e>=CHAR_0&&CHAR_9>=e}function isHexit(e){return e>=CHAR_A&&CHAR_F>=e||e>=CHAR_a&&CHAR_f>=e||e>=CHAR_0&&CHAR_9>=e}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&CHAR_7>=e}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&CHAR_Z>=e||e>=CHAR_a&&CHAR_z>=e||e>=CHAR_0&&CHAR_9>=e||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&CHAR_Z>=e||e>=CHAR_a&&CHAR_z>=e||e>=CHAR_0&&CHAR_9>=e||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}function Integer(e){let t=+e;return Object.is(t,-0)&&(t=0),commonjsGlobal.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType$1(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,r=e.key.pop();for(let i of e.key){if(hasKey(t,i)&&(!isTable(t[i])||t[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[i]=t[i]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return t[r]=isInteger(e.value)||isFloat(e.value)?e.value.valueOf():e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.return("-"===this.state.buf?-1/0:1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||CTRL_CHAR_BOUNDARY>=this.char&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return 16>this.char&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&SURROGATE_LAST>=t)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(t){throw this.error(TomlError.wrap(t))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(4>this.state.buf.length){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(4>this.state.buf.length)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(2>this.state.buf.length)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(2>this.state.buf.length)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(2>this.state.buf.length)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(this.state.buf.length>=2||!isDigit(this.char)){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(2>this.state.buf.length)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length>=2||!isDigit(this.char)){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],r=tomlType$1(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`))}else this.state.resultArr=InlineList(tomlType$1(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,r=e.key.pop();for(let i of e.key){if(hasKey(t,i)&&(!isTable(t[i])||t[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[i]=t[i]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return t[r]=isInteger(e.value)||isFloat(e.value)?e.value.valueOf():e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}function prettyError$2(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const i=t.split(/\n/),n=(Math.min(i.length,e.line+3)+"").length;let a=" ";for(;n>a.length;)a+=" ";for(let t=Math.max(0,e.line-1);Math.min(i.length,e.line+2)>t;++t){let o=t+1+"";if(n>o.length&&(o=" "+o),e.line===t){r+=o+"> "+i[t]+"\n",r+=a+" ";for(let t=0;e.col>t;++t)r+=" ";r+="^\n"}else r+=o+": "+i[t]+"\n"}}return e.message=r+"\n",e}function parseString(e){commonjsGlobal.Buffer&&commonjsGlobal.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new TOMLParser$2;try{return t.parse(e),t.finish()}catch(r){throw prettyError$1(r,e)}}function parseAsync(e,t){function r(t,i,a,o){if(t>=e.length)try{return a(n.finish())}catch(s){return o(prettyError(s,e))}try{n.parse(e.slice(t,t+i)),setImmediate(r,t+i,i,a,o)}catch(s){o(prettyError(s,e))}}t||(t={});const i=t.blocksize||40960,n=new TOMLParser$1;return new Promise(((e,t)=>{setImmediate(r,0,i,e,t)}))}function parseStream(e){return e?parseReadable(e):parseTransform()}function parseReadable(e){const t=new TOMLParser;return e.setEncoding("utf8"),new Promise(((r,i)=>{function n(){if(s=!0,!o)try{r(t.finish())}catch(e){i(e)}}function a(e){l=!0,i(e)}let o,s=!1,l=!1;e.once("end",n),e.once("error",a),function r(){let i;for(o=!0;null!==(i=e.read());)try{t.parse(i)}catch(c){return a(c)}if(o=!1,s)return n();l||e.once("readable",r)}()}))}function parseTransform(){const e=new TOMLParser;return new stream.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r))}catch(n){this.emit("error",n)}i()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}function stringify(e){if(null===e)throw typeError("null");if(void 0===e)throw typeError("undefined");if("object"!=typeof e)throw typeError(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;const t=tomlType(e);if("table"!==t)throw typeError(t);return stringifyObject("","",e)}function typeError(e){return Error("Can only stringify objects, not "+e)}function arrayOneTypeError(){return Error("Array values can't have mixed types")}function getInlineKeys(e){return Object.keys(e).filter((t=>isInline(e[t])))}function getComplexKeys(e){return Object.keys(e).filter((t=>!isInline(e[t])))}function toJSON(e){let t=Array.isArray(e)?[]:{}.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))t[r]=e[r]&&"function"==typeof e[r].toJSON&&!("toISOString"in e[r])?e[r].toJSON():e[r];return t}function stringifyObject(e,t,r){var i,n;i=getInlineKeys(r=toJSON(r)),n=getComplexKeys(r);var a=[],o=t||"";i.forEach((e=>{var t=tomlType(r[e]);"undefined"!==t&&"null"!==t&&a.push(o+stringifyKey(e)+" = "+stringifyAnyInline(r[e],!0))})),a.length>0&&a.push("");var s=e&&i.length>0?t+" ":"";return n.forEach((t=>{a.push(stringifyComplex(e,s,t,r[t]))})),a.join("\n")}function isInline(e){switch(tomlType(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==tomlType(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function tomlType(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function stringifyKey(e){var t=e+"";return/^[-A-Za-z0-9_]+$/.test(t)?t:stringifyBasicString(t)}function stringifyBasicString(e){return'"'+escapeString(e).replace(/"/g,'\\"')+'"'}function stringifyLiteralString(e){return"'"+e+"'"}function numpad(e,t){for(;e>t.length;)t="0"+t;return t}function escapeString(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,(e=>"\\u"+numpad(4,e.codePointAt(0).toString(16))))}function stringifyMultilineString(e){let t=e.split(/\n/).map((e=>escapeString(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}function stringifyAnyInline(e,t){let r=tomlType(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),stringifyInline(e,r)}function stringifyInline(e,t){switch(t||(t=tomlType(e)),t){case"string-multiline":return stringifyMultilineString(e);case"string":return stringifyBasicString(e);case"string-literal":return stringifyLiteralString(e);case"integer":return stringifyInteger(e);case"float":return stringifyFloat(e);case"boolean":return stringifyBoolean(e);case"datetime":return stringifyDatetime(e);case"array":return stringifyInlineArray(e.filter((e=>"null"!==tomlType(e)&&"undefined"!==tomlType(e)&&"nan"!==tomlType(e))));case"table":return stringifyInlineTable(e);default:throw typeError(t)}}function stringifyInteger(e){return(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function stringifyFloat(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=(e+"").split("."),r=t[1]||0;return stringifyInteger(t[0])+"."+r}function stringifyBoolean(e){return e+""}function stringifyDatetime(e){return e.toISOString()}function isNumber(e){return"float"===e||"integer"===e}function arrayType(e){var t=tomlType(e[0]);return e.every((e=>tomlType(e)===t))?t:e.every((e=>isNumber(tomlType(e))))?"float":"mixed"}function validateArray(e){const t=arrayType(e);if("mixed"===t)throw arrayOneTypeError();return t}function stringifyInlineArray(e){const t=validateArray(e=toJSON(e));var r="[",i=e.map((e=>stringifyInline(e,t)));return i.join(", ").length>60||/\n/.test(i)?r+="\n "+i.join(",\n ")+"\n":r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}function stringifyInlineTable(e){e=toJSON(e);var t=[];return Object.keys(e).forEach((r=>{t.push(stringifyKey(r)+" = "+stringifyAnyInline(e[r],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function stringifyComplex(e,t,r,i){var n=tomlType(i);if("array"===n)return stringifyArrayOfTables(e,t,r,i);if("table"===n)return stringifyComplexTable(e,t,r,i);throw typeError(n)}function stringifyArrayOfTables(e,t,r,i){validateArray(i=toJSON(i));var n=tomlType(i[0]);if("table"!==n)throw typeError(n);var a=e+stringifyKey(r),o="";return i.forEach((e=>{o.length>0&&(o+="\n"),o+=t+"[["+a+"]]\n",o+=stringifyObject(a+".",t,e)})),o}function stringifyComplexTable(e,t,r,i){var n=e+stringifyKey(r),a="";return getInlineKeys(i).length>0&&(a+=t+"["+n+"]\n"),a+stringifyObject(n+".",t,i)}function createSymlinkInFolder(e,t,r,i=!1){const n=path$9.join(e,t),a=path$9.join(e,r);fs__default.existsSync(a)||(fs__default.symlinkSync(n,a),!IS_WINDOWS&&i&&fs__default.chmodSync(a,"755"))}function validateVersion(e){return isNightlyKeyword(e)||!!semver$2.validRange(e)}function isNightlyKeyword(e){return"nightly"===e}function getPyPyVersionFromPath(e){return path$9.basename(path$9.dirname(e))}function readExactPyPyVersionFile(e){let t="";const r=path$9.join(e,PYPY_VERSION_FILE);return fs__default.existsSync(r)&&(t=(""+fs__default.readFileSync(r)).trim()),t}function writeExactPyPyVersionFile(e,t){const r=path$9.join(e,PYPY_VERSION_FILE);fs__default.writeFileSync(r,t)}function validatePythonVersionFormatForPyPy(e){return/^\d+\.\d+$/.test(e)}async function getWindowsInfo(){const{stdout:e}=await getExecOutput_1('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{osName:"Windows",osVersion:e.trim().split(" ")[3]}}async function getMacOSInfo(){const{stdout:e}=await getExecOutput_1("sw_vers",["-productVersion"],{silent:!0});return{osName:"macOS",osVersion:e.trim()}}async function getLinuxInfo(){const{stdout:e}=await getExecOutput_1("lsb_release",["-i","-r","-s"],{silent:!0}),[t,r]=e.trim().split("\n");return coreExports.debug(`OS Name: ${t}, Version: ${r}`),{osName:t,osVersion:r}}async function getOSInfo(){let e;try{IS_WINDOWS?e=await getWindowsInfo():IS_LINUX?e=await getLinuxInfo():IS_MAC&&(e=await getMacOSInfo())}catch(t){coreExports.debug(t.message)}finally{return e}}async function installPyPy(e,t,r,i,n){let a;if(!(n=n??await getAvailablePyPyVersions())||0===n.length)throw Error("No release was found in PyPy version.json");let o=findRelease(n,t,e,r,!1);if(!o||!o.foundAsset)throw Error(`PyPy version ${t} (${e}) with arch ${r} not found`);const{foundAsset:s,resolvedPythonVersion:l,resolvedPyPyVersion:c}=o,m=""+s.download_url;coreExports.info(`Downloading PyPy from "${m}" ...`);try{const e=await downloadTool_1(m);coreExports.info("Extracting downloaded archive..."),a=IS_WINDOWS?await extractZip_1(e):await extractTar_1(e,void 0,"x");const t=fs__default.readdirSync(a)[0],i=path$9.join(a,t);let n=i;isNightlyKeyword(c)||(n=await cacheDir_1(i,"PyPy",l,r)),writeExactPyPyVersionFile(n,c);const o=getPyPyBinaryPath(n);return await createPyPySymlink(o,l),await installPip(o),{installDir:n,resolvedPythonVersion:l,resolvedPyPyVersion:c}}catch(d){throw d instanceof Error&&(coreExports.info(d instanceof HTTPError_1&&(403===d.httpStatusCode||429===d.httpStatusCode)?`Received HTTP status code ${d.httpStatusCode}. This usually indicates the rate limit has been exceeded`:d.message),void 0!==d.stack&&coreExports.debug(d.stack)),d}}async function getAvailablePyPyVersions(){const e="https://downloads.python.org/pypy/versions.json",t=new httpClient.HttpClient("tool-cache"),r=await t.getJson(e);if(!r.result)throw Error(`Unable to retrieve the list of available PyPy versions from '${e}'`);return r.result}async function createPyPySymlink(e,t){const r=semver$2.coerce(t),i=semver$2.major(r),n=2===i?"":"3",a=`${i}.${semver$2.minor(r)}`,o=IS_WINDOWS?".exe":"";coreExports.info("Creating symlinks..."),createSymlinkInFolder(e,`pypy${n}${o}`,`python${i}${o}`,!0),createSymlinkInFolder(e,`pypy${n}${o}`,"python"+o,!0),createSymlinkInFolder(e,`pypy${n}${o}`,`pypy${a}${o}`,!0)}async function installPip(e){coreExports.info("Installing and updating pip");const t=path$9.join(e,"python");await exec_2(t+" -m ensurepip"),await exec_2(e+"/python -m pip install --ignore-installed pip")}function findRelease(e,t,r,i,n){const a={includePrerelease:n},o=e.filter((e=>{const n=semver$2.satisfies(semver$2.coerce(e.python_version),t),o=isNightlyKeyword(r)&&isNightlyKeyword(e.pypy_version)||semver$2.satisfies(pypyVersionToSemantic(e.pypy_version),r,a),s=e.files&&(IS_WINDOWS?isArchPresentForWindows(e,i):isArchPresentForMacOrLinux(e,i,process.platform));return n&&o&&s}));if(0===o.length)return null;const s=o.sort(((e,t)=>semver$2.compare(semver$2.coerce(pypyVersionToSemantic(t.pypy_version)),semver$2.coerce(pypyVersionToSemantic(e.pypy_version)))||semver$2.compare(semver$2.coerce(t.python_version),semver$2.coerce(e.python_version))))[0];return{foundAsset:IS_WINDOWS?findAssetForWindows(s,i):findAssetForMacOrLinux(s,i,process.platform),resolvedPythonVersion:s.python_version,resolvedPyPyVersion:s.pypy_version.trim()}}function getPyPyBinaryPath(e){const t=path$9.join(e,"bin");return IS_WINDOWS?e:t}function pypyVersionToSemantic(e){return e.replace(/(\d+\.\d+\.\d+)((?:a|b|rc))(\d*)/g,"$1-$2.$3")}function isArchPresentForWindows(e,t){return t=replaceX32toX86(t),e.files.some((e=>WINDOWS_PLATFORMS.includes(e.platform)&&e.arch===t))}function isArchPresentForMacOrLinux(e,t,r){return e.files.some((e=>e.arch===t&&e.platform===r))}function findAssetForWindows(e,t){return t=replaceX32toX86(t),e.files.find((e=>WINDOWS_PLATFORMS.includes(e.platform)&&e.arch===t))}function findAssetForMacOrLinux(e,t,r){return e.files.find((e=>e.arch===t&&e.platform===r))}function replaceX32toX86(e){return"x32"===e&&(e="x86"),e}async function findPyPyVersion(e,t,r,i,n){let a,o="",s="";const l=parsePyPyVersion(e);({installDir:a,resolvedPythonVersion:s,resolvedPyPyVersion:o}=findPyPyToolCache(l.pythonVersion,l.pypyVersion,t)),a||({installDir:a,resolvedPythonVersion:s,resolvedPyPyVersion:o}=await installPyPy(l.pypyVersion,l.pythonVersion,t,n,void 0));const c=path$9.join(a,IS_WINDOWS?"Scripts":"bin"),m=path$9.join(IS_WINDOWS?a:c,"python"+(IS_WINDOWS?".exe":"")),d=getPyPyBinaryPath(a);return coreExports.exportVariable("pythonLocation",a),coreExports.exportVariable("Python_ROOT_DIR",a),coreExports.exportVariable("Python2_ROOT_DIR",a),coreExports.exportVariable("Python3_ROOT_DIR",a),coreExports.exportVariable("PKG_CONFIG_PATH",d+"/lib/pkgconfig"),coreExports.addPath(d),coreExports.addPath(c),coreExports.setOutput("python-version","pypy"+o),coreExports.setOutput("python-path",m),{resolvedPyPyVersion:o,resolvedPythonVersion:s}}function findPyPyToolCache(e,t,r){let i="",n="",a=IS_WINDOWS?findPyPyInstallDirForWindows(e):find_1("PyPy",e,r);return a&&(n=getPyPyVersionFromPath(a),i=readExactPyPyVersionFile(a),semver$2.satisfies(i,t)||(a=null,i="",n="")),a||coreExports.info(`PyPy version ${e} (${t}) was not found in the local cache`),{installDir:a,resolvedPythonVersion:n,resolvedPyPyVersion:i}}function parsePyPyVersion(e){const t=e.split("-").filter((e=>!!e));if(/^(pypy)(.+)/.test(t[0])){const e=t[0].replace("pypy","");t.splice(0,1,"pypy",e)}if(2>t.length||"pypy"!=t[0])throw Error("Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy<python-version>' or 'pypy-<python-version>'. See README for examples and documentation.");const r=t[1];let i;if(i=t.length>2?pypyVersionToSemantic(t[2]):"x",!validateVersion(r)||!validateVersion(i))throw Error("Invalid 'version' property for PyPy. Both Python version and PyPy versions should satisfy SemVer notation. See README for examples and documentation.");if(!validatePythonVersionFormatForPyPy(r))throw Error("Invalid format of Python version for PyPy. Python version should be specified in format 'x.y'. See README for examples and documentation.");return{pypyVersion:i,pythonVersion:r}}function findPyPyInstallDirForWindows(e){let t="";return WINDOWS_ARCHS.forEach((r=>t=t||find_1("PyPy",e,r))),t}async function findReleaseFromManifest(e,t,r){return r||(r=await getManifest()),await findFromManifest_1(e,!1,r,t)}function getManifest(){return coreExports.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`),getManifestFromRepo_1(MANIFEST_REPO_OWNER,MANIFEST_REPO_NAME,AUTH,MANIFEST_REPO_BRANCH)}async function installPython(e){const t={cwd:e,env:{...process.env,...IS_LINUX&&{LD_LIBRARY_PATH:path$9.join(e,"lib")}},silent:!0,listeners:{stdout:e=>{coreExports.info((""+e).trim())},stderr:e=>{coreExports.error((""+e).trim())}}};IS_WINDOWS?await exec_2("powershell",["./setup.ps1"],t):await exec_2("bash",["./setup.sh"],t)}async function installCpythonFromRelease(e){const t=e.files[0].download_url;coreExports.info(`Download from "${t}"`);let r="";try{let e;r=await downloadTool_1(t,void 0,AUTH),coreExports.info("Extract downloaded archive"),e=IS_WINDOWS?await extractZip_1(r):await extractTar_1(r),coreExports.info("Execute installation script"),await installPython(e)}catch(i){throw i instanceof HTTPError_1&&(coreExports.info(403===i.httpStatusCode||429===i.httpStatusCode?`Received HTTP status code ${i.httpStatusCode}. This usually indicates the rate limit has been exceeded`:i.message),i.stack&&coreExports.debug(i.stack)),i}}function binDir(e){return path$9.join(e,IS_WINDOWS?"Scripts":"bin")}async function useCpythonVersion(e,t,r,i,n){let a=pythonVersionToSemantic(desugarDevVersion(e));coreExports.debug(`Semantic version spec of ${e} is ${a}`);let o=find_1("Python",a,t);if(!o){coreExports.info(`Version ${a} was not found in the local cache`);const e=await findReleaseFromManifest(a,t,null);e&&e.files&&e.files.length>0&&(coreExports.info(`Version ${a} is available for downloading`),await installCpythonFromRelease(e),o=find_1("Python",a,t))}if(!o){const r=await getOSInfo();throw Error([`The version '${e}' with architecture '${t}' was not found for ${r?`${r.osName} ${r.osVersion}`:"this operating system"}.`,"The list of all available versions can be found here: "+MANIFEST_URL].join(require$$0.EOL))}const s=binDir(o),l=path$9.join(IS_WINDOWS?o:s,"python"+(IS_WINDOWS?".exe":""));if(coreExports.exportVariable("pythonLocation",o),coreExports.exportVariable("PKG_CONFIG_PATH",o+"/lib/pkgconfig"),coreExports.exportVariable("pythonLocation",o),coreExports.exportVariable("Python_ROOT_DIR",o),coreExports.exportVariable("Python2_ROOT_DIR",o),coreExports.exportVariable("Python3_ROOT_DIR",o),coreExports.exportVariable("PKG_CONFIG_PATH",o+"/lib/pkgconfig"),IS_LINUX){const e=process.env.LD_LIBRARY_PATH?":"+process.env.LD_LIBRARY_PATH:"",t=path$9.join(o,"lib");e.split(":").includes(t)||coreExports.exportVariable("LD_LIBRARY_PATH",t+e)}if(coreExports.addPath(o),coreExports.addPath(s),IS_WINDOWS){const e=path$9.basename(path$9.dirname(o)),t=semver$2.major(e),r=semver$2.minor(e),i=path$9.join(process.env.APPDATA||"","Python",`Python${t}${r}`,"Scripts");coreExports.addPath(i)}const c=versionFromPath(o);return coreExports.setOutput("python-version",c),coreExports.setOutput("python-path",l),{impl:"CPython",version:c}}function desugarDevVersion(e){return e.replace(/^(\d+)\.(\d+)-dev$/,"~$1.$2.0-0")}function versionFromPath(e){const t=e.split(path$9.sep),r=t.findIndex((e=>"PyPy"===e||"Python"===e));return t[r+1]||""}function pythonVersionToSemantic(e,t){return e.replace(/(\d+\.\d+\.\d+)((?:a|b|rc)\d*)/g,"$1-$2")}function isPyPyVersion(e){return e.startsWith("pypy")}async function setupActionsPython(e,t,r){IS_MAC&&(process.env.AGENT_TOOLSDIRECTORY="/Users/runner/hostedtoolcache");const i=process.env.AGENT_TOOLSDIRECTORY?.trim();if("string"==typeof i&&""!==i&&(process.env.RUNNER_TOOL_CACHE=process.env.AGENT_TOOLSDIRECTORY),coreExports.debug("Python is expected to be installed into "+process.env.RUNNER_TOOL_CACHE),e){let t;if(isPyPyVersion(e)){const i=await findPyPyVersion(e,r,!0,checkLatest,!1);t=`${i.resolvedPyPyVersion}-${i.resolvedPythonVersion}`,info(`Successfully set up PyPy ${i.resolvedPyPyVersion} with Python (${i.resolvedPythonVersion})`)}else{const i=await useCpythonVersion(e,r);t=i.version,info(`Successfully set up ${i.impl} (${t})`)}}ciInfo.GITHUB_ACTIONS&&await addPythonLoggingMatcher()}async function addPythonLoggingMatcher(){const e=join(dirname,"python_matcher.json");if(!(await pathExists(e)))return warning("the python_matcher.json file does not exist in the same folder as setup-cpp.js");info("::add-matcher::"+e)}import*as path$9 from"path";import path__default,{join}from"path";import require$$5,{fileURLToPath}from"url";import{c as commonjsGlobal,s as semverExports,r as requireCore,t as tunnel,i as io$3,v as v4_1$1,e as exec$1,a as rng$1,b as bytesToUuid_1,g as getAugmentedNamespace,d as require$$1$3,f as auth,h as semver$2,j as coreExports,k as getExecOutput_1,l as exec_2,m as info,n as ciInfo,p as pathExists,w as warning}from"../setup-cpp.mjs";import*as fs$5 from"fs";import fs__default from"fs";import*as require$$0 from"os";import require$$0__default from"os";import require$$0$1 from"child_process";import http__default from"http";import https__default from"https";import require$$0$2,{Readable as Readable$1}from"stream";import*as require$$9 from"util";import require$$9__default from"util";import require$$0$3 from"assert";import crypto$1,{randomUUID as randomUUID$1,createHmac}from"crypto";import*as os$2 from"node:os";import{EOL as EOL$1}from"node:os";import require$$1,{inspect}from"node:util";import*as process$1 from"node:process";import*as http$1 from"node:http";import*as https$1 from"node:https";import*as zlib from"node:zlib";import{Readable,Transform}from"node:stream";import require$$0$4 from"net";import require$$1$2 from"tls";import require$$1$1 from"tty";import require$$4,{EventEmitter}from"events";import require$$0$5 from"buffer";import"fs/promises";import"node:buffer";import"node:path";import"node:child_process";import"node:url";import"node:fs";import"process";import"node:string_decoder";import"node:tty";import"node:timers/promises";import"node:events";import"node:v8";import"node:stream/promises";import"string_decoder";import"timers";import"console";var toolCache={},manifest={exports:{}};!function(e,t){var r=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),i=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const o=n(semverExports),s=requireCore(),l=require$$0__default,c=require$$0$1,m=fs__default;t._findMatch=function(t,r,i,n){return a(this,void 0,void 0,(function*(){const a=l.platform();let c,m,d;for(const l of i){const i=l.version;if(s.debug(`check ${i} satisfies ${t}`),o.satisfies(i,t)&&(!r||l.stable===r)&&(d=l.files.find((t=>{s.debug(`${t.arch}===${n} && ${t.platform}===${a}`);let r=t.arch===n&&t.platform===a;if(r&&t.platform_version){const i=e.exports._getOsVersion();r=i===t.platform_version||o.satisfies(i,t.platform_version)}return r})),d)){s.debug("matched "+l.version),m=l;break}}return m&&d&&(c=Object.assign({},m),c.files=[d]),c}))},t._getOsVersion=function(){const t=l.platform();let r="";if("darwin"===t)r=""+c.execSync("sw_vers -productVersion");else if("linux"===t){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(2===e.length&&("VERSION_ID"===e[0].trim()||"DISTRIB_RELEASE"===e[0].trim())){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let r="";return m.existsSync(e)?r=""+m.readFileSync(e):m.existsSync(t)&&(r=""+m.readFileSync(t)),r}}(manifest,manifest.exports);var manifestExports=manifest.exports,httpClient={},proxy={};Object.defineProperty(proxy,"__esModule",{value:!0}),proxy.getProxyUrl=getProxyUrl,proxy.checkBypass=checkBypass,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=http__default,r=https__default,i=proxy;let n;var a,o,s,l,c;(o=a=e.HttpCodes||(e.HttpCodes={}))[o.OK=200]="OK",o[o.MultipleChoices=300]="MultipleChoices",o[o.MovedPermanently=301]="MovedPermanently",o[o.ResourceMoved=302]="ResourceMoved",o[o.SeeOther=303]="SeeOther",o[o.NotModified=304]="NotModified",o[o.UseProxy=305]="UseProxy",o[o.SwitchProxy=306]="SwitchProxy",o[o.TemporaryRedirect=307]="TemporaryRedirect",o[o.PermanentRedirect=308]="PermanentRedirect",o[o.BadRequest=400]="BadRequest",o[o.Unauthorized=401]="Unauthorized",o[o.PaymentRequired=402]="PaymentRequired",o[o.Forbidden=403]="Forbidden",o[o.NotFound=404]="NotFound",o[o.MethodNotAllowed=405]="MethodNotAllowed",o[o.NotAcceptable=406]="NotAcceptable",o[o.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",o[o.RequestTimeout=408]="RequestTimeout",o[o.Conflict=409]="Conflict",o[o.Gone=410]="Gone",o[o.TooManyRequests=429]="TooManyRequests",o[o.InternalServerError=500]="InternalServerError",o[o.NotImplemented=501]="NotImplemented",o[o.BadGateway=502]="BadGateway",o[o.ServiceUnavailable=503]="ServiceUnavailable",o[o.GatewayTimeout=504]="GatewayTimeout",(l=s=e.Headers||(e.Headers={})).Accept="accept",l.ContentType="content-type",(c=e.MediaTypes||(e.MediaTypes={})).ApplicationJson="application/json",e.getProxyUrl=function(e){let t=i.getProxyUrl(new URL(e));return t?t.href:""};const m=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect],d=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout],p=["OPTIONS","GET","DELETE","HEAD"];class u extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,u.prototype)}}e.HttpClientError=u;class h{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])})),this.message.on("end",(()=>{e(""+r)}))}))}}e.HttpClientResponse=h,e.isHttps=function(e){return"https:"===new URL(e).protocol};class g{constructor(e,t,r){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries))}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,i){return this.request(e,t,r,i)}async getJson(e,t={}){t[s.Accept]=this._getExistingOrDefaultHeader(t,s.Accept,c.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,c.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,c.ApplicationJson);let n=await this.post(e,i,r);return this._processResponse(n,this.requestOptions)}async putJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,c.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,c.ApplicationJson);let n=await this.put(e,i,r);return this._processResponse(n,this.requestOptions)}async patchJson(e,t,r={}){let i=JSON.stringify(t,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,c.ApplicationJson),r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,c.ApplicationJson);let n=await this.patch(e,i,r);return this._processResponse(n,this.requestOptions)}async request(e,t,r,i){if(this._disposed)throw Error("Client has already been disposed.");let n,o=new URL(t),s=this._prepareRequest(e,o,i),l=this._allowRetries&&-1!=p.indexOf(e)?this._maxRetries+1:1,c=0;for(;l>c;){if(n=await this.requestRaw(s,r),n&&n.message&&n.message.statusCode===a.Unauthorized){let e;for(let t=0;this.handlers.length>t;t++)if(this.handlers[t].canHandleAuthentication(n)){e=this.handlers[t];break}return e?e.handleAuthentication(this,s,r):n}let t=this._maxRedirects;for(;-1!=m.indexOf(n.message.statusCode)&&this._allowRedirects&&t>0;){const a=n.message.headers.location;if(!a)break;let l=new URL(a);if("https:"==o.protocol&&o.protocol!=l.protocol&&!this._allowRedirectDowngrade)throw Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(await n.readBody(),l.hostname!==o.hostname)for(let e in i)"authorization"===e.toLowerCase()&&delete i[e];s=this._prepareRequest(e,l,i),n=await this.requestRaw(s,r),t--}if(-1==d.indexOf(n.message.statusCode))return n;c+=1,l>c&&(await n.readBody(),await this._performExponentialBackoff(c))}return n}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}requestRaw(e,t){return new Promise(((r,i)=>{this.requestRawWithCallback(e,t,(function(e,t){e&&i(e),r(t)}))}))}requestRawWithCallback(e,t,r){let i;"string"==typeof t&&(e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let n=!1,a=(e,t)=>{n||(n=!0,r(e,t))},o=e.httpModule.request(e.options,(e=>{let t=new h(e);a(null,t)}));o.on("socket",(e=>{i=e})),o.setTimeout(this._socketTimeout||18e4,(()=>{i&&i.end(),a(Error("Request timeout: "+e.options.path),null)})),o.on("error",(function(e){a(e,null)})),t&&"string"==typeof t&&o.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){o.end()})),t.pipe(o)):o.end()}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,i,n){const a={};a.parsedUrl=i;const o="https:"===a.parsedUrl.protocol;a.httpModule=o?r:t;const s=o?443:80;return a.options={},a.options.host=a.parsedUrl.hostname,a.options.port=a.parsedUrl.port?parseInt(a.parsedUrl.port):s,a.options.path=(a.parsedUrl.pathname||"")+(a.parsedUrl.search||""),a.options.method=e,a.options.headers=this._mergeHeaders(n),null!=this.userAgent&&(a.options.headers["user-agent"]=this.userAgent),a.options.agent=this._getAgent(a.parsedUrl),this.handlers&&this.handlers.forEach((e=>{e.prepareRequest(a.options)})),a}_mergeHeaders(e){const t=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});return this.requestOptions&&this.requestOptions.headers?Object.assign({},t(this.requestOptions.headers),t(e)):t(e||{})}_getExistingOrDefaultHeader(e,t,r){let i;var n;return this.requestOptions&&this.requestOptions.headers&&(i=(n=this.requestOptions.headers,Object.keys(n).reduce(((e,t)=>(e[t.toLowerCase()]=n[t],e)),{}))[t]),e[t]||i||r}_getAgent(e){let a,o=i.getProxyUrl(e),s=o&&o.hostname;if(this._keepAlive&&s&&(a=this._proxyAgent),this._keepAlive&&!s&&(a=this._agent),a)return a;const l="https:"===e.protocol;let c=100;if(this.requestOptions&&(c=this.requestOptions.maxSockets||t.globalAgent.maxSockets),s){n||(n=tunnel);const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{...(o.username||o.password)&&{proxyAuth:`${o.username}:${o.password}`},host:o.hostname,port:o.port}};let t;const r="https:"===o.protocol;t=l?r?n.httpsOverHttps:n.httpsOverHttp:r?n.httpOverHttps:n.httpOverHttp,a=t(e),this._proxyAgent=a}if(this._keepAlive&&!a){const e={keepAlive:this._keepAlive,maxSockets:c};a=l?new r.Agent(e):new t.Agent(e),this._agent=a}return a||(a=l?r.globalAgent:t.globalAgent),l&&this._ignoreSslError&&(a.options=Object.assign(a.options||{},{rejectUnauthorized:!1})),a}_performExponentialBackoff(e){const t=5*Math.pow(2,e=Math.min(10,e));return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if("string"==typeof t){let e=new Date(t);if(!isNaN(e.valueOf()))return e}return t}async _processResponse(e,t){return new Promise((async(r,i)=>{const n=e.message.statusCode,o={statusCode:n,result:null,headers:{}};let s,l;n==a.NotFound&&r(o);try{l=await e.readBody(),l&&l.length>0&&(s=t&&t.deserializeDates?JSON.parse(l,g.dateTimeDeserializer):JSON.parse(l),o.result=s),o.headers=e.message.headers}catch(c){}if(n>299){let e;e=s&&s.message?s.message:l&&l.length>0?l:"Failed request: ("+n+")";let t=new u(e,n);t.result=o.result,i(t)}else r(o)}))}}e.HttpClient=g}(httpClient);var retryHelper={},__createBinding$h=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$h=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$h=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$h(t,e,r);return __setModuleDefault$h(t,e),t},__awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(retryHelper,"__esModule",{value:!0}),retryHelper.RetryHelper=void 0;const core$9=__importStar$h(requireCore());class RetryHelper{constructor(e,t,r){if(1>e)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return __awaiter$9(this,void 0,void 0,(function*(){let r=1;for(;this.maxAttempts>r;){try{return yield e()}catch(i){if(t&&!t(i))throw i;core$9.info(i.message)}const n=this.getSleepAmount();core$9.info(`Waiting ${n} seconds before trying again`),yield this.sleep(n),r++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return __awaiter$9(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}}retryHelper.RetryHelper=RetryHelper;var __createBinding$g=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$g=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$g=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$g(t,e,r);return __setModuleDefault$g(t,e),t},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))},__importDefault$6=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(toolCache,"__esModule",{value:!0}),toolCache.evaluateVersions=toolCache.isExplicitVersion=findFromManifest_1=toolCache.findFromManifest=getManifestFromRepo_1=toolCache.getManifestFromRepo=toolCache.findAllVersions=find_1=toolCache.find=toolCache.cacheFile=cacheDir_1=toolCache.cacheDir=extractZip_1=toolCache.extractZip=toolCache.extractXar=extractTar_1=toolCache.extractTar=toolCache.extract7z=downloadTool_1=toolCache.downloadTool=HTTPError_1=toolCache.HTTPError=void 0;const core$8=__importStar$g(requireCore()),io$2=__importStar$g(io$3),fs$4=__importStar$g(fs__default),mm=__importStar$g(manifestExports),os$1=__importStar$g(require$$0__default),path$8=__importStar$g(path__default),httpm=__importStar$g(httpClient),semver$1=__importStar$g(semverExports),stream$2=__importStar$g(require$$0$2),util$6=__importStar$g(require$$9__default),v4_1=__importDefault$6(v4_1$1),exec_1$1=exec$1,assert_1$4=require$$0$3,retry_helper_1=retryHelper;class HTTPError extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}var HTTPError_1=toolCache.HTTPError=HTTPError;const IS_WINDOWS$7="win32"===process.platform,IS_MAC$1="darwin"===process.platform,userAgent="actions/tool-cache";var downloadTool_1=toolCache.downloadTool=downloadTool;toolCache.extract7z=extract7z;var extractTar_1=toolCache.extractTar=extractTar$1;toolCache.extractXar=extractXar;var extractZip_1=toolCache.extractZip=extractZip,cacheDir_1=toolCache.cacheDir=cacheDir;toolCache.cacheFile=cacheFile;var find_1=toolCache.find=find;toolCache.findAllVersions=findAllVersions;var getManifestFromRepo_1=toolCache.getManifestFromRepo=getManifestFromRepo,findFromManifest_1=toolCache.findFromManifest=findFromManifest;toolCache.isExplicitVersion=isExplicitVersion,toolCache.evaluateVersions=evaluateVersions;var cache={},cacheUtils={},glob$1={},internalGlobber={},internalGlobOptionsHelper={},__createBinding$f=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$f=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$f=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$f(t,e,r);return __setModuleDefault$f(t,e),t};Object.defineProperty(internalGlobOptionsHelper,"__esModule",{value:!0}),internalGlobOptionsHelper.getOptions=void 0;const core$7=__importStar$f(requireCore());internalGlobOptionsHelper.getOptions=getOptions;var internalPatternHelper={},internalPathHelper={},__createBinding$e=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$e=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$e=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$e(t,e,r);return __setModuleDefault$e(t,e),t},__importDefault$5=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(internalPathHelper,"__esModule",{value:!0}),internalPathHelper.safeTrimTrailingSeparator=internalPathHelper.normalizeSeparators=internalPathHelper.hasRoot=internalPathHelper.hasAbsoluteRoot=internalPathHelper.ensureAbsoluteRoot=internalPathHelper.dirname=void 0;const path$7=__importStar$e(path__default),assert_1$3=__importDefault$5(require$$0$3),IS_WINDOWS$6="win32"===process.platform;internalPathHelper.dirname=dirname$1,internalPathHelper.ensureAbsoluteRoot=ensureAbsoluteRoot,internalPathHelper.hasAbsoluteRoot=hasAbsoluteRoot,internalPathHelper.hasRoot=hasRoot,internalPathHelper.normalizeSeparators=normalizeSeparators,internalPathHelper.safeTrimTrailingSeparator=safeTrimTrailingSeparator;var internalMatchKind={},exports,MatchKind;exports=internalMatchKind,Object.defineProperty(exports,"__esModule",{value:!0}),exports.MatchKind=void 0,(MatchKind=exports.MatchKind||(exports.MatchKind={}))[MatchKind.None=0]="None",MatchKind[MatchKind.Directory=1]="Directory",MatchKind[MatchKind.File=2]="File",MatchKind[MatchKind.All=3]="All";var __createBinding$d=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$d=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$d=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$d(t,e,r);return __setModuleDefault$d(t,e),t};Object.defineProperty(internalPatternHelper,"__esModule",{value:!0}),internalPatternHelper.partialMatch=internalPatternHelper.match=internalPatternHelper.getSearchPaths=void 0;const pathHelper$2=__importStar$d(internalPathHelper),internal_match_kind_1$2=internalMatchKind,IS_WINDOWS$5="win32"===process.platform;internalPatternHelper.getSearchPaths=getSearchPaths,internalPatternHelper.match=match,internalPatternHelper.partialMatch=partialMatch;var internalPattern={},concatMap$1=function(e,t){for(var r=[],i=0;e.length>i;i++){var n=t(e[i],i);isArray(n)?r.push.apply(r,n):r.push(n)}return r},isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},balancedMatch=balanced$1;balanced$1.range=range$1;var concatMap=concatMap$1,balanced=balancedMatch,braceExpansion=expandTop,escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0",minimatch_1$1=minimatch;minimatch.Minimatch=Minimatch;var path$6=function(){try{return require("path")}catch(e){}}()||{sep:"/"};minimatch.sep=path$6.sep;var GLOBSTAR=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={},expand=braceExpansion,plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",reSpecials=charSet("().*{}+?[]^$\\!"),slashSplit=/\/+/;minimatch.filter=filter,minimatch.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return minimatch;var t=minimatch,r=function(r,i,n){return t(r,i,ext(e,n))};return(r.Minimatch=function(r,i){return new t.Minimatch(r,ext(e,i))}).defaults=function(r){return t.defaults(ext(e,r)).Minimatch},r.filter=function(r,i){return t.filter(r,ext(e,i))},r.defaults=function(r){return t.defaults(ext(e,r))},r.makeRe=function(r,i){return t.makeRe(r,ext(e,i))},r.braceExpand=function(r,i){return t.braceExpand(r,ext(e,i))},r.match=function(r,i,n){return t.match(r,i,ext(e,n))},r},Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch},Minimatch.prototype.debug=function(){},Minimatch.prototype.make=make,Minimatch.prototype.parseNegate=parseNegate,minimatch.braceExpand=function(e,t){return braceExpand(e,t)},Minimatch.prototype.braceExpand=braceExpand;var MAX_PATTERN_LENGTH=65536,assertValidPattern=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")};Minimatch.prototype.parse=parse$2;var SUBPARSE={};minimatch.makeRe=function(e,t){return new Minimatch(e,t||{}).makeRe()},Minimatch.prototype.makeRe=makeRe,minimatch.match=function(e,t,r){var i=new Minimatch(t,r=r||{});return e=e.filter((function(e){return i.match(e)})),i.options.nonull&&!e.length&&e.push(t),e},Minimatch.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==path$6.sep&&(e=e.split(path$6.sep).join("/")),e=e.split(slashSplit),this.debug(this.pattern,"split",e);var i,n,a=this.set;for(this.debug(this.pattern,"set",a),n=e.length-1;n>=0&&!(i=e[n]);n--);for(n=0;a.length>n;n++){var o=a[n],s=e;if(r.matchBase&&1===o.length&&(s=[i]),this.matchOne(s,o,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},Minimatch.prototype.matchOne=function(e,t,r){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var n=0,a=0,o=e.length,s=t.length;o>n&&s>a;n++,a++){this.debug("matchOne loop");var l,c=t[a],m=e[n];if(this.debug(t,c,m),!1===c)return!1;if(c===GLOBSTAR){this.debug("GLOBSTAR",[t,c,m]);var d=n,p=a+1;if(p===s){for(this.debug("** at the end");o>n;n++)if("."===e[n]||".."===e[n]||!i.dot&&"."===e[n].charAt(0))return!1;return!0}for(;o>d;){var u=e[d];if(this.debug("\nglobstar while",e,d,t,p,u),this.matchOne(e.slice(d),t.slice(p),r))return this.debug("globstar found match!",d,o,u),!0;if("."===u||".."===u||!i.dot&&"."===u.charAt(0)){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!r||(this.debug("\n>>> no match, partial?",e,d,t,p),d!==o))}if("string"==typeof c?this.debug("string match",c,m,l=m===c):(l=m.match(c),this.debug("pattern match",c,m,l)),!l)return!1}if(n===o&&a===s)return!0;if(n===o)return r;if(a===s)return n===o-1&&""===e[n];throw Error("wtf?")};var internalPath={},__createBinding$c=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$c=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$c=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$c(t,e,r);return __setModuleDefault$c(t,e),t},__importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(internalPath,"__esModule",{value:!0}),internalPath.Path=void 0;const path$5=__importStar$c(path__default),pathHelper$1=__importStar$c(internalPathHelper),assert_1$2=__importDefault$4(require$$0$3),IS_WINDOWS$4="win32"===process.platform;class Path{constructor(e){if(this.segments=[],"string"==typeof e)if(assert_1$2.default(e,"Parameter 'itemPath' must not be empty"),e=pathHelper$1.safeTrimTrailingSeparator(e),pathHelper$1.hasRoot(e)){let t=e,r=pathHelper$1.dirname(t);for(;r!==t;){const e=path$5.basename(t);this.segments.unshift(e),t=r,r=pathHelper$1.dirname(t)}this.segments.unshift(t)}else this.segments=e.split(path$5.sep);else{assert_1$2.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let t=0;e.length>t;t++){let r=e[t];assert_1$2.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=pathHelper$1.normalizeSeparators(e[t]),0===t&&pathHelper$1.hasRoot(r)?(r=pathHelper$1.safeTrimTrailingSeparator(r),assert_1$2.default(r===pathHelper$1.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(assert_1$2.default(!r.includes(path$5.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],t=e.endsWith(path$5.sep)||IS_WINDOWS$4&&/^[A-Z]:$/i.test(e);for(let r=1;this.segments.length>r;r++)t?t=!1:e+=path$5.sep,e+=this.segments[r];return e}}internalPath.Path=Path;var __createBinding$b=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$b=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$b=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$b(t,e,r);return __setModuleDefault$b(t,e),t},__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(internalPattern,"__esModule",{value:!0}),internalPattern.Pattern=void 0;const os=__importStar$b(require$$0__default),path$4=__importStar$b(path__default),pathHelper=__importStar$b(internalPathHelper),assert_1$1=__importDefault$3(require$$0$3),minimatch_1=minimatch_1$1,internal_match_kind_1$1=internalMatchKind,internal_path_1=internalPath,IS_WINDOWS$3="win32"===process.platform;class Pattern{constructor(e,t=!1,r,i){let n;if(this.negate=!1,"string"==typeof e)n=e.trim();else{assert_1$1.default((r=r||[]).length,"Parameter 'segments' must not empty");const t=Pattern.getLiteral(r[0]);assert_1$1.default(t&&pathHelper.hasAbsoluteRoot(t),"Parameter 'segments' first element must be a root path"),n=(""+new internal_path_1.Path(r)).trim(),e&&(n="!"+n)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=Pattern.fixupPattern(n,i),this.segments=new internal_path_1.Path(n).segments,this.trailingSeparator=pathHelper.normalizeSeparators(n).endsWith(path$4.sep),n=pathHelper.safeTrimTrailingSeparator(n);let a=!1;const o=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!a&&!(a=""===e)));this.searchPath=""+new internal_path_1.Path(o),this.rootRegExp=RegExp(Pattern.regExpEscape(o[0]),IS_WINDOWS$3?"i":""),this.isImplicitPattern=t;const s={dot:!0,nobrace:!0,nocase:IS_WINDOWS$3,nocomment:!0,noext:!0,nonegate:!0};n=IS_WINDOWS$3?n.replace(/\\/g,"/"):n,this.minimatch=new minimatch_1.Minimatch(n,s)}match(e){return"**"===this.segments[this.segments.length-1]?(e=pathHelper.normalizeSeparators(e)).endsWith(path$4.sep)||!1!==this.isImplicitPattern||(e=`${e}${path$4.sep}`):e=pathHelper.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?internal_match_kind_1$1.MatchKind.Directory:internal_match_kind_1$1.MatchKind.All:internal_match_kind_1$1.MatchKind.None}partialMatch(e){return e=pathHelper.safeTrimTrailingSeparator(e),pathHelper.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(IS_WINDOWS$3?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(IS_WINDOWS$3?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){assert_1$1.default(e,"pattern cannot be empty");const r=new internal_path_1.Path(e).segments.map((e=>Pattern.getLiteral(e)));if(assert_1$1.default(r.every(((e,t)=>("."!==e||0===t)&&".."!==e)),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),assert_1$1.default(!pathHelper.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),"."===(e=pathHelper.normalizeSeparators(e))||e.startsWith("."+path$4.sep))e=Pattern.globEscape(process.cwd())+e.substr(1);else if("~"===e||e.startsWith("~"+path$4.sep))t=t||os.homedir(),assert_1$1.default(t,"Unable to determine HOME directory"),assert_1$1.default(pathHelper.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`),e=Pattern.globEscape(t)+e.substr(1);else if(IS_WINDOWS$3&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=pathHelper.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));e.length>2&&!t.endsWith("\\")&&(t+="\\"),e=Pattern.globEscape(t)+e.substr(2)}else if(IS_WINDOWS$3&&("\\"===e||e.match(/^\\[^\\]/))){let t=pathHelper.ensureAbsoluteRoot("C:\\dummy-root","\\");t.endsWith("\\")||(t+="\\"),e=Pattern.globEscape(t)+e.substr(1)}else e=pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e);return pathHelper.normalizeSeparators(e)}static getLiteral(e){let t="";for(let r=0;e.length>r;r++){const i=e[r];if("\\"!==i||IS_WINDOWS$3||r+1>=e.length){if("*"===i||"?"===i)return"";if("["===i&&e.length>r+1){let i="",n=-1;for(let t=r+1;e.length>t;t++){const r=e[t];if("\\"!==r||IS_WINDOWS$3||t+1>=e.length){if("]"===r){n=t;break}i+=r}else i+=e[++t]}if(n>=0){if(i.length>1)return"";if(i){t+=i,r=n;continue}}}t+=i}else t+=e[++r]}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}internalPattern.Pattern=Pattern;var internalSearchState={};Object.defineProperty(internalSearchState,"__esModule",{value:!0}),internalSearchState.SearchState=void 0;class SearchState{constructor(e,t){this.path=e,this.level=t}}internalSearchState.SearchState=SearchState;var __createBinding$a=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$a=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$a=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&__createBinding$a(t,e,r);return __setModuleDefault$a(t,e),t},__awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))},__asyncValues$2=commonjsGlobal&&commonjsGlobal.__asyncValues||function(e){function t(t){r[t]=e[t]&&function(r){return new Promise((function(i,n){!function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}(i,n,(r=e[t](r)).done,r.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)},__await$1=commonjsGlobal&&commonjsGlobal.__await||function(e){return this instanceof __await$1?(this.v=e,this):new __await$1(e)},__asyncGenerator$1=commonjsGlobal&&commonjsGlobal.__asyncGenerator||function(e,t,r){function i(e){c[e]&&(l[e]=function(t){return new Promise((function(r,i){m.push([e,t,r,i])>1||n(e,t)}))})}function n(e,t){try{(r=c[e](t)).value instanceof __await$1?Promise.resolve(r.value.v).then(a,o):s(m[0][2],r)}catch(i){s(m[0][3],i)}var r}function a(e){n("next",e)}function o(e){n("throw",e)}function s(e,t){e(t),m.shift(),m.length&&n(m[0][0],m[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=r.apply(e,t||[]),m=[];return l={},i("next"),i("throw"),i("return"),l[Symbol.asyncIterator]=function(){return this},l};Object.defineProperty(internalGlobber,"__esModule",{value:!0}),internalGlobber.DefaultGlobber=void 0;const core$6=__importStar$a(requireCore()),fs$3=__importStar$a(fs__default),globOptionsHelper=__importStar$a(internalGlobOptionsHelper),path$3=__importStar$a(path__default),patternHelper=__importStar$a(internalPatternHelper),internal_match_kind_1=internalMatchKind,internal_pattern_1=internalPattern,internal_search_state_1=internalSearchState,IS_WINDOWS$2="win32"===process.platform;class DefaultGlobber{constructor(e){this.patterns=[],this.searchPaths=[],this.options=globOptionsHelper.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return __awaiter$7(this,void 0,void 0,(function*(){const r=[];try{for(var i,n=__asyncValues$2(this.globGenerator());!(i=yield n.next()).done;)r.push(i.value)}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}return r}))}globGenerator(){return __asyncGenerator$1(this,arguments,(function*(){const e=globOptionsHelper.getOptions(this.options),t=[];for(const a of this.patterns)t.push(a),e.implicitDescendants&&(a.trailingSeparator||"**"!==a.segments[a.segments.length-1])&&t.push(new internal_pattern_1.Pattern(a.negate,!0,a.segments.concat("**")));const r=[];for(const a of patternHelper.getSearchPaths(t)){core$6.debug(`Search path '${a}'`);try{yield __await$1(fs$3.promises.lstat(a))}catch(n){if("ENOENT"===n.code)continue;throw n}r.unshift(new internal_search_state_1.SearchState(a,1))}const i=[];for(;r.length;){const n=r.pop(),a=patternHelper.match(t,n.path),o=!!a||patternHelper.partialMatch(t,n.path);if(!a&&!o)continue;const s=yield __await$1(DefaultGlobber.stat(n,e,i));if(s)if(s.isDirectory()){if(a&internal_match_kind_1.MatchKind.Directory)yield yield __await$1(n.path);else if(!o)continue;const e=n.level+1,t=(yield __await$1(fs$3.promises.readdir(n.path))).map((t=>new internal_search_state_1.SearchState(path$3.join(n.path,t),e)));r.push(...t.reverse())}else a&internal_match_kind_1.MatchKind.File&&(yield yield __await$1(n.path))}}))}static create(e,t){return __awaiter$7(this,void 0,void 0,(function*(){const r=new DefaultGlobber(t);IS_WINDOWS$2&&(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n"));const i=e.split("\n").map((e=>e.trim()));for(const e of i)e&&!e.startsWith("#")&&r.patterns.push(new internal_pattern_1.Pattern(e));return r.searchPaths.push(...patternHelper.getSearchPaths(r.patterns)),r}))}static stat(e,t,r){return __awaiter$7(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks)try{i=yield fs$3.promises.stat(e.path)}catch(n){if("ENOENT"===n.code){if(t.omitBrokenSymbolicLinks)return void core$6.debug(`Broken symlink '${e.path}'`);throw Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else i=yield fs$3.promises.lstat(e.path);if(i.isDirectory()&&t.followSymbolicLinks){const t=yield fs$3.promises.realpath(e.path);for(;r.length>=e.level;)r.pop();if(r.some((e=>e===t)))return void core$6.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);r.push(t)}return i}))}}internalGlobber.DefaultGlobber=DefaultGlobber;var __awaiter$6=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(glob$1,"__esModule",{value:!0}),glob$1.create=void 0;const internal_globber_1=internalGlobber;glob$1.create=create;var rng=rng$1,bytesToUuid=bytesToUuid_1,_nodeId,_clockseq,_lastMSecs=0,_lastNSecs=0,v1_1=v1$1,v1=v1_1,v4=v4_1$1,uuid=v4;uuid.v1=v1,uuid.v4=v4;var uuid_1$1=uuid,constants={},CacheFilename,CacheFilename2,CompressionMethod,CompressionMethod2,ArchiveToolType,ArchiveToolType2;Object.defineProperty(constants,"__esModule",{value:!0}),constants.ManifestFilename=constants.TarFilename=constants.SystemTarPathOnWindows=constants.GnuTarPathOnWindows=constants.SocketTimeout=constants.DefaultRetryDelay=constants.DefaultRetryAttempts=constants.ArchiveToolType=constants.CompressionMethod=constants.CacheFilename=void 0,CacheFilename2=CacheFilename||(constants.CacheFilename=CacheFilename={}),CacheFilename2.Gzip="cache.tgz",CacheFilename2.Zstd="cache.tzst",CompressionMethod2=CompressionMethod||(constants.CompressionMethod=CompressionMethod={}),CompressionMethod2.Gzip="gzip",CompressionMethod2.ZstdWithoutLong="zstd-without-long",CompressionMethod2.Zstd="zstd",ArchiveToolType2=ArchiveToolType||(constants.ArchiveToolType=ArchiveToolType={}),ArchiveToolType2.GNU="gnu",ArchiveToolType2.BSD="bsd",constants.DefaultRetryAttempts=2,constants.DefaultRetryDelay=5e3,constants.SocketTimeout=5e3,constants.GnuTarPathOnWindows=process.env.PROGRAMFILES+"\\Git\\usr\\bin\\tar.exe",constants.SystemTarPathOnWindows=process.env.SYSTEMDRIVE+"\\Windows\\System32\\tar.exe",constants.TarFilename="cache.tar",constants.ManifestFilename="manifest.txt";var __createBinding$9=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$9=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$9=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$9(t,e,r);return __setModuleDefault$9(t,e),t},__awaiter$5=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))},__asyncValues$1=commonjsGlobal&&commonjsGlobal.__asyncValues||function(e){function t(t){r[t]=e[t]&&function(r){return new Promise((function(i,n){!function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}(i,n,(r=e[t](r)).done,r.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)};Object.defineProperty(cacheUtils,"__esModule",{value:!0}),cacheUtils.isGhes=cacheUtils.assertDefined=cacheUtils.getGnuTarPathOnWindows=cacheUtils.getCacheFileName=cacheUtils.getCompressionMethod=cacheUtils.unlinkFile=cacheUtils.resolvePaths=cacheUtils.getArchiveFileSizeInBytes=cacheUtils.createTempDirectory=void 0;const core$5=__importStar$9(requireCore()),exec=__importStar$9(exec$1),glob=__importStar$9(glob$1),io$1=__importStar$9(io$3),fs$2=__importStar$9(fs__default),path$2=__importStar$9(path__default),semver=__importStar$9(semverExports),util$5=__importStar$9(require$$9__default),uuid_1=uuid_1$1,constants_1$3=constants;cacheUtils.createTempDirectory=createTempDirectory,cacheUtils.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes,cacheUtils.resolvePaths=resolvePaths,cacheUtils.unlinkFile=unlinkFile,cacheUtils.getCompressionMethod=getCompressionMethod,cacheUtils.getCacheFileName=getCacheFileName,cacheUtils.getGnuTarPathOnWindows=getGnuTarPathOnWindows,cacheUtils.assertDefined=assertDefined,cacheUtils.isGhes=isGhes;var cacheHttpClient$1={},downloadUtils={};const ValidPhaseNames=new Set(["Deserialize","Serialize","Retry","Sign"]);class HttpPipeline{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!ValidPhaseNames.has(t.phase))throw Error("Invalid phase name: "+t.phase);if(t.afterPhase&&!ValidPhaseNames.has(t.afterPhase))throw Error("Invalid afterPhase name: "+t.afterPhase);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((r=>!(e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase)||(t.push(r.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>r=>t.sendRequest(r,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new HttpPipeline(this._policies)}static create(){return new HttpPipeline}orderPolicies(){function e(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}function t(e){return"Retry"===e?c:"Serialize"===e?o:"Deserialize"===e?l:"Sign"===e?m:s}function r(e){e.hasRun=!0;for(const t of e.policies)if((!t.afterPhase||t.afterPhase.hasRun&&!t.afterPhase.policies.size)&&0===t.dependsOn.size){n.push(t.policy);for(const e of t.dependants)e.dependsOn.delete(t);a.delete(t.policy.name),e.policies.delete(t)}}function i(){for(const e of d){if(r(e),e.policies.size>0&&e!==s)return void(s.hasRun||r(s));e.hasAfterPolicies&&r(s)}}const n=[],a=new Map,o=e("Serialize"),s=e("None"),l=e("Deserialize"),c=e("Retry"),m=e("Sign"),d=[o,s,l,c,m];for(const u of this._policies){const e=u.policy,r=u.options,i=e.name;if(a.has(i))throw Error("Duplicate policy names not allowed in pipeline");const n={policy:e,dependsOn:new Set,dependants:new Set};r.afterPhase&&(n.afterPhase=t(r.afterPhase),n.afterPhase.hasAfterPolicies=!0),a.set(i,n),t(r.phase).policies.add(n)}for(const u of this._policies){const{policy:e,options:t}=u,r=e.name,i=a.get(r);if(!i)throw Error("Missing node for policy "+r);if(t.afterPolicies)for(const n of t.afterPolicies){const e=a.get(n);e&&(i.dependsOn.add(e),e.dependants.add(i))}if(t.beforePolicies)for(const n of t.beforePolicies){const e=a.get(n);e&&(e.dependsOn.add(i),i.dependants.add(e))}}let p=0;for(;a.size>0;){p++;const e=n.length;if(i(),e>=n.length&&p>1)throw Error("Cannot satisfy policy dependencies due to requirements cycle.")}return n}}const debugEnvVariable="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let enabledString,enabledNamespaces=[],skippedNamespaces=[];const debuggers=[];debugEnvVariable&&enable(debugEnvVariable);const debugObj=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log}),registeredLoggers=new Set,logLevelFromEnv="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let azureLogLevel;const AzureLogger=debugObj("azure");AzureLogger.log=(...e)=>{debugObj.log(...e)};const AZURE_LOG_LEVELS=["verbose","info","warning","error"];logLevelFromEnv&&(isAzureLogLevel(logLevelFromEnv)?setLogLevel(logLevelFromEnv):console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`));const levelMap={verbose:400,info:300,warning:200,error:100},logger$2=createClientLogger("core-rest-pipeline");let AbortError$1=class extends Error{constructor(e){super(e),this.name="AbortError"}};const StandardAbortMessage$1="The delay was aborted.";var _a$1;const uuidFunction="function"==typeof(null===(_a$1=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===_a$1?void 0:_a$1.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):randomUUID$1;var _a,_b,_c,_d;"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(_a=self.constructor)||void 0===_a?void 0:_a.name)||"ServiceWorkerGlobalScope"===(null===(_b=self.constructor)||void 0===_b?void 0:_b.name)||(_c=self.constructor)),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno,"undefined"!=typeof Bun&&Bun;const isNodeLike=void 0!==globalThis.process&&!!globalThis.process.version&&!!(null===(_d=globalThis.process.versions)||void 0===_d?void 0:_d.node),isNode=isNodeLike,RedactedString="REDACTED",defaultAllowedHeaderNames=["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"],defaultAllowedQueryParameters=["api-version"];class Sanitizer{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=defaultAllowedHeaderNames.concat(e),t=defaultAllowedQueryParameters.concat(t),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("headers"===e)return this.sanitizeHeaders(r);if("url"===e)return this.sanitizeUrl(r);if("query"===e)return this.sanitizeQuery(r);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(r)||isObject(r)){if(t.has(r))return"[Circular]";t.add(r)}return r}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[r]of t.searchParams)this.allowedQueryParameters.has(r.toLowerCase())||t.searchParams.set(r,RedactedString);return""+t}sanitizeHeaders(e){const t={};for(const r of Object.keys(e))t[r]=this.allowedHeaderNames.has(r.toLowerCase())?e[r]:RedactedString;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const r of Object.keys(e))t[r]=this.allowedQueryParameters.has(r.toLowerCase())?e[r]:RedactedString;return t}}const logPolicyName="logPolicy",redirectPolicyName="redirectPolicy",allowedRedirect=["GET","HEAD"],SDK_VERSION$1="1.17.0",DEFAULT_RETRY_POLICY_COUNT=3,UserAgentHeaderName=getUserAgentHeaderName(),userAgentPolicyName="userAgentPolicy";"function"==typeof SuppressedError&&SuppressedError;const rawContent=Symbol(),multipartPolicyName="multipartPolicy",maxBoundaryLength=70,validBoundaryCharacters=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?"),decompressResponsePolicyName="decompressResponsePolicy",StandardAbortMessage="The operation was aborted.",RetryAfterHeader="Retry-After",AllRetryAfterHeaders=["retry-after-ms","x-ms-retry-after-ms",RetryAfterHeader],DEFAULT_CLIENT_RETRY_INTERVAL=1e3,DEFAULT_CLIENT_MAX_RETRY_INTERVAL=64e3,retryPolicyLogger=createClientLogger("core-rest-pipeline retryPolicy"),retryPolicyName="retryPolicy",defaultRetryPolicyName="defaultRetryPolicy";class HttpHeadersImpl{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(normalizeName(e),{name:e,value:(t+"").trim()})}get(e){var t;return null===(t=this._headersMap.get(normalizeName(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(normalizeName(e))}delete(e){this._headersMap.delete(normalizeName(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const r of this._headersMap.values())t[r.name]=r.value;else for(const[r,i]of this._headersMap)t[r]=i.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return headerIterator(this._headersMap)}}const formDataPolicyName="formDataPolicy";var dist$2={},src$2={exports:{}},browser={exports:{}},ms,hasRequiredMs,common,hasRequiredCommon,hasRequiredBrowser,node={exports:{}},hasFlag,hasRequiredHasFlag,supportsColor_1,hasRequiredSupportsColor,hasRequiredNode;src$2.exports="undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?requireBrowser():requireNode();var srcExports=src$2.exports,dist$1={},helpers={},__createBinding$8=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$8=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$8=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$8(t,e,r);return __setModuleDefault$8(t,e),t};Object.defineProperty(helpers,"__esModule",{value:!0}),helpers.req=helpers.json=helpers.toBuffer=void 0;const http=__importStar$8(http__default),https=__importStar$8(https__default);helpers.toBuffer=toBuffer,helpers.json=json,helpers.req=req,function(e){var t=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&t(i,e,n);return r(i,e),i},n=commonjsGlobal&&commonjsGlobal.__exportStar||function(e,r){for(var i in e)"default"===i||{}.hasOwnProperty.call(r,i)||t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;const a=i(require$$0$4),o=i(http__default),s=https__default;n(helpers,e);const l=Symbol();e.Agent=class extends o.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if("boolean"==typeof e.secureEndpoint)return e.secureEndpoint;if("string"==typeof e.protocol)return"https:"===e.protocol}const{stack:t}=Error();return"string"==typeof t&&t.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);const t=new a.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||null===t)return;const r=this.sockets[e],i=r.indexOf(t);-1!==i&&(r.splice(i,1),this.totalSocketCount--,0===r.length&&delete this.sockets[e])}getName(e){return("boolean"==typeof e.secureEndpoint?e.secureEndpoint:this.isSecureEndpoint(e))?s.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){const i={...t,secureEndpoint:this.isSecureEndpoint(t)},n=this.getName(i),a=this.incrementSockets(n);Promise.resolve().then((()=>this.connect(e,i))).then((s=>{if(this.decrementSockets(n,a),s instanceof o.Agent)return s.addRequest(e,i);this[l].currentSocket=s,super.createSocket(e,t,r)}),(e=>{this.decrementSockets(n,a),r(e)}))}createConnection(){const e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[l]&&(this[l].protocol=e)}}}(dist$1);var parseProxyResponse$1={},__importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(parseProxyResponse$1,"__esModule",{value:!0}),parseProxyResponse$1.parseProxyResponse=void 0;const debug_1$2=__importDefault$2(srcExports),debug$2=(0,debug_1$2.default)("https-proxy-agent:parse-proxy-response");parseProxyResponse$1.parseProxyResponse=parseProxyResponse;var __createBinding$7=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$7=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$7=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$7(t,e,r);return __setModuleDefault$7(t,e),t},__importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dist$2,"__esModule",{value:!0});var HttpsProxyAgent_1=dist$2.HttpsProxyAgent=void 0;const net$1=__importStar$7(require$$0$4),tls$1=__importStar$7(require$$1$2),assert_1=__importDefault$1(require$$0$3),debug_1$1=__importDefault$1(srcExports),agent_base_1$1=dist$1,url_1$2=require$$5,parse_proxy_response_1=parseProxyResponse$1,debug$1=(0,debug_1$1.default)("https-proxy-agent");class HttpsProxyAgent extends agent_base_1$1.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy="string"==typeof e?new url_1$2.URL(e):e,this.proxyHeaders=t?.headers??{},debug$1("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?omit$1(t,"headers"):null,host:r,port:i}}async connect(e,t){const{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let i;"https:"===r.protocol?(debug$1("Creating `tls.Socket`: %o",this.connectOpts),i=tls$1.connect({...this.connectOpts,servername:this.connectOpts.servername||this.connectOpts.host})):(debug$1("Creating `net.Socket`: %o",this.connectOpts),i=net$1.connect(this.connectOpts));const n="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},a=net$1.isIPv6(t.host)?`[${t.host}]`:t.host;let o=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;(r.username||r.password)&&(n["Proxy-Authorization"]="Basic "+Buffer.from(`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`).toString("base64")),n.Host=`${a}:${t.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const d of Object.keys(n))o+=`${d}: ${n[d]}\r\n`;const s=(0,parse_proxy_response_1.parseProxyResponse)(i);i.write(o+"\r\n");const{connect:l,buffered:c}=await s;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),200===l.statusCode){if(e.once("socket",resume),t.secureEndpoint){debug$1("Upgrading socket connection to TLS");const e=t.servername||t.host;return tls$1.connect({...omit$1(t,"host","path","port"),socket:i,servername:e})}return i}i.destroy();const m=new net$1.Socket({writable:!1});return m.readable=!0,e.once("socket",(e=>{debug$1("Replaying proxy buffer for failed request"),(0,assert_1.default)(e.listenerCount("data")>0),e.push(c),e.push(null)})),m}}HttpsProxyAgent.protocols=["http","https"],HttpsProxyAgent_1=dist$2.HttpsProxyAgent=HttpsProxyAgent;var dist={},__createBinding$6=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$6=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$6=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$6(t,e,r);return __setModuleDefault$6(t,e),t},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dist,"__esModule",{value:!0});var HttpProxyAgent_1=dist.HttpProxyAgent=void 0;const net=__importStar$6(require$$0$4),tls=__importStar$6(require$$1$2),debug_1=__importDefault(srcExports),events_1=require$$4,agent_base_1=dist$1,url_1$1=require$$5,debug=(0,debug_1.default)("http-proxy-agent");class HttpProxyAgent extends agent_base_1.Agent{constructor(e,t){super(t),this.proxy="string"==typeof e?new url_1$1.URL(e):e,this.proxyHeaders=t?.headers??{},debug("Creating new HttpProxyAgent instance: %o",this.proxy.href);const r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={...t?omit(t,"headers"):null,host:r,port:i}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){const{proxy:r}=this,i=t.secureEndpoint?"https:":"http:",n=e.getHeader("host")||"localhost",a=new url_1$1.URL(e.path,`${i}//${n}`);80!==t.port&&(a.port=t.port+""),e.path=a+"";const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders};(r.username||r.password)&&(o["Proxy-Authorization"]="Basic "+Buffer.from(`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`).toString("base64")),o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const s of Object.keys(o)){const t=o[s];t&&e.setHeader(s,t)}}async connect(e,t){let r,i,n;return e._header=null,e.path.includes("://")||this.setRequestProps(e,t),debug("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(debug("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,i=r.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+r.substring(i),debug("Output buffer: %o",e.outputData[0].data)),"https:"===this.proxy.protocol?(debug("Creating `tls.Socket`: %o",this.connectOpts),n=tls.connect(this.connectOpts)):(debug("Creating `net.Socket`: %o",this.connectOpts),n=net.connect(this.connectOpts)),await(0,events_1.once)(n,"connect"),n}}HttpProxyAgent.protocols=["http","https"],HttpProxyAgent_1=dist.HttpProxyAgent=HttpProxyAgent;const HTTPS_PROXY="HTTPS_PROXY",HTTP_PROXY="HTTP_PROXY",ALL_PROXY="ALL_PROXY",NO_PROXY="NO_PROXY",proxyPolicyName="proxyPolicy",globalNoProxyList=[];let noProxyListLoaded=!1;const globalBypassedMap=new Map,setClientRequestIdPolicyName="setClientRequestIdPolicy",tlsPolicyName="tlsPolicy",knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};class TracingContextImpl{constructor(e){this._contextMap=e instanceof TracingContextImpl?new Map(e._contextMap):new Map}setValue(e,t){const r=new TracingContextImpl(this);return r._contextMap.set(e,t),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new TracingContextImpl(this);return t._contextMap.delete(e),t}}var state$3={};Object.defineProperty(state$3,"__esModule",{value:!0});var state_1$1=state$3.state=void 0;state_1$1=state$3.state={instrumenterImplementation:void 0};const state$2=state_1$1,custom=inspect.custom,errorSanitizer=new Sanitizer;class RestError extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,RestError.prototype)}[custom](){return`RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",RestError.PARSE_ERROR="PARSE_ERROR";const tracingPolicyName="tracingPolicy",DEFAULT_TLS_SETTINGS={};class ReportTransform extends Transform{_transform(e,t,r){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),r()}catch(i){r(i)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}}class NodeHttpClient{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var t,r,i;const n=new AbortController;let a;if(e.abortSignal){if(e.abortSignal.aborted)throw new AbortError$1("The operation was aborted.");a=e=>{"abort"===e.type&&n.abort()},e.abortSignal.addEventListener("abort",a)}e.timeout>0&&setTimeout((()=>{n.abort()}),e.timeout);const o=e.headers.get("Accept-Encoding"),s=(null==o?void 0:o.includes("gzip"))||(null==o?void 0:o.includes("deflate"));let l,c="function"==typeof e.body?e.body():e.body;if(c&&!e.headers.has("Content-Length")){const t=getBodyLength(c);null!==t&&e.headers.set("Content-Length",t)}try{if(c&&e.onUploadProgress){const t=new ReportTransform(e.onUploadProgress);t.on("error",(e=>{logger$2.error("Error in upload progress",e)})),isReadableStream(c)?c.pipe(t):t.end(c),c=t}const a=await this.makeRequest(e,n,c),o=getResponseHeaders(a),m={status:null!==(t=a.statusCode)&&void 0!==t?t:0,headers:o,request:e};if("HEAD"===e.method)return a.resume(),m;l=s?getDecodedResponseStream(a,o):a;const d=e.onDownloadProgress;if(d){const e=new ReportTransform(d);e.on("error",(e=>{logger$2.error("Error in download progress",e)})),l.pipe(e),l=e}return(null===(r=e.streamResponseStatusCodes)||void 0===r?void 0:r.has(1/0))||(null===(i=e.streamResponseStatusCodes)||void 0===i?void 0:i.has(m.status))?m.readableStreamBody=l:m.bodyAsText=await streamToText(l),m}finally{if(e.abortSignal&&a){let t=Promise.resolve();isReadableStream(c)&&(t=isStreamComplete(c));let r=Promise.resolve();isReadableStream(l)&&(r=isStreamComplete(l)),Promise.all([t,r]).then((()=>{var t;a&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",a))})).catch((e=>{logger$2.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}makeRequest(e,t,r){var i;const n=new URL(e.url),a="https:"!==n.protocol;if(a&&!e.allowInsecureConnection)throw Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);const o={agent:null!==(i=e.agent)&&void 0!==i?i:this.getOrCreateAgent(e,a),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise(((i,n)=>{const s=a?http$1.request(o,i):https$1.request(o,i);s.once("error",(t=>{var r;n(new RestError(t.message,{code:null!==(r=t.code)&&void 0!==r?r:RestError.REQUEST_SEND_ERROR,request:e}))})),t.signal.addEventListener("abort",(()=>{const e=new AbortError$1("The operation was aborted.");s.destroy(e),n(e)})),r&&isReadableStream(r)?r.pipe(s):r?"string"==typeof r||Buffer.isBuffer(r)?s.end(r):isArrayBuffer(r)?s.end(ArrayBuffer.isView(r)?Buffer.from(r.buffer):Buffer.from(r)):(logger$2.error("Unrecognized body type",r),n(new RestError("Unrecognized body type"))):s.end()}))}getOrCreateAgent(e,t){var r;const i=e.disableKeepAlive;if(t)return i?http$1.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new http$1.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return https$1.globalAgent;const t=null!==(r=e.tlsSettings)&&void 0!==r?r:DEFAULT_TLS_SETTINGS;let n=this.cachedHttpsAgents.get(t);return n&&n.options.keepAlive===!i||(logger$2.info("No cached TLS Agent exist, creating a new Agent"),n=new https$1.Agent(Object.assign({keepAlive:!i},t)),this.cachedHttpsAgents.set(t,n)),n}}}class PipelineRequestImpl{constructor(e){var t,r,i,n,a,o,s;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:createHttpHeaders(),this.method=null!==(r=e.method)&&void 0!==r?r:"GET",this.timeout=null!==(i=e.timeout)&&void 0!==i?i:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(n=e.disableKeepAlive)&&void 0!==n&&n,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(a=e.withCredentials)&&void 0!==a&&a,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||randomUUID(),this.allowInsecureConnection=null!==(o=e.allowInsecureConnection)&&void 0!==o&&o,this.enableBrowserStreams=null!==(s=e.enableBrowserStreams)&&void 0!==s&&s}}const DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4},bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy",disableKeepAlivePolicyName="DisableKeepAlivePolicy",XML_ATTRKEY$1="$",XML_CHARKEY$1="_",validateISODuration=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,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;class SerializerImpl{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,r){const i=(e,i)=>{throw Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:r,ExclusiveMinimum:n,InclusiveMaximum:a,InclusiveMinimum:o,MaxItems:s,MaxLength:l,MinItems:c,MinLength:m,MultipleOf:d,Pattern:p,UniqueItems:u}=e.constraints;if(void 0===r||r>t||i("ExclusiveMaximum",r),void 0===n||t>n||i("ExclusiveMinimum",n),void 0!==a&&t>a&&i("InclusiveMaximum",a),void 0!==o&&o>t&&i("InclusiveMinimum",o),void 0!==s&&t.length>s&&i("MaxItems",s),void 0!==l&&t.length>l&&i("MaxLength",l),void 0!==c&&c>t.length&&i("MinItems",c),void 0!==m&&m>t.length&&i("MinLength",m),void 0!==d&&t%d!=0&&i("MultipleOf",d),p){const e="string"==typeof p?RegExp(p):p;"string"==typeof t&&null!==t.match(e)||i("Pattern",p)}u&&t.some(((e,t,r)=>r.indexOf(e)!==t))&&i("UniqueItems",u)}}serialize(e,t,r,i={xml:{}}){var n,a,o;const s={xml:{rootName:null!==(n=i.xml.rootName)&&void 0!==n?n:"",includeRoot:null!==(a=i.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=i.xml.xmlCharKey)&&void 0!==o?o:XML_CHARKEY$1}};let l={};const c=e.type.name;r||(r=e.serializedName),null!==c.match(/^Sequence$/i)&&(l=[]),e.isConstant&&(t=e.defaultValue);const{required:m,nullable:d}=e;if(m&&d&&void 0===t)throw Error(r+" cannot be undefined.");if(m&&!d&&null==t)throw Error(r+" cannot be null or undefined.");if(!m&&!1===d&&null===t)throw Error(r+" cannot be null.");return null==t||null!==c.match(/^any$/i)?l=t:null!==c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?l=serializeBasicTypes(c,r,t):null!==c.match(/^Enum$/i)?l=serializeEnumType(r,e.type.allowedValues,t):null!==c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?l=serializeDateTypes(c,t,r):null!==c.match(/^ByteArray$/i)?l=serializeByteArrayType(r,t):null!==c.match(/^Base64Url$/i)?l=serializeBase64UrlType(r,t):null!==c.match(/^Sequence$/i)?l=serializeSequenceType(this,e,t,r,!!this.isXML,s):null!==c.match(/^Dictionary$/i)?l=serializeDictionaryType(this,e,t,r,!!this.isXML,s):null!==c.match(/^Composite$/i)&&(l=serializeCompositeType(this,e,t,r,!!this.isXML,s)),l}deserialize(e,t,r,i={xml:{}}){var n,a,o,s;const l={xml:{rootName:null!==(n=i.xml.rootName)&&void 0!==n?n:"",includeRoot:null!==(a=i.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=i.xml.xmlCharKey)&&void 0!==o?o:XML_CHARKEY$1},ignoreUnknownProperties:null!==(s=i.ignoreUnknownProperties)&&void 0!==s&&s};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let c;const m=e.type.name;if(r||(r=e.serializedName),null!==m.match(/^Composite$/i))c=deserializeCompositeType(this,e,t,r,l);else{if(this.isXML){const e=l.xml.xmlCharKey;void 0!==t[XML_ATTRKEY$1]&&void 0!==t[e]&&(t=t[e])}null!==m.match(/^Number$/i)?(c=parseFloat(t),isNaN(c)&&(c=t)):null!==m.match(/^Boolean$/i)?c="true"===t||"false"!==t&&t:null!==m.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?c=t:null!==m.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?c=new Date(t):null!==m.match(/^UnixTime$/i)?c=unixTimeToDate(t):null!==m.match(/^ByteArray$/i)?c=decodeString(t):null!==m.match(/^Base64Url$/i)?c=base64UrlToByteArray(t):null!==m.match(/^Sequence$/i)?c=deserializeSequenceType(this,e,t,r,l):null!==m.match(/^Dictionary$/i)&&(c=deserializeDictionaryType(this,e,t,r,l))}return e.isConstant&&(c=e.defaultValue),c}}const MapperTypeNames={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"};var state$1={};Object.defineProperty(state$1,"__esModule",{value:!0});var state_1=state$1.state=void 0;state_1=state$1.state={operationRequestMap:new WeakMap};const state=state_1,originalRequestSymbol$1=Symbol.for("@azure/core-client original request"),defaultJsonContentTypes=["application/json","text/json"],defaultXmlContentTypes=["application/xml","application/atom+xml"],deserializationPolicyName="deserializationPolicy",serializationPolicyName="serializationPolicy";let cachedHttpClient;const CollectionFormatToDelimiterMap={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"},logger$1=createClientLogger("core-client");class ServiceClient{constructor(e={}){var t,r;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&logger$1.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||getCachedDefaultHttpClient$1(),this.pipeline=e.pipeline||createDefaultPipeline(e),null===(r=e.additionalPolicies)||void 0===r?void 0:r.length)for(const{policy:i,position:n}of e.additionalPolicies)this.pipeline.addPolicy(i,{afterPhase:"perRetry"===n?"Sign":void 0})}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const r=t.baseUrl||this._endpoint;if(!r)throw Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const i=createPipelineRequest({url:getRequestUrl(r,t,e,this)});i.method=t.httpMethod;const n=getOperationRequestInfo(i);n.operationSpec=t,n.operationArguments=e;const a=t.contentType||this._requestContentType;a&&t.requestBody&&i.headers.set("Content-Type",a);const o=e.options;if(o){const e=o.requestOptions;e&&(e.timeout&&(i.timeout=e.timeout),e.onUploadProgress&&(i.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(i.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(n.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(i.allowInsecureConnection=!0)),o.abortSignal&&(i.abortSignal=o.abortSignal),o.tracingOptions&&(i.tracingOptions=o.tracingOptions)}this._allowInsecureConnection&&(i.allowInsecureConnection=!0),void 0===i.streamResponseStatusCodes&&(i.streamResponseStatusCodes=getStreamingResponseStatusCodes(t));try{const e=await this.sendRequest(i),r=flattenResponse(e,t.responses[e.status]);return(null==o?void 0:o.onResponse)&&o.onResponse(e,r),r}catch(s){if("object"==typeof s&&(null==s?void 0:s.response)){const e=s.response,r=flattenResponse(e,t.responses[s.statusCode]||t.responses.default);s.details=r,(null==o?void 0:o.onResponse)&&o.onResponse(e,r,s)}throw s}}}const Constants={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}},authorizeRequestOnTenantChallenge=async e=>{const t=requestToOptions(e.request),r=getChallenge(e.response);if(r){const i=parseChallenge(r),n=buildScopes(e,i),a=extractTenantId(i);if(!a)return!1;const o=await e.getAccessToken(n,Object.assign(Object.assign({},t),{tenantId:a}));return!!o&&(e.request.headers.set(Constants.HeaderConstants.AUTHORIZATION,"Bearer "+o.token),!0)}return!1},originalRequestSymbol=Symbol(),originalClientRequestSymbol=Symbol.for("@azure/core-client original request");class HttpHeaders{constructor(e){if(this._headersMap={},e)for(const t in e)this.set(t,e[t])}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:""+t}}get(e){const t=this._headersMap[getHeaderKey(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);return delete this._headersMap[getHeaderKey(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){const e=[];for(const t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){const e=[],t=this.headersArray();for(let r=0;t.length>r;++r)e.push(t[r].name);return e}headerValues(){const e=[],t=this.headersArray();for(let r=0;t.length>r;++r)e.push(t[r].value);return e}toJson(e={}){const t={};if(e.preserveCase)for(const r in this._headersMap){const e=this._headersMap[r];t[e.name]=e.value}else for(const r in this._headersMap){const e=this._headersMap[r];t[getHeaderKey(e.name)]=e.value}return t}toString(){return JSON.stringify(this.toJson({preserveCase:!0}))}clone(){const e={};for(const t in this._headersMap){const r=this._headersMap[t];e[r.name]=r.value}return new HttpHeaders(e)}}const originalResponse=Symbol();class ExtendedServiceClient extends ServiceClient{constructor(e){var t,r;super(e),!1!==(null===(t=e.keepAliveOptions)||void 0===t?void 0:t.enable)||pipelineContainsDisableKeepAlivePolicy(this.pipeline)||this.pipeline.addPolicy(createDisableKeepAlivePolicy()),!1===(null===(r=e.redirectOptions)||void 0===r?void 0:r.handleRedirects)&&this.pipeline.removePolicy({name:redirectPolicyName})}async sendOperationRequest(e,t){var r;const i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.onResponse;let n;e.options=Object.assign(Object.assign({},e.options),{onResponse:function(e,t,r){n=e,i&&i(e,t,r)}});const a=await super.sendOperationRequest(e,t);return n&&Object.defineProperty(a,"_response",{value:toCompatResponse(n)}),a}}var HttpPipelineLogLevel,HttpPipelineLogLevel2;HttpPipelineLogLevel2=HttpPipelineLogLevel||(HttpPipelineLogLevel={}),HttpPipelineLogLevel2[HttpPipelineLogLevel2.ERROR=1]="ERROR",HttpPipelineLogLevel2[HttpPipelineLogLevel2.INFO=3]="INFO",HttpPipelineLogLevel2[HttpPipelineLogLevel2.OFF=0]="OFF",HttpPipelineLogLevel2[HttpPipelineLogLevel2.WARNING=2]="WARNING";const mockRequestPolicyOptions={log(e,t){},shouldLog:e=>!1},requestPolicyFactoryPolicyName="RequestPolicyFactoryPolicy";var validator$2={},util$4={};!function(e){const t=":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",r="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const i=Object.keys(t),n=i.length;for(let a=0;n>a;a++)e[i[a]]="strict"===r?[t[i[a]]]:t[i[a]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){return!(null==i.exec(e))},e.getAllMatches=function(e,t){const r=[];let i=t.exec(e);for(;i;){const n=[];n.startIndex=t.lastIndex-i[0].length;const a=i.length;for(let e=0;a>e;e++)n.push(i[e]);r.push(n),i=t.exec(e)}return r},e.nameRegexp=r}(util$4);const util$3=util$4,defaultOptions$2={allowBooleanAttributes:!1,unpairedTags:[]};validator$2.validate=function(e,t){t=Object.assign({},defaultOptions$2,t);const r=[];let i=!1,n=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let a=0;e.length>a;a++)if("<"===e[a]&&"?"===e[a+1]){if(a+=2,a=readPI(e,a),a.err)return a}else{if("<"!==e[a]){if(isWhiteSpace(e[a]))continue;return getErrorObject("InvalidChar","char '"+e[a]+"' is not expected.",getLineNumberForPosition(e,a))}{let o=a;if(a++,"!"===e[a]){a=readCommentAndCDATA(e,a);continue}{let s=!1;"/"===e[a]&&(s=!0,a++);let l="";for(;e.length>a&&">"!==e[a]&&" "!==e[a]&&"\t"!==e[a]&&"\n"!==e[a]&&"\r"!==e[a];a++)l+=e[a];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),a--),!validateTagName(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,a))}const c=readAttributeStr(e,a);if(!1===c)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,a));let m=c.value;if(a=c.index,"/"===m[m.length-1]){const r=a-m.length;m=m.substring(0,m.length-1);const n=validateAttributeString(m,t);if(!0!==n)return getErrorObject(n.err.code,n.err.msg,getLineNumberForPosition(e,r+n.err.line));i=!0}else if(s){if(!c.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,a));if(m.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,o));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+l+"' has not been opened.",getLineNumberForPosition(e,o));{const t=r.pop();if(l!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",getLineNumberForPosition(e,o))}0==r.length&&(n=!0)}}else{const s=validateAttributeString(m,t);if(!0!==s)return getErrorObject(s.err.code,s.err.msg,getLineNumberForPosition(e,a-m.length+s.err.line));if(!0===n)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,a));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:o}),i=!0}for(a++;e.length>a;a++)if("<"===e[a]){if("!"===e[a+1]){a++,a=readCommentAndCDATA(e,a);continue}if("?"!==e[a+1])break;if(a=readPI(e,++a),a.err)return a}else if("&"===e[a]){const t=validateAmpersand(e,a);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,a));a=t}else if(!0===n&&!isWhiteSpace(e[a]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,a));"<"===e[a]&&a--}}}return i?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):0>=r.length||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)};const doubleQuote='"',singleQuote="'",validAttrStrRegxp=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var OptionsBuilder={};const defaultOptions$1={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}},buildOptions$1=function(e){return Object.assign({},defaultOptions$1,e)};OptionsBuilder.buildOptions=buildOptions$1,OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),this.child.push(e[":@"]&&Object.keys(e[":@"]).length>0?{[e.tagname]:e.child,":@":e[":@"]}:{[e.tagname]:e.child})}}var xmlNode$1=XmlNode;const util$2=util$4;var DocTypeReader=readDocType$1;const hexRegex=/^[-+]?0x[a-fA-F0-9]+$/,numRegex=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const consider={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};var strnum=toNumber$1,ignoreAttributes=getIgnoreAttributesFn$2;const util$1=util$4,xmlNode=xmlNode$1,readDocType=DocTypeReader,toNumber=strnum,getIgnoreAttributesFn$1=ignoreAttributes;let OrderedObjParser$1=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=getIgnoreAttributesFn$1(this.options.ignoreAttributes)}};const attrsRegx=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm"),parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new xmlNode("!xml");let r=t,i="",n="";for(let a=0;e.length>a;a++)if("<"===e[a])if("/"===e[a+1]){const t=findClosingIndex(e,">",a,"Closing Tag is not closed.");let o=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&(i=this.saveTextToParentTag(i,r,n));const s=n.substring(n.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(l=n.lastIndexOf(".",n.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=n.lastIndexOf("."),n=n.substring(0,l),r=this.tagsNodeStack.pop(),i="",a=t}else if("?"===e[a+1]){let t=readTagExp(e,a,!1,"?>");if(!t)throw Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,n),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new xmlNode(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,n,t.tagName)),this.addChild(r,e,n)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=findClosingIndex(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(a+4,t-2);i=this.saveTextToParentTag(i,r,n),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}a=t}else if("!D"===e.substr(a+1,2)){const t=readDocType(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=findClosingIndex(e,"]]>",a,"CDATA is not closed.")-2,o=e.substring(a+9,t);i=this.saveTextToParentTag(i,r,n);let s=this.parseTextData(o,r.tagname,n,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,s),a=t+2}else{let o=readTagExp(e,a,this.options.removeNSPrefix),s=o.tagName;const l=o.rawTagName;let c=o.tagExp,m=o.attrExpPresent,d=o.closeIndex;if(this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,n,!1)),r&&-1!==this.options.unpairedTags.indexOf(r.tagname)&&(r=this.tagsNodeStack.pop(),n=n.substring(0,n.lastIndexOf("."))),s!==t.tagname&&(n+=n?"."+s:s),this.isItStopNode(this.options.stopNodes,n,s)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===s[s.length-1]?(s=s.substr(0,s.length-1),n=n.substr(0,n.length-1),c=s):c=c.substr(0,c.length-1),a=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))a=o.closeIndex;else{const r=this.readStopNodeData(e,l,d+1);if(!r)throw Error("Unexpected end of "+l);a=r.i,t=r.tagContent}const i=new xmlNode(s);s!==c&&m&&(i[":@"]=this.buildAttributesMap(c,n,s)),t&&(t=this.parseTextData(t,s,n,!0,m,!0,!0)),n=n.substr(0,n.lastIndexOf(".")),i.add(this.options.textNodeName,t),this.addChild(r,i,n)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===s[s.length-1]?(s=s.substr(0,s.length-1),n=n.substr(0,n.length-1),c=s):c=c.substr(0,c.length-1),this.options.transformTagName&&(s=this.options.transformTagName(s));const e=new xmlNode(s);s!==c&&m&&(e[":@"]=this.buildAttributesMap(c,n,s)),this.addChild(r,e,n),n=n.substr(0,n.lastIndexOf("."))}else{const e=new xmlNode(s);this.tagsNodeStack.push(r),s!==c&&m&&(e[":@"]=this.buildAttributesMap(c,n,s)),this.addChild(r,e,n),r=e}i="",a=d}}else i+=e[a];return t.child},replaceEntitiesValue$1=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};var OrderedObjParser_1=OrderedObjParser$1,node2json={};node2json.prettify=prettify$1;const{buildOptions:buildOptions}=OptionsBuilder,OrderedObjParser=OrderedObjParser_1,{prettify:prettify}=node2json,validator$1=validator$2;let XMLParser$1=class{constructor(e){this.externalEntities={},this.options=buildOptions(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw Error("XML data is accepted in String or Bytes[] form.");e=""+e}if(t){!0===t&&(t={});const r=validator$1.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new OrderedObjParser(this.options);r.addExternalEntities(this.externalEntities);const i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:prettify(i,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};var XMLParser_1=XMLParser$1;const EOL="\n";var orderedJs2Xml=toXml;const buildFromOrderedJs=orderedJs2Xml,getIgnoreAttributesFn=ignoreAttributes,defaultOptions={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};Builder.prototype.build=function(e){return this.options.preserveOrder?buildFromOrderedJs(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Builder.prototype.j2x=function(e,t,r){let i="",n="";const a=r.join(".");for(let o in e)if({}.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":n+="?"===o[0]?this.indentate(t)+"<"+o+"?"+this.tagEndChar:this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const r=this.isAttribute(o);if(r&&!this.ignoreAttributesFn(r,a))i+=this.buildAttrPairStr(r,""+e[o]);else if(!r)if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const i=e[o].length;let a="",s="";for(let l=0;i>l;l++){const i=e[o][l];if(void 0===i);else if(null===i)n+="?"===o[0]?this.indentate(t)+"<"+o+"?"+this.tagEndChar:this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const e=this.j2x(i,t+1,r.concat(o));a+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else a+=this.processTextOrObjNode(i,o,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(o,i);e=this.replaceEntitiesValue(e),a+=e}else a+=this.buildTextValNode(i,o,"",t)}this.options.oneListGroup&&(a=this.buildObjectNode(a,o,s,t)),n+=a}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),r=t.length;for(let n=0;r>n;n++)i+=this.buildAttrPairStr(t[n],""+e[o][t[n]])}else n+=this.processTextOrObjNode(e[o],o,t,r);return{attrStr:i,val:n}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+r+"?"+this.tagEndChar:this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,a="";return"?"===t[0]&&(a="?",n=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===a.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+r+a+this.tagEndChar+e+this.indentate(i)+n:this.indentate(i)+"<"+t+r+a+">"+e+n}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":"></"+e,t},Builder.prototype.buildTextValNode=function(e,t,r,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+r+">"+n+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;this.options.entities.length>t;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};var json2xml=Builder;const validator=validator$2,XMLParser=XMLParser_1,XMLBuilder=json2xml;var fxp={XMLParser:XMLParser,XMLValidator:validator,XMLBuilder:XMLBuilder};const XML_ATTRKEY="$",XML_CHARKEY="_",logger=createClientLogger("storage-blob"),listenersMap=new WeakMap,abortedMap=new WeakMap;class AbortSignal{constructor(){this.onabort=null,listenersMap.set(this,[]),abortedMap.set(this,!1)}get aborted(){if(!abortedMap.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return abortedMap.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!listenersMap.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");listenersMap.get(this).push(t)}removeEventListener(e,t){if(!listenersMap.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");const r=listenersMap.get(this),i=r.indexOf(t);i>-1&&r.splice(i,1)}dispatchEvent(e){throw Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}class AbortError extends Error{constructor(e){super(e),this.name="AbortError"}}let AbortController$1=class{constructor(e){if(this._signal=new AbortSignal,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal,r=setTimeout(abortSignal,e,t);return"function"==typeof r.unref&&r.unref(),t}};const src$1=Object.freeze(Object.defineProperty({__proto__:null,AbortController:AbortController$1,AbortError:AbortError,AbortSignal:AbortSignal},Symbol.toStringTag,{value:"Module"}));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)}}const SDK_VERSION="12.24.0",SERVICE_VERSION="2024-08-04",BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=268435456,BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=4194304e3,BLOCK_BLOB_MAX_BLOCKS=5e4,DEFAULT_BLOCK_BUFFER_SIZE_BYTES=8388608,DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=4194304,DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=5,REQUEST_TIMEOUT=1e5,StorageOAuthScopes="https://storage.azure.com/.default",URLConstants={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}},HTTPURLConnection={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416},HeaderConstants={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",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"},ETagNone="",ETagAny="*",SIZE_1_MB=1048576,BATCH_MAX_REQUEST=256,BATCH_MAX_PAYLOAD_IN_BYTES=4*SIZE_1_MB,HTTP_LINE_ENDING="\r\n",HTTP_VERSION_1_1="HTTP/1.1",EncryptionAlgorithmAES25="AES256",DevelopmentConnectionString="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",StorageBlobLoggingAllowedHeaderNames=["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-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],StorageBlobLoggingAllowedQueryParameters=["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"],BlobUsesCustomerSpecifiedEncryptionMsg="BlobUsesCustomerSpecifiedEncryption",BlobDoesNotUseCustomerSpecifiedEncryption="BlobDoesNotUseCustomerSpecifiedEncryption",PathStylePorts=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];var StorageRetryPolicyType$1,StorageRetryPolicyType2;StorageRetryPolicyType2=StorageRetryPolicyType$1||(StorageRetryPolicyType$1={}),StorageRetryPolicyType2[StorageRetryPolicyType2.EXPONENTIAL=0]="EXPONENTIAL",StorageRetryPolicyType2[StorageRetryPolicyType2.FIXED=1]="FIXED";const DEFAULT_RETRY_OPTIONS$1={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:StorageRetryPolicyType$1.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},RETRY_ABORT_ERROR$1=new AbortError("The operation was aborted.");class StorageRetryPolicy extends BaseRequestPolicy{constructor(e,t,r=DEFAULT_RETRY_OPTIONS$1){super(e,t),this.retryOptions={retryPolicyType:r.retryPolicyType?r.retryPolicyType:DEFAULT_RETRY_OPTIONS$1.retryPolicyType,maxTries:r.maxTries&&r.maxTries>=1?Math.floor(r.maxTries):DEFAULT_RETRY_OPTIONS$1.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs):DEFAULT_RETRY_OPTIONS$1.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:DEFAULT_RETRY_OPTIONS$1.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,r){const i=e.clone(),n=t||!this.retryOptions.secondaryHost||!("GET"===e.method||"HEAD"===e.method||"OPTIONS"===e.method)||r%2==1;let a;n||(i.url=setURLHost(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=setURLParameter(i.url,URLConstants.Parameters.TIMEOUT,""+Math.floor(this.retryOptions.tryTimeoutInMs/1e3)));try{if(logger.info(`RetryPolicy: =====> Try=${r} ${n?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(n,r,a))return a;t=t||!n&&404===a.status}catch(o){if(logger.error(`RetryPolicy: Caught error, message: ${o.message}, code: ${o.code}`),!this.shouldRetry(n,r,a,o))throw o}return await this.delay(n,r,e.abortSignal),this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,i){if(t>=this.retryOptions.maxTries)return logger.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;const n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i)for(const a of n)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&(""+i.code).toUpperCase()===a)return logger.info(`RetryPolicy: Network error ${a} found, will retry.`),!0;if(r||i){const t=r?r.status:i?i.statusCode:0;if(!e&&404===t)return logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return logger.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!("PARSE_ERROR"!==(null==i?void 0:i.code)||!(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag'))||(logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),0))}async delay(e,t,r){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case StorageRetryPolicyType$1.EXPONENTIAL:i=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case StorageRetryPolicyType$1.FIXED:i=this.retryOptions.retryDelayInMs}else i=1e3*Math.random();return logger.info(`RetryPolicy: Delay for ${i}ms`),delay(i,r,RETRY_ABORT_ERROR$1)}}class StorageRetryPolicyFactory{constructor(e){this.retryOptions=e}create(e,t){return new StorageRetryPolicy(e,t,this.retryOptions)}}class CredentialPolicy extends BaseRequestPolicy{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}const table_lv0=new Uint32Array([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,1820,0,1823,1825,1827,1829,0,0,0,1837,2051,0,0,1843,0,3331,3354,3356,3358,3360,3362,3364,3366,3368,3370,0,0,0,0,0,0,0,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,0,0,1859,1860,1864,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,1868,0,1872,0]),table_lv2=new Uint32Array([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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,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]),table_lv4=new Uint32Array([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,32786,0,0,0,0,0,33298,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,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]);class StorageSharedKeyCredentialPolicy extends CredentialPolicy{constructor(e,t,r){super(e,t),this.factory=r}signRequest(e){e.headers.set(HeaderConstants.X_MS_DATE,(new Date).toUTCString()),e.body&&("string"==typeof e.body||void 0!==e.body)&&e.body.length>0&&e.headers.set(HeaderConstants.CONTENT_LENGTH,Buffer.byteLength(e.body));const t=[e.method.toUpperCase(),this.getHeaderValueToSign(e,HeaderConstants.CONTENT_LANGUAGE),this.getHeaderValueToSign(e,HeaderConstants.CONTENT_ENCODING),this.getHeaderValueToSign(e,HeaderConstants.CONTENT_LENGTH),this.getHeaderValueToSign(e,HeaderConstants.CONTENT_MD5),this.getHeaderValueToSign(e,HeaderConstants.CONTENT_TYPE),this.getHeaderValueToSign(e,HeaderConstants.DATE),this.getHeaderValueToSign(e,HeaderConstants.IF_MODIFIED_SINCE),this.getHeaderValueToSign(e,HeaderConstants.IF_MATCH),this.getHeaderValueToSign(e,HeaderConstants.IF_NONE_MATCH),this.getHeaderValueToSign(e,HeaderConstants.IF_UNMODIFIED_SINCE),this.getHeaderValueToSign(e,HeaderConstants.RANGE)].join("\n")+"\n"+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),r=this.factory.computeHMACSHA256(t);return e.headers.set(HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${r}`),e}getHeaderValueToSign(e,t){const r=e.headers.get(t);return r?t===HeaderConstants.CONTENT_LENGTH&&"0"===r?"":r:""}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter((e=>e.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)));t.sort(((e,t)=>compareHeader(e.name.toLowerCase(),t.name.toLowerCase()))),t=t.filter(((e,t,r)=>0>=t||e.name.toLowerCase()!==r[t-1].name.toLowerCase()));let r="";return t.forEach((e=>{r+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`})),r}getCanonicalizedResourceString(e){const t=getURLPath(e.url)||"/";let r="";r+=`/${this.factory.accountName}${t}`;const i=getURLQueries(e.url),n={};if(i){const e=[];for(const t in i)if({}.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 Credential{create(e,t){throw Error("Method should be implemented in children classes.")}}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 createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}}class AnonymousCredentialPolicy extends CredentialPolicy{constructor(e,t){super(e,t)}}class AnonymousCredential extends Credential{create(e,t){return new AnonymousCredentialPolicy(e,t)}}let _defaultHttpClient;const storageBrowserPolicyName="storageBrowserPolicy",storageRetryPolicyName="storageRetryPolicy";var StorageRetryPolicyType;!function(e){e[e.EXPONENTIAL=0]="EXPONENTIAL",e[e.FIXED=1]="FIXED"}(StorageRetryPolicyType||(StorageRetryPolicyType={}));const DEFAULT_RETRY_OPTIONS={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},retriableErrors=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],RETRY_ABORT_ERROR=new AbortError("The operation was aborted."),storageSharedKeyCredentialPolicyName="storageSharedKeyCredentialPolicy";class StorageBrowserPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){return isNode||("GET"!==e.method.toUpperCase()&&"HEAD"!==e.method.toUpperCase()||(e.url=setURLParameter(e.url,URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,""+(new Date).getTime())),e.headers.remove(HeaderConstants.COOKIE),e.headers.remove(HeaderConstants.CONTENT_LENGTH)),this._nextPolicy.sendRequest(e)}}class StorageBrowserPolicyFactory{create(e,t){return new StorageBrowserPolicy(e,t)}}const storageCorrectContentLengthPolicyName="StorageCorrectContentLengthPolicy";class Pipeline{constructor(e,t={}){this.factories=e,this.options=t}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}const BlobServiceProperties={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:!0,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"}}}}},Logging={serializedName:"Logging",type:{name:"Composite",className:"Logging",modelProperties:{version:{serializedName:"Version",required:!0,xmlName:"Version",type:{name:"String"}},deleteProperty:{serializedName:"Delete",required:!0,xmlName:"Delete",type:{name:"Boolean"}},read:{serializedName:"Read",required:!0,xmlName:"Read",type:{name:"Boolean"}},write:{serializedName:"Write",required:!0,xmlName:"Write",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},RetentionPolicy={serializedName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy",modelProperties:{enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},days:{constraints:{InclusiveMinimum:1},serializedName:"Days",xmlName:"Days",type:{name:"Number"}}}}},Metrics={serializedName:"Metrics",type:{name:"Composite",className:"Metrics",modelProperties:{version:{serializedName:"Version",xmlName:"Version",type:{name:"String"}},enabled:{serializedName:"Enabled",required:!0,xmlName:"Enabled",type:{name:"Boolean"}},includeAPIs:{serializedName:"IncludeAPIs",xmlName:"IncludeAPIs",type:{name:"Boolean"}},retentionPolicy:{serializedName:"RetentionPolicy",xmlName:"RetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}}}}},CorsRule={serializedName:"CorsRule",type:{name:"Composite",className:"CorsRule",modelProperties:{allowedOrigins:{serializedName:"AllowedOrigins",required:!0,xmlName:"AllowedOrigins",type:{name:"String"}},allowedMethods:{serializedName:"AllowedMethods",required:!0,xmlName:"AllowedMethods",type:{name:"String"}},allowedHeaders:{serializedName:"AllowedHeaders",required:!0,xmlName:"AllowedHeaders",type:{name:"String"}},exposedHeaders:{serializedName:"ExposedHeaders",required:!0,xmlName:"ExposedHeaders",type:{name:"String"}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:"MaxAgeInSeconds",required:!0,xmlName:"MaxAgeInSeconds",type:{name:"Number"}}}}},StaticWebsite={serializedName:"StaticWebsite",type:{name:"Composite",className:"StaticWebsite",modelProperties:{enabled:{serializedName:"Enabled",required:!0,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"}}}}},StorageError={serializedName:"StorageError",type:{name:"Composite",className:"StorageError",modelProperties:{message:{serializedName:"Message",xmlName:"Message",type:{name:"String"}},code:{serializedName:"Code",xmlName:"Code",type:{name:"String"}},authenticationErrorDetail:{serializedName:"AuthenticationErrorDetail",xmlName:"AuthenticationErrorDetail",type:{name:"String"}}}}},BlobServiceStatistics={serializedName:"BlobServiceStatistics",xmlName:"StorageServiceStats",type:{name:"Composite",className:"BlobServiceStatistics",modelProperties:{geoReplication:{serializedName:"GeoReplication",xmlName:"GeoReplication",type:{name:"Composite",className:"GeoReplication"}}}}},GeoReplication={serializedName:"GeoReplication",type:{name:"Composite",className:"GeoReplication",modelProperties:{status:{serializedName:"Status",required:!0,xmlName:"Status",type:{name:"Enum",allowedValues:["live","bootstrap","unavailable"]}},lastSyncOn:{serializedName:"LastSyncTime",required:!0,xmlName:"LastSyncTime",type:{name:"DateTimeRfc1123"}}}}},ListContainersSegmentResponse={serializedName:"ListContainersSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListContainersSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,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:!0,xmlName:"Containers",xmlIsWrapped:!0,xmlElementName:"Container",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContainerItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},ContainerItem={serializedName:"ContainerItem",xmlName:"Container",type:{name:"Composite",className:"ContainerItem",modelProperties:{name:{serializedName:"Name",required:!0,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"}}}}}}},ContainerProperties={serializedName:"ContainerProperties",type:{name:"Composite",className:"ContainerProperties",modelProperties:{lastModified:{serializedName:"Last-Modified",required:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,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"}}}}},KeyInfo={serializedName:"KeyInfo",type:{name:"Composite",className:"KeyInfo",modelProperties:{startsOn:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"String"}},expiresOn:{serializedName:"Expiry",required:!0,xmlName:"Expiry",type:{name:"String"}}}}},UserDelegationKey={serializedName:"UserDelegationKey",type:{name:"Composite",className:"UserDelegationKey",modelProperties:{signedObjectId:{serializedName:"SignedOid",required:!0,xmlName:"SignedOid",type:{name:"String"}},signedTenantId:{serializedName:"SignedTid",required:!0,xmlName:"SignedTid",type:{name:"String"}},signedStartsOn:{serializedName:"SignedStart",required:!0,xmlName:"SignedStart",type:{name:"String"}},signedExpiresOn:{serializedName:"SignedExpiry",required:!0,xmlName:"SignedExpiry",type:{name:"String"}},signedService:{serializedName:"SignedService",required:!0,xmlName:"SignedService",type:{name:"String"}},signedVersion:{serializedName:"SignedVersion",required:!0,xmlName:"SignedVersion",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}},FilterBlobSegment={serializedName:"FilterBlobSegment",xmlName:"EnumerationResults",type:{name:"Composite",className:"FilterBlobSegment",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},where:{serializedName:"Where",required:!0,xmlName:"Where",type:{name:"String"}},blobs:{serializedName:"Blobs",required:!0,xmlName:"Blobs",xmlIsWrapped:!0,xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"FilterBlobItem"}}}},continuationToken:{serializedName:"NextMarker",xmlName:"NextMarker",type:{name:"String"}}}}},FilterBlobItem={serializedName:"FilterBlobItem",xmlName:"Blob",type:{name:"Composite",className:"FilterBlobItem",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",type:{name:"String"}},tags:{serializedName:"Tags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags"}}}}},BlobTags={serializedName:"BlobTags",xmlName:"Tags",type:{name:"Composite",className:"BlobTags",modelProperties:{blobTagSet:{serializedName:"BlobTagSet",required:!0,xmlName:"TagSet",xmlIsWrapped:!0,xmlElementName:"Tag",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobTag"}}}}}}},BlobTag={serializedName:"BlobTag",xmlName:"Tag",type:{name:"Composite",className:"BlobTag",modelProperties:{key:{serializedName:"Key",required:!0,xmlName:"Key",type:{name:"String"}},value:{serializedName:"Value",required:!0,xmlName:"Value",type:{name:"String"}}}}},SignedIdentifier={serializedName:"SignedIdentifier",xmlName:"SignedIdentifier",type:{name:"Composite",className:"SignedIdentifier",modelProperties:{id:{serializedName:"Id",required:!0,xmlName:"Id",type:{name:"String"}},accessPolicy:{serializedName:"AccessPolicy",xmlName:"AccessPolicy",type:{name:"Composite",className:"AccessPolicy"}}}}},AccessPolicy={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"}}}}},ListBlobsFlatSegmentResponse={serializedName:"ListBlobsFlatSegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsFlatSegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,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"}}}}},BlobFlatListSegment={serializedName:"BlobFlatListSegment",xmlName:"Blobs",type:{name:"Composite",className:"BlobFlatListSegment",modelProperties:{blobItems:{serializedName:"BlobItems",required:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},BlobItemInternal={serializedName:"BlobItemInternal",xmlName:"Blob",type:{name:"Composite",className:"BlobItemInternal",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}},deleted:{serializedName:"Deleted",required:!0,xmlName:"Deleted",type:{name:"Boolean"}},snapshot:{serializedName:"Snapshot",required:!0,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"}}}}},BlobName={serializedName:"BlobName",type:{name:"Composite",className:"BlobName",modelProperties:{encoded:{serializedName:"Encoded",xmlName:"Encoded",xmlIsAttribute:!0,type:{name:"Boolean"}},content:{serializedName:"content",xmlName:"content",xmlIsMsText:!0,type:{name:"String"}}}}},BlobPropertiesInternal={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:!0,xmlName:"Last-Modified",type:{name:"DateTimeRfc1123"}},etag:{serializedName:"Etag",required:!0,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","rehydrate-pending-to-cold"]}},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"}}}}},ListBlobsHierarchySegmentResponse={serializedName:"ListBlobsHierarchySegmentResponse",xmlName:"EnumerationResults",type:{name:"Composite",className:"ListBlobsHierarchySegmentResponse",modelProperties:{serviceEndpoint:{serializedName:"ServiceEndpoint",required:!0,xmlName:"ServiceEndpoint",xmlIsAttribute:!0,type:{name:"String"}},containerName:{serializedName:"ContainerName",required:!0,xmlName:"ContainerName",xmlIsAttribute:!0,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"}}}}},BlobHierarchyListSegment={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:!0,xmlName:"BlobItems",xmlElementName:"Blob",type:{name:"Sequence",element:{type:{name:"Composite",className:"BlobItemInternal"}}}}}}},BlobPrefix={serializedName:"BlobPrefix",type:{name:"Composite",className:"BlobPrefix",modelProperties:{name:{serializedName:"Name",xmlName:"Name",type:{name:"Composite",className:"BlobName"}}}}},BlockLookupList={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"}}}}}}},BlockList={serializedName:"BlockList",type:{name:"Composite",className:"BlockList",modelProperties:{committedBlocks:{serializedName:"CommittedBlocks",xmlName:"CommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}},uncommittedBlocks:{serializedName:"UncommittedBlocks",xmlName:"UncommittedBlocks",xmlIsWrapped:!0,xmlElementName:"Block",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}},Block={serializedName:"Block",type:{name:"Composite",className:"Block",modelProperties:{name:{serializedName:"Name",required:!0,xmlName:"Name",type:{name:"String"}},size:{serializedName:"Size",required:!0,xmlName:"Size",type:{name:"Number"}}}}},PageList={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"}}}}},PageRange={serializedName:"PageRange",xmlName:"PageRange",type:{name:"Composite",className:"PageRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},ClearRange={serializedName:"ClearRange",xmlName:"ClearRange",type:{name:"Composite",className:"ClearRange",modelProperties:{start:{serializedName:"Start",required:!0,xmlName:"Start",type:{name:"Number"}},end:{serializedName:"End",required:!0,xmlName:"End",type:{name:"Number"}}}}},QueryRequest={serializedName:"QueryRequest",xmlName:"QueryRequest",type:{name:"Composite",className:"QueryRequest",modelProperties:{queryType:{serializedName:"QueryType",required:!0,xmlName:"QueryType",type:{name:"String"}},expression:{serializedName:"Expression",required:!0,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"}}}}},QuerySerialization={serializedName:"QuerySerialization",type:{name:"Composite",className:"QuerySerialization",modelProperties:{format:{serializedName:"Format",xmlName:"Format",type:{name:"Composite",className:"QueryFormat"}}}}},QueryFormat={serializedName:"QueryFormat",type:{name:"Composite",className:"QueryFormat",modelProperties:{type:{serializedName:"Type",required:!0,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:"Dictionary",value:{type:{name:"any"}}}}}}},DelimitedTextConfiguration={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"}}}}},JsonTextConfiguration={serializedName:"JsonTextConfiguration",xmlName:"JsonTextConfiguration",type:{name:"Composite",className:"JsonTextConfiguration",modelProperties:{recordSeparator:{serializedName:"RecordSeparator",xmlName:"RecordSeparator",type:{name:"String"}}}}},ArrowConfiguration={serializedName:"ArrowConfiguration",xmlName:"ArrowConfiguration",type:{name:"Composite",className:"ArrowConfiguration",modelProperties:{schema:{serializedName:"Schema",required:!0,xmlName:"Schema",xmlIsWrapped:!0,xmlElementName:"Field",type:{name:"Sequence",element:{type:{name:"Composite",className:"ArrowField"}}}}}}},ArrowField={serializedName:"ArrowField",xmlName:"Field",type:{name:"Composite",className:"ArrowField",modelProperties:{type:{serializedName:"Type",required:!0,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"}}}}},ServiceSetPropertiesHeaders={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"}}}}},ServiceSetPropertiesExceptionHeaders={serializedName:"Service_setPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceSetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetPropertiesHeaders={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"}}}}},ServiceGetPropertiesExceptionHeaders={serializedName:"Service_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ServiceGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetStatisticsHeaders={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"}}}}},ServiceGetStatisticsExceptionHeaders={serializedName:"Service_getStatisticsExceptionHeaders",type:{name:"Composite",className:"ServiceGetStatisticsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceListContainersSegmentHeaders={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"}}}}},ServiceListContainersSegmentExceptionHeaders={serializedName:"Service_listContainersSegmentExceptionHeaders",type:{name:"Composite",className:"ServiceListContainersSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetUserDelegationKeyHeaders={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"}}}}},ServiceGetUserDelegationKeyExceptionHeaders={serializedName:"Service_getUserDelegationKeyExceptionHeaders",type:{name:"Composite",className:"ServiceGetUserDelegationKeyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceGetAccountInfoHeaders={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"}}}}},ServiceGetAccountInfoExceptionHeaders={serializedName:"Service_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ServiceGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceSubmitBatchHeaders={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"}}}}},ServiceSubmitBatchExceptionHeaders={serializedName:"Service_submitBatchExceptionHeaders",type:{name:"Composite",className:"ServiceSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ServiceFilterBlobsHeaders={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"}}}}},ServiceFilterBlobsExceptionHeaders={serializedName:"Service_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ServiceFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerCreateHeaders={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"}}}}},ContainerCreateExceptionHeaders={serializedName:"Container_createExceptionHeaders",type:{name:"Composite",className:"ContainerCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerGetPropertiesHeaders={serializedName:"Container_getPropertiesHeaders",type:{name:"Composite",className:"ContainerGetPropertiesHeaders",modelProperties:{metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},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"}}}}},ContainerGetPropertiesExceptionHeaders={serializedName:"Container_getPropertiesExceptionHeaders",type:{name:"Composite",className:"ContainerGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerDeleteHeaders={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"}}}}},ContainerDeleteExceptionHeaders={serializedName:"Container_deleteExceptionHeaders",type:{name:"Composite",className:"ContainerDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerSetMetadataHeaders={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"}}}}},ContainerSetMetadataExceptionHeaders={serializedName:"Container_setMetadataExceptionHeaders",type:{name:"Composite",className:"ContainerSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerGetAccessPolicyHeaders={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"}}}}},ContainerGetAccessPolicyExceptionHeaders={serializedName:"Container_getAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerSetAccessPolicyHeaders={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"}}}}},ContainerSetAccessPolicyExceptionHeaders={serializedName:"Container_setAccessPolicyExceptionHeaders",type:{name:"Composite",className:"ContainerSetAccessPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerRestoreHeaders={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"}}}}},ContainerRestoreExceptionHeaders={serializedName:"Container_restoreExceptionHeaders",type:{name:"Composite",className:"ContainerRestoreExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerRenameHeaders={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"}}}}},ContainerRenameExceptionHeaders={serializedName:"Container_renameExceptionHeaders",type:{name:"Composite",className:"ContainerRenameExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerSubmitBatchHeaders={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"}}}}},ContainerSubmitBatchExceptionHeaders={serializedName:"Container_submitBatchExceptionHeaders",type:{name:"Composite",className:"ContainerSubmitBatchExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerFilterBlobsHeaders={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"}}}}},ContainerFilterBlobsExceptionHeaders={serializedName:"Container_filterBlobsExceptionHeaders",type:{name:"Composite",className:"ContainerFilterBlobsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerAcquireLeaseHeaders={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"}}}}},ContainerAcquireLeaseExceptionHeaders={serializedName:"Container_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerReleaseLeaseHeaders={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"}}}}},ContainerReleaseLeaseExceptionHeaders={serializedName:"Container_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerRenewLeaseHeaders={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"}}}}},ContainerRenewLeaseExceptionHeaders={serializedName:"Container_renewLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerBreakLeaseHeaders={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"}}}}},ContainerBreakLeaseExceptionHeaders={serializedName:"Container_breakLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerChangeLeaseHeaders={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"}}}}},ContainerChangeLeaseExceptionHeaders={serializedName:"Container_changeLeaseExceptionHeaders",type:{name:"Composite",className:"ContainerChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerListBlobFlatSegmentHeaders={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"}}}}},ContainerListBlobFlatSegmentExceptionHeaders={serializedName:"Container_listBlobFlatSegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobFlatSegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerListBlobHierarchySegmentHeaders={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"}}}}},ContainerListBlobHierarchySegmentExceptionHeaders={serializedName:"Container_listBlobHierarchySegmentExceptionHeaders",type:{name:"Composite",className:"ContainerListBlobHierarchySegmentExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},ContainerGetAccountInfoHeaders={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"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}}}}},ContainerGetAccountInfoExceptionHeaders={serializedName:"Container_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"ContainerGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobDownloadHeaders={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",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",headerCollectionPrefix:"x-ms-or-",xmlName:"x-ms-or",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"]}},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"}}}}},BlobDownloadExceptionHeaders={serializedName:"Blob_downloadExceptionHeaders",type:{name:"Composite",className:"BlobDownloadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobGetPropertiesHeaders={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",headerCollectionPrefix:"x-ms-meta-",xmlName:"x-ms-meta",type:{name:"Dictionary",value:{type:{name:"String"}}}},objectReplicationPolicyId:{serializedName:"x-ms-or-policy-id",xmlName:"x-ms-or-policy-id",type:{name:"String"}},objectReplicationRules:{serializedName:"x-ms-or",headerCollectionPrefix:"x-ms-or-",xmlName:"x-ms-or",type:{name:"Dictionary",value:{type:{name:"String"}}}},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"}}}}},BlobGetPropertiesExceptionHeaders={serializedName:"Blob_getPropertiesExceptionHeaders",type:{name:"Composite",className:"BlobGetPropertiesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobDeleteHeaders={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"}}}}},BlobDeleteExceptionHeaders={serializedName:"Blob_deleteExceptionHeaders",type:{name:"Composite",className:"BlobDeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobUndeleteHeaders={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"}}}}},BlobUndeleteExceptionHeaders={serializedName:"Blob_undeleteExceptionHeaders",type:{name:"Composite",className:"BlobUndeleteExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetExpiryHeaders={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"}}}}},BlobSetExpiryExceptionHeaders={serializedName:"Blob_setExpiryExceptionHeaders",type:{name:"Composite",className:"BlobSetExpiryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetHttpHeadersHeaders={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"}}}}},BlobSetHttpHeadersExceptionHeaders={serializedName:"Blob_setHttpHeadersExceptionHeaders",type:{name:"Composite",className:"BlobSetHttpHeadersExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetImmutabilityPolicyHeaders={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"]}}}}},BlobSetImmutabilityPolicyExceptionHeaders={serializedName:"Blob_setImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobSetImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobDeleteImmutabilityPolicyHeaders={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"}}}}},BlobDeleteImmutabilityPolicyExceptionHeaders={serializedName:"Blob_deleteImmutabilityPolicyExceptionHeaders",type:{name:"Composite",className:"BlobDeleteImmutabilityPolicyExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetLegalHoldHeaders={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"}}}}},BlobSetLegalHoldExceptionHeaders={serializedName:"Blob_setLegalHoldExceptionHeaders",type:{name:"Composite",className:"BlobSetLegalHoldExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetMetadataHeaders={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"}}}}},BlobSetMetadataExceptionHeaders={serializedName:"Blob_setMetadataExceptionHeaders",type:{name:"Composite",className:"BlobSetMetadataExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobAcquireLeaseHeaders={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"}}}}},BlobAcquireLeaseExceptionHeaders={serializedName:"Blob_acquireLeaseExceptionHeaders",type:{name:"Composite",className:"BlobAcquireLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobReleaseLeaseHeaders={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"}}}}},BlobReleaseLeaseExceptionHeaders={serializedName:"Blob_releaseLeaseExceptionHeaders",type:{name:"Composite",className:"BlobReleaseLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobRenewLeaseHeaders={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"}}}}},BlobRenewLeaseExceptionHeaders={serializedName:"Blob_renewLeaseExceptionHeaders",type:{name:"Composite",className:"BlobRenewLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobChangeLeaseHeaders={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"}}}}},BlobChangeLeaseExceptionHeaders={serializedName:"Blob_changeLeaseExceptionHeaders",type:{name:"Composite",className:"BlobChangeLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobBreakLeaseHeaders={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"}}}}},BlobBreakLeaseExceptionHeaders={serializedName:"Blob_breakLeaseExceptionHeaders",type:{name:"Composite",className:"BlobBreakLeaseExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobCreateSnapshotHeaders={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"}}}}},BlobCreateSnapshotExceptionHeaders={serializedName:"Blob_createSnapshotExceptionHeaders",type:{name:"Composite",className:"BlobCreateSnapshotExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobStartCopyFromURLHeaders={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"}}}}},BlobStartCopyFromURLExceptionHeaders={serializedName:"Blob_startCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobStartCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobCopyFromURLHeaders={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:!0,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"}}}}},BlobCopyFromURLExceptionHeaders={serializedName:"Blob_copyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobAbortCopyFromURLHeaders={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"}}}}},BlobAbortCopyFromURLExceptionHeaders={serializedName:"Blob_abortCopyFromURLExceptionHeaders",type:{name:"Composite",className:"BlobAbortCopyFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetTierHeaders={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"}}}}},BlobSetTierExceptionHeaders={serializedName:"Blob_setTierExceptionHeaders",type:{name:"Composite",className:"BlobSetTierExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobGetAccountInfoHeaders={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"]}},isHierarchicalNamespaceEnabled:{serializedName:"x-ms-is-hns-enabled",xmlName:"x-ms-is-hns-enabled",type:{name:"Boolean"}}}}},BlobGetAccountInfoExceptionHeaders={serializedName:"Blob_getAccountInfoExceptionHeaders",type:{name:"Composite",className:"BlobGetAccountInfoExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobQueryHeaders={serializedName:"Blob_queryHeaders",type:{name:"Composite",className:"BlobQueryHeaders",modelProperties:{lastModified:{serializedName:"last-modified",xmlName:"last-modified",type:{name:"DateTimeRfc1123"}},metadata:{serializedName:"x-ms-meta",headerCollectionPrefix:"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"}}}}},BlobQueryExceptionHeaders={serializedName:"Blob_queryExceptionHeaders",type:{name:"Composite",className:"BlobQueryExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobGetTagsHeaders={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"}}}}},BlobGetTagsExceptionHeaders={serializedName:"Blob_getTagsExceptionHeaders",type:{name:"Composite",className:"BlobGetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlobSetTagsHeaders={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"}}}}},BlobSetTagsExceptionHeaders={serializedName:"Blob_setTagsExceptionHeaders",type:{name:"Composite",className:"BlobSetTagsExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobCreateHeaders={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"}}}}},PageBlobCreateExceptionHeaders={serializedName:"PageBlob_createExceptionHeaders",type:{name:"Composite",className:"PageBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobUploadPagesHeaders={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"}}}}},PageBlobUploadPagesExceptionHeaders={serializedName:"PageBlob_uploadPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobClearPagesHeaders={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"}}}}},PageBlobClearPagesExceptionHeaders={serializedName:"PageBlob_clearPagesExceptionHeaders",type:{name:"Composite",className:"PageBlobClearPagesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobUploadPagesFromURLHeaders={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"}}}}},PageBlobUploadPagesFromURLExceptionHeaders={serializedName:"PageBlob_uploadPagesFromURLExceptionHeaders",type:{name:"Composite",className:"PageBlobUploadPagesFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobGetPageRangesHeaders={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"}}}}},PageBlobGetPageRangesExceptionHeaders={serializedName:"PageBlob_getPageRangesExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobGetPageRangesDiffHeaders={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"}}}}},PageBlobGetPageRangesDiffExceptionHeaders={serializedName:"PageBlob_getPageRangesDiffExceptionHeaders",type:{name:"Composite",className:"PageBlobGetPageRangesDiffExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobResizeHeaders={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"}}}}},PageBlobResizeExceptionHeaders={serializedName:"PageBlob_resizeExceptionHeaders",type:{name:"Composite",className:"PageBlobResizeExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobUpdateSequenceNumberHeaders={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"}}}}},PageBlobUpdateSequenceNumberExceptionHeaders={serializedName:"PageBlob_updateSequenceNumberExceptionHeaders",type:{name:"Composite",className:"PageBlobUpdateSequenceNumberExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},PageBlobCopyIncrementalHeaders={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"}}}}},PageBlobCopyIncrementalExceptionHeaders={serializedName:"PageBlob_copyIncrementalExceptionHeaders",type:{name:"Composite",className:"PageBlobCopyIncrementalExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AppendBlobCreateHeaders={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"}}}}},AppendBlobCreateExceptionHeaders={serializedName:"AppendBlob_createExceptionHeaders",type:{name:"Composite",className:"AppendBlobCreateExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AppendBlobAppendBlockHeaders={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"}}}}},AppendBlobAppendBlockExceptionHeaders={serializedName:"AppendBlob_appendBlockExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AppendBlobAppendBlockFromUrlHeaders={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"}}}}},AppendBlobAppendBlockFromUrlExceptionHeaders={serializedName:"AppendBlob_appendBlockFromUrlExceptionHeaders",type:{name:"Composite",className:"AppendBlobAppendBlockFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},AppendBlobSealHeaders={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"}}}}},AppendBlobSealExceptionHeaders={serializedName:"AppendBlob_sealExceptionHeaders",type:{name:"Composite",className:"AppendBlobSealExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobUploadHeaders={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"}}}}},BlockBlobUploadExceptionHeaders={serializedName:"BlockBlob_uploadExceptionHeaders",type:{name:"Composite",className:"BlockBlobUploadExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobPutBlobFromUrlHeaders={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"}}}}},BlockBlobPutBlobFromUrlExceptionHeaders={serializedName:"BlockBlob_putBlobFromUrlExceptionHeaders",type:{name:"Composite",className:"BlockBlobPutBlobFromUrlExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobStageBlockHeaders={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"}}}}},BlockBlobStageBlockExceptionHeaders={serializedName:"BlockBlob_stageBlockExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobStageBlockFromURLHeaders={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"}}}}},BlockBlobStageBlockFromURLExceptionHeaders={serializedName:"BlockBlob_stageBlockFromURLExceptionHeaders",type:{name:"Composite",className:"BlockBlobStageBlockFromURLExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobCommitBlockListHeaders={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"}}}}},BlockBlobCommitBlockListExceptionHeaders={serializedName:"BlockBlob_commitBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobCommitBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},BlockBlobGetBlockListHeaders={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"}}}}},BlockBlobGetBlockListExceptionHeaders={serializedName:"BlockBlob_getBlockListExceptionHeaders",type:{name:"Composite",className:"BlockBlobGetBlockListExceptionHeaders",modelProperties:{errorCode:{serializedName:"x-ms-error-code",xmlName:"x-ms-error-code",type:{name:"String"}}}}},Mappers=Object.freeze(Object.defineProperty({__proto__:null,AccessPolicy:AccessPolicy,AppendBlobAppendBlockExceptionHeaders:AppendBlobAppendBlockExceptionHeaders,AppendBlobAppendBlockFromUrlExceptionHeaders:AppendBlobAppendBlockFromUrlExceptionHeaders,AppendBlobAppendBlockFromUrlHeaders:AppendBlobAppendBlockFromUrlHeaders,AppendBlobAppendBlockHeaders:AppendBlobAppendBlockHeaders,AppendBlobCreateExceptionHeaders:AppendBlobCreateExceptionHeaders,AppendBlobCreateHeaders:AppendBlobCreateHeaders,AppendBlobSealExceptionHeaders:AppendBlobSealExceptionHeaders,AppendBlobSealHeaders:AppendBlobSealHeaders,ArrowConfiguration:ArrowConfiguration,ArrowField:ArrowField,BlobAbortCopyFromURLExceptionHeaders:BlobAbortCopyFromURLExceptionHeaders,BlobAbortCopyFromURLHeaders:BlobAbortCopyFromURLHeaders,BlobAcquireLeaseExceptionHeaders:BlobAcquireLeaseExceptionHeaders,BlobAcquireLeaseHeaders:BlobAcquireLeaseHeaders,BlobBreakLeaseExceptionHeaders:BlobBreakLeaseExceptionHeaders,BlobBreakLeaseHeaders:BlobBreakLeaseHeaders,BlobChangeLeaseExceptionHeaders:BlobChangeLeaseExceptionHeaders,BlobChangeLeaseHeaders:BlobChangeLeaseHeaders,BlobCopyFromURLExceptionHeaders:BlobCopyFromURLExceptionHeaders,BlobCopyFromURLHeaders:BlobCopyFromURLHeaders,BlobCreateSnapshotExceptionHeaders:BlobCreateSnapshotExceptionHeaders,BlobCreateSnapshotHeaders:BlobCreateSnapshotHeaders,BlobDeleteExceptionHeaders:BlobDeleteExceptionHeaders,BlobDeleteHeaders:BlobDeleteHeaders,BlobDeleteImmutabilityPolicyExceptionHeaders:BlobDeleteImmutabilityPolicyExceptionHeaders,BlobDeleteImmutabilityPolicyHeaders:BlobDeleteImmutabilityPolicyHeaders,BlobDownloadExceptionHeaders:BlobDownloadExceptionHeaders,BlobDownloadHeaders:BlobDownloadHeaders,BlobFlatListSegment:BlobFlatListSegment,BlobGetAccountInfoExceptionHeaders:BlobGetAccountInfoExceptionHeaders,BlobGetAccountInfoHeaders:BlobGetAccountInfoHeaders,BlobGetPropertiesExceptionHeaders:BlobGetPropertiesExceptionHeaders,BlobGetPropertiesHeaders:BlobGetPropertiesHeaders,BlobGetTagsExceptionHeaders:BlobGetTagsExceptionHeaders,BlobGetTagsHeaders:BlobGetTagsHeaders,BlobHierarchyListSegment:BlobHierarchyListSegment,BlobItemInternal:BlobItemInternal,BlobName:BlobName,BlobPrefix:BlobPrefix,BlobPropertiesInternal:BlobPropertiesInternal,BlobQueryExceptionHeaders:BlobQueryExceptionHeaders,BlobQueryHeaders:BlobQueryHeaders,BlobReleaseLeaseExceptionHeaders:BlobReleaseLeaseExceptionHeaders,BlobReleaseLeaseHeaders:BlobReleaseLeaseHeaders,BlobRenewLeaseExceptionHeaders:BlobRenewLeaseExceptionHeaders,BlobRenewLeaseHeaders:BlobRenewLeaseHeaders,BlobServiceProperties:BlobServiceProperties,BlobServiceStatistics:BlobServiceStatistics,BlobSetExpiryExceptionHeaders:BlobSetExpiryExceptionHeaders,BlobSetExpiryHeaders:BlobSetExpiryHeaders,BlobSetHttpHeadersExceptionHeaders:BlobSetHttpHeadersExceptionHeaders,BlobSetHttpHeadersHeaders:BlobSetHttpHeadersHeaders,BlobSetImmutabilityPolicyExceptionHeaders:BlobSetImmutabilityPolicyExceptionHeaders,BlobSetImmutabilityPolicyHeaders:BlobSetImmutabilityPolicyHeaders,BlobSetLegalHoldExceptionHeaders:BlobSetLegalHoldExceptionHeaders,BlobSetLegalHoldHeaders:BlobSetLegalHoldHeaders,BlobSetMetadataExceptionHeaders:BlobSetMetadataExceptionHeaders,BlobSetMetadataHeaders:BlobSetMetadataHeaders,BlobSetTagsExceptionHeaders:BlobSetTagsExceptionHeaders,BlobSetTagsHeaders:BlobSetTagsHeaders,BlobSetTierExceptionHeaders:BlobSetTierExceptionHeaders,BlobSetTierHeaders:BlobSetTierHeaders,BlobStartCopyFromURLExceptionHeaders:BlobStartCopyFromURLExceptionHeaders,BlobStartCopyFromURLHeaders:BlobStartCopyFromURLHeaders,BlobTag:BlobTag,BlobTags:BlobTags,BlobUndeleteExceptionHeaders:BlobUndeleteExceptionHeaders,BlobUndeleteHeaders:BlobUndeleteHeaders,Block:Block,BlockBlobCommitBlockListExceptionHeaders:BlockBlobCommitBlockListExceptionHeaders,BlockBlobCommitBlockListHeaders:BlockBlobCommitBlockListHeaders,BlockBlobGetBlockListExceptionHeaders:BlockBlobGetBlockListExceptionHeaders,BlockBlobGetBlockListHeaders:BlockBlobGetBlockListHeaders,BlockBlobPutBlobFromUrlExceptionHeaders:BlockBlobPutBlobFromUrlExceptionHeaders,BlockBlobPutBlobFromUrlHeaders:BlockBlobPutBlobFromUrlHeaders,BlockBlobStageBlockExceptionHeaders:BlockBlobStageBlockExceptionHeaders,BlockBlobStageBlockFromURLExceptionHeaders:BlockBlobStageBlockFromURLExceptionHeaders,BlockBlobStageBlockFromURLHeaders:BlockBlobStageBlockFromURLHeaders,BlockBlobStageBlockHeaders:BlockBlobStageBlockHeaders,BlockBlobUploadExceptionHeaders:BlockBlobUploadExceptionHeaders,BlockBlobUploadHeaders:BlockBlobUploadHeaders,BlockList:BlockList,BlockLookupList:BlockLookupList,ClearRange:ClearRange,ContainerAcquireLeaseExceptionHeaders:ContainerAcquireLeaseExceptionHeaders,ContainerAcquireLeaseHeaders:ContainerAcquireLeaseHeaders,ContainerBreakLeaseExceptionHeaders:ContainerBreakLeaseExceptionHeaders,ContainerBreakLeaseHeaders:ContainerBreakLeaseHeaders,ContainerChangeLeaseExceptionHeaders:ContainerChangeLeaseExceptionHeaders,ContainerChangeLeaseHeaders:ContainerChangeLeaseHeaders,ContainerCreateExceptionHeaders:ContainerCreateExceptionHeaders,ContainerCreateHeaders:ContainerCreateHeaders,ContainerDeleteExceptionHeaders:ContainerDeleteExceptionHeaders,ContainerDeleteHeaders:ContainerDeleteHeaders,ContainerFilterBlobsExceptionHeaders:ContainerFilterBlobsExceptionHeaders,ContainerFilterBlobsHeaders:ContainerFilterBlobsHeaders,ContainerGetAccessPolicyExceptionHeaders:ContainerGetAccessPolicyExceptionHeaders,ContainerGetAccessPolicyHeaders:ContainerGetAccessPolicyHeaders,ContainerGetAccountInfoExceptionHeaders:ContainerGetAccountInfoExceptionHeaders,ContainerGetAccountInfoHeaders:ContainerGetAccountInfoHeaders,ContainerGetPropertiesExceptionHeaders:ContainerGetPropertiesExceptionHeaders,ContainerGetPropertiesHeaders:ContainerGetPropertiesHeaders,ContainerItem:ContainerItem,ContainerListBlobFlatSegmentExceptionHeaders:ContainerListBlobFlatSegmentExceptionHeaders,ContainerListBlobFlatSegmentHeaders:ContainerListBlobFlatSegmentHeaders,ContainerListBlobHierarchySegmentExceptionHeaders:ContainerListBlobHierarchySegmentExceptionHeaders,ContainerListBlobHierarchySegmentHeaders:ContainerListBlobHierarchySegmentHeaders,ContainerProperties:ContainerProperties,ContainerReleaseLeaseExceptionHeaders:ContainerReleaseLeaseExceptionHeaders,ContainerReleaseLeaseHeaders:ContainerReleaseLeaseHeaders,ContainerRenameExceptionHeaders:ContainerRenameExceptionHeaders,ContainerRenameHeaders:ContainerRenameHeaders,ContainerRenewLeaseExceptionHeaders:ContainerRenewLeaseExceptionHeaders,ContainerRenewLeaseHeaders:ContainerRenewLeaseHeaders,ContainerRestoreExceptionHeaders:ContainerRestoreExceptionHeaders,ContainerRestoreHeaders:ContainerRestoreHeaders,ContainerSetAccessPolicyExceptionHeaders:ContainerSetAccessPolicyExceptionHeaders,ContainerSetAccessPolicyHeaders:ContainerSetAccessPolicyHeaders,ContainerSetMetadataExceptionHeaders:ContainerSetMetadataExceptionHeaders,ContainerSetMetadataHeaders:ContainerSetMetadataHeaders,ContainerSubmitBatchExceptionHeaders:ContainerSubmitBatchExceptionHeaders,ContainerSubmitBatchHeaders:ContainerSubmitBatchHeaders,CorsRule:CorsRule,DelimitedTextConfiguration:DelimitedTextConfiguration,FilterBlobItem:FilterBlobItem,FilterBlobSegment:FilterBlobSegment,GeoReplication:GeoReplication,JsonTextConfiguration:JsonTextConfiguration,KeyInfo:KeyInfo,ListBlobsFlatSegmentResponse:ListBlobsFlatSegmentResponse,ListBlobsHierarchySegmentResponse:ListBlobsHierarchySegmentResponse,ListContainersSegmentResponse:ListContainersSegmentResponse,Logging:Logging,Metrics:Metrics,PageBlobClearPagesExceptionHeaders:PageBlobClearPagesExceptionHeaders,PageBlobClearPagesHeaders:PageBlobClearPagesHeaders,PageBlobCopyIncrementalExceptionHeaders:PageBlobCopyIncrementalExceptionHeaders,PageBlobCopyIncrementalHeaders:PageBlobCopyIncrementalHeaders,PageBlobCreateExceptionHeaders:PageBlobCreateExceptionHeaders,PageBlobCreateHeaders:PageBlobCreateHeaders,PageBlobGetPageRangesDiffExceptionHeaders:PageBlobGetPageRangesDiffExceptionHeaders,PageBlobGetPageRangesDiffHeaders:PageBlobGetPageRangesDiffHeaders,PageBlobGetPageRangesExceptionHeaders:PageBlobGetPageRangesExceptionHeaders,PageBlobGetPageRangesHeaders:PageBlobGetPageRangesHeaders,PageBlobResizeExceptionHeaders:PageBlobResizeExceptionHeaders,PageBlobResizeHeaders:PageBlobResizeHeaders,PageBlobUpdateSequenceNumberExceptionHeaders:PageBlobUpdateSequenceNumberExceptionHeaders,PageBlobUpdateSequenceNumberHeaders:PageBlobUpdateSequenceNumberHeaders,PageBlobUploadPagesExceptionHeaders:PageBlobUploadPagesExceptionHeaders,PageBlobUploadPagesFromURLExceptionHeaders:PageBlobUploadPagesFromURLExceptionHeaders,PageBlobUploadPagesFromURLHeaders:PageBlobUploadPagesFromURLHeaders,PageBlobUploadPagesHeaders:PageBlobUploadPagesHeaders,PageList:PageList,PageRange:PageRange,QueryFormat:QueryFormat,QueryRequest:QueryRequest,QuerySerialization:QuerySerialization,RetentionPolicy:RetentionPolicy,ServiceFilterBlobsExceptionHeaders:ServiceFilterBlobsExceptionHeaders,ServiceFilterBlobsHeaders:ServiceFilterBlobsHeaders,ServiceGetAccountInfoExceptionHeaders:ServiceGetAccountInfoExceptionHeaders,ServiceGetAccountInfoHeaders:ServiceGetAccountInfoHeaders,ServiceGetPropertiesExceptionHeaders:ServiceGetPropertiesExceptionHeaders,ServiceGetPropertiesHeaders:ServiceGetPropertiesHeaders,ServiceGetStatisticsExceptionHeaders:ServiceGetStatisticsExceptionHeaders,ServiceGetStatisticsHeaders:ServiceGetStatisticsHeaders,ServiceGetUserDelegationKeyExceptionHeaders:ServiceGetUserDelegationKeyExceptionHeaders,ServiceGetUserDelegationKeyHeaders:ServiceGetUserDelegationKeyHeaders,ServiceListContainersSegmentExceptionHeaders:ServiceListContainersSegmentExceptionHeaders,ServiceListContainersSegmentHeaders:ServiceListContainersSegmentHeaders,ServiceSetPropertiesExceptionHeaders:ServiceSetPropertiesExceptionHeaders,ServiceSetPropertiesHeaders:ServiceSetPropertiesHeaders,ServiceSubmitBatchExceptionHeaders:ServiceSubmitBatchExceptionHeaders,ServiceSubmitBatchHeaders:ServiceSubmitBatchHeaders,SignedIdentifier:SignedIdentifier,StaticWebsite:StaticWebsite,StorageError:StorageError,UserDelegationKey:UserDelegationKey},Symbol.toStringTag,{value:"Module"})),contentType={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},blobServiceProperties={parameterPath:"blobServiceProperties",mapper:BlobServiceProperties},accept={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},url={parameterPath:"url",mapper:{serializedName:"url",required:!0,xmlName:"url",type:{name:"String"}},skipEncoding:!0},restype={parameterPath:"restype",mapper:{defaultValue:"service",isConstant:!0,serializedName:"restype",type:{name:"String"}}},comp={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:!0,serializedName:"comp",type:{name:"String"}}},timeoutInSeconds={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}},version={parameterPath:"version",mapper:{defaultValue:"2024-08-04",isConstant:!0,serializedName:"x-ms-version",type:{name:"String"}}},requestId={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}},accept1={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},comp1={parameterPath:"comp",mapper:{defaultValue:"stats",isConstant:!0,serializedName:"comp",type:{name:"String"}}},comp2={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:!0,serializedName:"comp",type:{name:"String"}}},prefix={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}},marker={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}},maxPageSize={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}},include={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListContainersIncludeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["metadata","deleted","system"]}}}},collectionFormat:"CSV"},keyInfo={parameterPath:"keyInfo",mapper:KeyInfo},comp3={parameterPath:"comp",mapper:{defaultValue:"userdelegationkey",isConstant:!0,serializedName:"comp",type:{name:"String"}}},restype1={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:!0,serializedName:"restype",type:{name:"String"}}},body={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},comp4={parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:!0,serializedName:"comp",type:{name:"String"}}},contentLength={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:!0,xmlName:"Content-Length",type:{name:"Number"}}},multipartContentType={parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:!0,xmlName:"Content-Type",type:{name:"String"}}},comp5={parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:!0,serializedName:"comp",type:{name:"String"}}},where={parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}},restype2={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:!0,serializedName:"restype",type:{name:"String"}}},metadata={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",type:{name:"Dictionary",value:{type:{name:"String"}}}}},access={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}},defaultEncryptionScope={parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}},preventEncryptionScopeOverride={parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}},leaseId={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}},ifModifiedSince={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}},ifUnmodifiedSince={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}},comp6={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:!0,serializedName:"comp",type:{name:"String"}}},comp7={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:!0,serializedName:"comp",type:{name:"String"}}},containerAcl={parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}},comp8={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:!0,serializedName:"comp",type:{name:"String"}}},deletedContainerName={parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}},deletedContainerVersion={parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}},comp9={parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:!0,serializedName:"comp",type:{name:"String"}}},sourceContainerName={parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:!0,xmlName:"x-ms-source-container-name",type:{name:"String"}}},sourceLeaseId={parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}},comp10={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:!0,serializedName:"comp",type:{name:"String"}}},action={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},duration={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}},proposedLeaseId={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},action1={parameterPath:"action",mapper:{defaultValue:"release",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},leaseId1={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:!0,xmlName:"x-ms-lease-id",type:{name:"String"}}},action2={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},action3={parameterPath:"action",mapper:{defaultValue:"break",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},breakPeriod={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}},action4={parameterPath:"action",mapper:{defaultValue:"change",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},proposedLeaseId1={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:!0,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},include1={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:"CSV"},delimiter={parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:!0,xmlName:"delimiter",type:{name:"String"}}},snapshot={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}},versionId={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}},range={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}},rangeGetContentMD5={parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}},rangeGetContentCRC64={parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}},encryptionKey={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}},encryptionKeySha256={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}},encryptionAlgorithm={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}},ifMatch={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}},ifNoneMatch={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}},ifTags={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}},deleteSnapshots={parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapshots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}},blobDeleteType={parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}},comp11={parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:!0,serializedName:"comp",type:{name:"String"}}},expiryOptions={parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:!0,xmlName:"x-ms-expiry-option",type:{name:"String"}}},expiresOn={parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}},blobCacheControl={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}},blobContentType={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}},blobContentMD5={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}},blobContentEncoding={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}},blobContentLanguage={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}},blobContentDisposition={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}},comp12={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:!0,serializedName:"comp",type:{name:"String"}}},immutabilityPolicyExpiry={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}},immutabilityPolicyMode={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}},comp13={parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:!0,serializedName:"comp",type:{name:"String"}}},legalHold={parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:!0,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}},encryptionScope={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}},comp14={parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:!0,serializedName:"comp",type:{name:"String"}}},tier={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"]}}},rehydratePriority={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}},sourceIfModifiedSince={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}},sourceIfUnmodifiedSince={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}},sourceIfMatch={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}},sourceIfNoneMatch={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}},sourceIfTags={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}},copySource={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},blobTagsString={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}},sealBlob={parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}},legalHold1={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}},xMsRequiresSync={parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:!0,serializedName:"x-ms-requires-sync",type:{name:"String"}}},sourceContentMD5={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}},copySourceAuthorization={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}},copySourceTags={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}},comp15={parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:!0,serializedName:"comp",type:{name:"String"}}},copyActionAbortConstant={parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:!0,serializedName:"x-ms-copy-action",type:{name:"String"}}},copyId={parameterPath:"copyId",mapper:{serializedName:"copyid",required:!0,xmlName:"copyid",type:{name:"String"}}},comp16={parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:!0,serializedName:"comp",type:{name:"String"}}},tier1={parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:!0,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}},queryRequest={parameterPath:["options","queryRequest"],mapper:QueryRequest},comp17={parameterPath:"comp",mapper:{defaultValue:"query",isConstant:!0,serializedName:"comp",type:{name:"String"}}},comp18={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:!0,serializedName:"comp",type:{name:"String"}}},tags={parameterPath:["options","tags"],mapper:BlobTags},transactionalContentMD5={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}},transactionalContentCrc64={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}},blobType={parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},blobContentLength={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:!0,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}},blobSequenceNumber={parameterPath:["options","blobSequenceNumber"],mapper:{defaultValue:0,serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}},contentType1={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},body1={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},accept2={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},comp19={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:!0,serializedName:"comp",type:{name:"String"}}},pageWrite={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}},ifSequenceNumberLessThanOrEqualTo={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}},ifSequenceNumberLessThan={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}},ifSequenceNumberEqualTo={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}},pageWrite1={parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}},sourceUrl={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},sourceRange={parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:!0,xmlName:"x-ms-source-range",type:{name:"String"}}},sourceContentCrc64={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}},range1={parameterPath:"range",mapper:{serializedName:"x-ms-range",required:!0,xmlName:"x-ms-range",type:{name:"String"}}},comp20={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:!0,serializedName:"comp",type:{name:"String"}}},prevsnapshot={parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}},prevSnapshotUrl={parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}},sequenceNumberAction={parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:!0,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}},comp21={parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:!0,serializedName:"comp",type:{name:"String"}}},blobType1={parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},comp22={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:!0,serializedName:"comp",type:{name:"String"}}},maxSize={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}},appendPosition={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}},sourceRange1={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}},comp23={parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:!0,serializedName:"comp",type:{name:"String"}}},blobType2={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},copySourceBlobProperties={parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}},comp24={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:!0,serializedName:"comp",type:{name:"String"}}},blockId={parameterPath:"blockId",mapper:{serializedName:"blockid",required:!0,xmlName:"blockid",type:{name:"String"}}},blocks={parameterPath:"blocks",mapper:BlockLookupList},comp25={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:!0,serializedName:"comp",type:{name:"String"}}},listType={parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:!0,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}};class ServiceImpl{constructor(e){this.client=e}setProperties(e,t){return this.client.sendOperationRequest({blobServiceProperties:e,options:t},setPropertiesOperationSpec)}getProperties(e){return this.client.sendOperationRequest({options:e},getPropertiesOperationSpec$2)}getStatistics(e){return this.client.sendOperationRequest({options:e},getStatisticsOperationSpec)}listContainersSegment(e){return this.client.sendOperationRequest({options:e},listContainersSegmentOperationSpec)}getUserDelegationKey(e,t){return this.client.sendOperationRequest({keyInfo:e,options:t},getUserDelegationKeyOperationSpec)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},getAccountInfoOperationSpec$2)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},submitBatchOperationSpec$1)}filterBlobs(e){return this.client.sendOperationRequest({options:e},filterBlobsOperationSpec$1)}}const xmlSerializer$5=createSerializer(Mappers,!0),setPropertiesOperationSpec={path:"/",httpMethod:"PUT",responses:{202:{headersMapper:ServiceSetPropertiesHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceSetPropertiesExceptionHeaders}},requestBody:blobServiceProperties,queryParameters:[restype,comp,timeoutInSeconds],urlParameters:[url],headerParameters:[contentType,accept,version,requestId],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$5},getPropertiesOperationSpec$2={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:BlobServiceProperties,headersMapper:ServiceGetPropertiesHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceGetPropertiesExceptionHeaders}},queryParameters:[restype,comp,timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$5},getStatisticsOperationSpec={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:BlobServiceStatistics,headersMapper:ServiceGetStatisticsHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceGetStatisticsExceptionHeaders}},queryParameters:[restype,timeoutInSeconds,comp1],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$5},listContainersSegmentOperationSpec={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:ListContainersSegmentResponse,headersMapper:ServiceListContainersSegmentHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceListContainersSegmentExceptionHeaders}},queryParameters:[timeoutInSeconds,comp2,prefix,marker,maxPageSize,include],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$5},getUserDelegationKeyOperationSpec={path:"/",httpMethod:"POST",responses:{200:{bodyMapper:UserDelegationKey,headersMapper:ServiceGetUserDelegationKeyHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceGetUserDelegationKeyExceptionHeaders}},requestBody:keyInfo,queryParameters:[restype,timeoutInSeconds,comp3],urlParameters:[url],headerParameters:[contentType,accept,version,requestId],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$5},getAccountInfoOperationSpec$2={path:"/",httpMethod:"GET",responses:{200:{headersMapper:ServiceGetAccountInfoHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceGetAccountInfoExceptionHeaders}},queryParameters:[comp,timeoutInSeconds,restype1],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$5},submitBatchOperationSpec$1={path:"/",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ServiceSubmitBatchHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceSubmitBatchExceptionHeaders}},requestBody:body,queryParameters:[timeoutInSeconds,comp4],urlParameters:[url],headerParameters:[accept,version,requestId,contentLength,multipartContentType],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$5},filterBlobsOperationSpec$1={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:FilterBlobSegment,headersMapper:ServiceFilterBlobsHeaders},default:{bodyMapper:StorageError,headersMapper:ServiceFilterBlobsExceptionHeaders}},queryParameters:[timeoutInSeconds,marker,maxPageSize,comp5,where],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$5};class ContainerImpl{constructor(e){this.client=e}create(e){return this.client.sendOperationRequest({options:e},createOperationSpec$2)}getProperties(e){return this.client.sendOperationRequest({options:e},getPropertiesOperationSpec$1)}delete(e){return this.client.sendOperationRequest({options:e},deleteOperationSpec$1)}setMetadata(e){return this.client.sendOperationRequest({options:e},setMetadataOperationSpec$1)}getAccessPolicy(e){return this.client.sendOperationRequest({options:e},getAccessPolicyOperationSpec)}setAccessPolicy(e){return this.client.sendOperationRequest({options:e},setAccessPolicyOperationSpec)}restore(e){return this.client.sendOperationRequest({options:e},restoreOperationSpec)}rename(e,t){return this.client.sendOperationRequest({sourceContainerName:e,options:t},renameOperationSpec)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},submitBatchOperationSpec)}filterBlobs(e){return this.client.sendOperationRequest({options:e},filterBlobsOperationSpec)}acquireLease(e){return this.client.sendOperationRequest({options:e},acquireLeaseOperationSpec$1)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},releaseLeaseOperationSpec$1)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},renewLeaseOperationSpec$1)}breakLease(e){return this.client.sendOperationRequest({options:e},breakLeaseOperationSpec$1)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},changeLeaseOperationSpec$1)}listBlobFlatSegment(e){return this.client.sendOperationRequest({options:e},listBlobFlatSegmentOperationSpec)}listBlobHierarchySegment(e,t){return this.client.sendOperationRequest({delimiter:e,options:t},listBlobHierarchySegmentOperationSpec)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},getAccountInfoOperationSpec$1)}}const xmlSerializer$4=createSerializer(Mappers,!0),createOperationSpec$2={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ContainerCreateHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerCreateExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,access,defaultEncryptionScope,preventEncryptionScopeOverride],isXML:!0,serializer:xmlSerializer$4},getPropertiesOperationSpec$1={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:ContainerGetPropertiesHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerGetPropertiesExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId],isXML:!0,serializer:xmlSerializer$4},deleteOperationSpec$1={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:ContainerDeleteHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerDeleteExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince],isXML:!0,serializer:xmlSerializer$4},setMetadataOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerSetMetadataHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerSetMetadataExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp6],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,leaseId,ifModifiedSince],isXML:!0,serializer:xmlSerializer$4},getAccessPolicyOperationSpec={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier"},headersMapper:ContainerGetAccessPolicyHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerGetAccessPolicyExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp7],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId],isXML:!0,serializer:xmlSerializer$4},setAccessPolicyOperationSpec={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerSetAccessPolicyHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerSetAccessPolicyExceptionHeaders}},requestBody:containerAcl,queryParameters:[timeoutInSeconds,restype2,comp7],urlParameters:[url],headerParameters:[contentType,accept,version,requestId,access,leaseId,ifModifiedSince,ifUnmodifiedSince],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$4},restoreOperationSpec={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ContainerRestoreHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerRestoreExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp8],urlParameters:[url],headerParameters:[version,requestId,accept1,deletedContainerName,deletedContainerVersion],isXML:!0,serializer:xmlSerializer$4},renameOperationSpec={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerRenameHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerRenameExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp9],urlParameters:[url],headerParameters:[version,requestId,accept1,sourceContainerName,sourceLeaseId],isXML:!0,serializer:xmlSerializer$4},submitBatchOperationSpec={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:ContainerSubmitBatchHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerSubmitBatchExceptionHeaders}},requestBody:body,queryParameters:[timeoutInSeconds,comp4,restype2],urlParameters:[url],headerParameters:[accept,version,requestId,contentLength,multipartContentType],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$4},filterBlobsOperationSpec={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:FilterBlobSegment,headersMapper:ContainerFilterBlobsHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerFilterBlobsExceptionHeaders}},queryParameters:[timeoutInSeconds,marker,maxPageSize,comp5,where,restype2],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$4},acquireLeaseOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:ContainerAcquireLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerAcquireLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action,duration,proposedLeaseId],isXML:!0,serializer:xmlSerializer$4},releaseLeaseOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerReleaseLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerReleaseLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action1,leaseId1],isXML:!0,serializer:xmlSerializer$4},renewLeaseOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerRenewLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerRenewLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,leaseId1,action2],isXML:!0,serializer:xmlSerializer$4},breakLeaseOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:ContainerBreakLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerBreakLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action3,breakPeriod],isXML:!0,serializer:xmlSerializer$4},changeLeaseOperationSpec$1={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:ContainerChangeLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerChangeLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,restype2,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,leaseId1,action4,proposedLeaseId1],isXML:!0,serializer:xmlSerializer$4},listBlobFlatSegmentOperationSpec={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:ListBlobsFlatSegmentResponse,headersMapper:ContainerListBlobFlatSegmentHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerListBlobFlatSegmentExceptionHeaders}},queryParameters:[timeoutInSeconds,comp2,prefix,marker,maxPageSize,restype2,include1],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$4},listBlobHierarchySegmentOperationSpec={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:ListBlobsHierarchySegmentResponse,headersMapper:ContainerListBlobHierarchySegmentHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerListBlobHierarchySegmentExceptionHeaders}},queryParameters:[timeoutInSeconds,comp2,prefix,marker,maxPageSize,restype2,include1,delimiter],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$4},getAccountInfoOperationSpec$1={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:ContainerGetAccountInfoHeaders},default:{bodyMapper:StorageError,headersMapper:ContainerGetAccountInfoExceptionHeaders}},queryParameters:[comp,timeoutInSeconds,restype1],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$4};class BlobImpl{constructor(e){this.client=e}download(e){return this.client.sendOperationRequest({options:e},downloadOperationSpec)}getProperties(e){return this.client.sendOperationRequest({options:e},getPropertiesOperationSpec)}delete(e){return this.client.sendOperationRequest({options:e},deleteOperationSpec)}undelete(e){return this.client.sendOperationRequest({options:e},undeleteOperationSpec)}setExpiry(e,t){return this.client.sendOperationRequest({expiryOptions:e,options:t},setExpiryOperationSpec)}setHttpHeaders(e){return this.client.sendOperationRequest({options:e},setHttpHeadersOperationSpec)}setImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},setImmutabilityPolicyOperationSpec)}deleteImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},deleteImmutabilityPolicyOperationSpec)}setLegalHold(e,t){return this.client.sendOperationRequest({legalHold:e,options:t},setLegalHoldOperationSpec)}setMetadata(e){return this.client.sendOperationRequest({options:e},setMetadataOperationSpec)}acquireLease(e){return this.client.sendOperationRequest({options:e},acquireLeaseOperationSpec)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},releaseLeaseOperationSpec)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},renewLeaseOperationSpec)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},changeLeaseOperationSpec)}breakLease(e){return this.client.sendOperationRequest({options:e},breakLeaseOperationSpec)}createSnapshot(e){return this.client.sendOperationRequest({options:e},createSnapshotOperationSpec)}startCopyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},startCopyFromURLOperationSpec)}copyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},copyFromURLOperationSpec)}abortCopyFromURL(e,t){return this.client.sendOperationRequest({copyId:e,options:t},abortCopyFromURLOperationSpec)}setTier(e,t){return this.client.sendOperationRequest({tier:e,options:t},setTierOperationSpec)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},getAccountInfoOperationSpec)}query(e){return this.client.sendOperationRequest({options:e},queryOperationSpec)}getTags(e){return this.client.sendOperationRequest({options:e},getTagsOperationSpec)}setTags(e){return this.client.sendOperationRequest({options:e},setTagsOperationSpec)}}const xmlSerializer$3=createSerializer(Mappers,!0),downloadOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:BlobDownloadHeaders},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:BlobDownloadHeaders},default:{bodyMapper:StorageError,headersMapper:BlobDownloadExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,versionId],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,range,rangeGetContentMD5,rangeGetContentCRC64,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},getPropertiesOperationSpec={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:BlobGetPropertiesHeaders},default:{bodyMapper:StorageError,headersMapper:BlobGetPropertiesExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,versionId],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},deleteOperationSpec={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:BlobDeleteHeaders},default:{bodyMapper:StorageError,headersMapper:BlobDeleteExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,versionId,blobDeleteType],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,deleteSnapshots],isXML:!0,serializer:xmlSerializer$3},undeleteOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobUndeleteHeaders},default:{bodyMapper:StorageError,headersMapper:BlobUndeleteExceptionHeaders}},queryParameters:[timeoutInSeconds,comp8],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$3},setExpiryOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetExpiryHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetExpiryExceptionHeaders}},queryParameters:[timeoutInSeconds,comp11],urlParameters:[url],headerParameters:[version,requestId,accept1,expiryOptions,expiresOn],isXML:!0,serializer:xmlSerializer$3},setHttpHeadersOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetHttpHeadersHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetHttpHeadersExceptionHeaders}},queryParameters:[comp,timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition],isXML:!0,serializer:xmlSerializer$3},setImmutabilityPolicyOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetImmutabilityPolicyHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetImmutabilityPolicyExceptionHeaders}},queryParameters:[timeoutInSeconds,comp12],urlParameters:[url],headerParameters:[version,requestId,accept1,ifUnmodifiedSince,immutabilityPolicyExpiry,immutabilityPolicyMode],isXML:!0,serializer:xmlSerializer$3},deleteImmutabilityPolicyOperationSpec={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:BlobDeleteImmutabilityPolicyHeaders},default:{bodyMapper:StorageError,headersMapper:BlobDeleteImmutabilityPolicyExceptionHeaders}},queryParameters:[timeoutInSeconds,comp12],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$3},setLegalHoldOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetLegalHoldHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetLegalHoldExceptionHeaders}},queryParameters:[timeoutInSeconds,comp13],urlParameters:[url],headerParameters:[version,requestId,accept1,legalHold],isXML:!0,serializer:xmlSerializer$3},setMetadataOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetMetadataHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetMetadataExceptionHeaders}},queryParameters:[timeoutInSeconds,comp6],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope],isXML:!0,serializer:xmlSerializer$3},acquireLeaseOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlobAcquireLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:BlobAcquireLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action,duration,proposedLeaseId,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},releaseLeaseOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobReleaseLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:BlobReleaseLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action1,leaseId1,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},renewLeaseOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobRenewLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:BlobRenewLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,leaseId1,action2,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},changeLeaseOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobChangeLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:BlobChangeLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,leaseId1,action4,proposedLeaseId1,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},breakLeaseOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:BlobBreakLeaseHeaders},default:{bodyMapper:StorageError,headersMapper:BlobBreakLeaseExceptionHeaders}},queryParameters:[timeoutInSeconds,comp10],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,action3,breakPeriod,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$3},createSnapshotOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlobCreateSnapshotHeaders},default:{bodyMapper:StorageError,headersMapper:BlobCreateSnapshotExceptionHeaders}},queryParameters:[timeoutInSeconds,comp14],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope],isXML:!0,serializer:xmlSerializer$3},startCopyFromURLOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:BlobStartCopyFromURLHeaders},default:{bodyMapper:StorageError,headersMapper:BlobStartCopyFromURLExceptionHeaders}},queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,immutabilityPolicyExpiry,immutabilityPolicyMode,tier,rehydratePriority,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,sourceIfTags,copySource,blobTagsString,sealBlob,legalHold1],isXML:!0,serializer:xmlSerializer$3},copyFromURLOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:BlobCopyFromURLHeaders},default:{bodyMapper:StorageError,headersMapper:BlobCopyFromURLExceptionHeaders}},queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,immutabilityPolicyExpiry,immutabilityPolicyMode,encryptionScope,tier,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,copySource,blobTagsString,legalHold1,xMsRequiresSync,sourceContentMD5,copySourceAuthorization,copySourceTags],isXML:!0,serializer:xmlSerializer$3},abortCopyFromURLOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:BlobAbortCopyFromURLHeaders},default:{bodyMapper:StorageError,headersMapper:BlobAbortCopyFromURLExceptionHeaders}},queryParameters:[timeoutInSeconds,comp15,copyId],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,copyActionAbortConstant],isXML:!0,serializer:xmlSerializer$3},setTierOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:BlobSetTierHeaders},202:{headersMapper:BlobSetTierHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetTierExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,versionId,comp16],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifTags,rehydratePriority,tier1],isXML:!0,serializer:xmlSerializer$3},getAccountInfoOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:BlobGetAccountInfoHeaders},default:{bodyMapper:StorageError,headersMapper:BlobGetAccountInfoExceptionHeaders}},queryParameters:[comp,timeoutInSeconds,restype1],urlParameters:[url],headerParameters:[version,requestId,accept1],isXML:!0,serializer:xmlSerializer$3},queryOperationSpec={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:BlobQueryHeaders},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:BlobQueryHeaders},default:{bodyMapper:StorageError,headersMapper:BlobQueryExceptionHeaders}},requestBody:queryRequest,queryParameters:[timeoutInSeconds,snapshot,comp17],urlParameters:[url],headerParameters:[contentType,accept,version,requestId,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$3},getTagsOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:BlobTags,headersMapper:BlobGetTagsHeaders},default:{bodyMapper:StorageError,headersMapper:BlobGetTagsExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,versionId,comp18],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifTags],isXML:!0,serializer:xmlSerializer$3},setTagsOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:BlobSetTagsHeaders},default:{bodyMapper:StorageError,headersMapper:BlobSetTagsExceptionHeaders}},requestBody:tags,queryParameters:[timeoutInSeconds,versionId,comp18],urlParameters:[url],headerParameters:[contentType,accept,version,requestId,leaseId,ifTags,transactionalContentMD5,transactionalContentCrc64],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer$3};class PageBlobImpl{constructor(e){this.client=e}create(e,t,r){return this.client.sendOperationRequest({contentLength:e,blobContentLength:t,options:r},createOperationSpec$1)}uploadPages(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},uploadPagesOperationSpec)}clearPages(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},clearPagesOperationSpec)}uploadPagesFromURL(e,t,r,i,n){return this.client.sendOperationRequest({sourceUrl:e,sourceRange:t,contentLength:r,range:i,options:n},uploadPagesFromURLOperationSpec)}getPageRanges(e){return this.client.sendOperationRequest({options:e},getPageRangesOperationSpec)}getPageRangesDiff(e){return this.client.sendOperationRequest({options:e},getPageRangesDiffOperationSpec)}resize(e,t){return this.client.sendOperationRequest({blobContentLength:e,options:t},resizeOperationSpec)}updateSequenceNumber(e,t){return this.client.sendOperationRequest({sequenceNumberAction:e,options:t},updateSequenceNumberOperationSpec)}copyIncremental(e,t){return this.client.sendOperationRequest({copySource:e,options:t},copyIncrementalOperationSpec)}}const xmlSerializer$2=createSerializer(Mappers,!0),createOperationSpec$1={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:PageBlobCreateHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobCreateExceptionHeaders}},queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition,immutabilityPolicyExpiry,immutabilityPolicyMode,encryptionScope,tier,blobTagsString,legalHold1,blobType,blobContentLength,blobSequenceNumber],isXML:!0,serializer:xmlSerializer$2},uploadPagesOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:PageBlobUploadPagesHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobUploadPagesExceptionHeaders}},requestBody:body1,queryParameters:[timeoutInSeconds,comp19],urlParameters:[url],headerParameters:[version,requestId,contentLength,leaseId,ifModifiedSince,ifUnmodifiedSince,range,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,transactionalContentMD5,transactionalContentCrc64,contentType1,accept2,pageWrite,ifSequenceNumberLessThanOrEqualTo,ifSequenceNumberLessThan,ifSequenceNumberEqualTo],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:xmlSerializer$2},clearPagesOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:PageBlobClearPagesHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobClearPagesExceptionHeaders}},queryParameters:[timeoutInSeconds,comp19],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,leaseId,ifModifiedSince,ifUnmodifiedSince,range,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,ifSequenceNumberLessThanOrEqualTo,ifSequenceNumberLessThan,ifSequenceNumberEqualTo,pageWrite1],isXML:!0,serializer:xmlSerializer$2},uploadPagesFromURLOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:PageBlobUploadPagesFromURLHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobUploadPagesFromURLExceptionHeaders}},queryParameters:[timeoutInSeconds,comp19],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,sourceContentMD5,copySourceAuthorization,pageWrite,ifSequenceNumberLessThanOrEqualTo,ifSequenceNumberLessThan,ifSequenceNumberEqualTo,sourceUrl,sourceRange,sourceContentCrc64,range1],isXML:!0,serializer:xmlSerializer$2},getPageRangesOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:PageList,headersMapper:PageBlobGetPageRangesHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobGetPageRangesExceptionHeaders}},queryParameters:[timeoutInSeconds,marker,maxPageSize,snapshot,comp20],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,range,ifMatch,ifNoneMatch,ifTags],isXML:!0,serializer:xmlSerializer$2},getPageRangesDiffOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:PageList,headersMapper:PageBlobGetPageRangesDiffHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobGetPageRangesDiffExceptionHeaders}},queryParameters:[timeoutInSeconds,marker,maxPageSize,snapshot,comp20,prevsnapshot],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,range,ifMatch,ifNoneMatch,ifTags,prevSnapshotUrl],isXML:!0,serializer:xmlSerializer$2},resizeOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:PageBlobResizeHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobResizeExceptionHeaders}},queryParameters:[comp,timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,blobContentLength],isXML:!0,serializer:xmlSerializer$2},updateSequenceNumberOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:PageBlobUpdateSequenceNumberHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobUpdateSequenceNumberExceptionHeaders}},queryParameters:[comp,timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,blobSequenceNumber,sequenceNumberAction],isXML:!0,serializer:xmlSerializer$2},copyIncrementalOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:PageBlobCopyIncrementalHeaders},default:{bodyMapper:StorageError,headersMapper:PageBlobCopyIncrementalExceptionHeaders}},queryParameters:[timeoutInSeconds,comp21],urlParameters:[url],headerParameters:[version,requestId,accept1,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,ifTags,copySource],isXML:!0,serializer:xmlSerializer$2};class AppendBlobImpl{constructor(e){this.client=e}create(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},createOperationSpec)}appendBlock(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},appendBlockOperationSpec)}appendBlockFromUrl(e,t,r){return this.client.sendOperationRequest({sourceUrl:e,contentLength:t,options:r},appendBlockFromUrlOperationSpec)}seal(e){return this.client.sendOperationRequest({options:e},sealOperationSpec)}}const xmlSerializer$1=createSerializer(Mappers,!0),createOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:AppendBlobCreateHeaders},default:{bodyMapper:StorageError,headersMapper:AppendBlobCreateExceptionHeaders}},queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition,immutabilityPolicyExpiry,immutabilityPolicyMode,encryptionScope,blobTagsString,legalHold1,blobType1],isXML:!0,serializer:xmlSerializer$1},appendBlockOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:AppendBlobAppendBlockHeaders},default:{bodyMapper:StorageError,headersMapper:AppendBlobAppendBlockExceptionHeaders}},requestBody:body1,queryParameters:[timeoutInSeconds,comp22],urlParameters:[url],headerParameters:[version,requestId,contentLength,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,transactionalContentMD5,transactionalContentCrc64,contentType1,accept2,maxSize,appendPosition],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:xmlSerializer$1},appendBlockFromUrlOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:AppendBlobAppendBlockFromUrlHeaders},default:{bodyMapper:StorageError,headersMapper:AppendBlobAppendBlockFromUrlExceptionHeaders}},queryParameters:[timeoutInSeconds,comp22],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,encryptionScope,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,sourceContentMD5,copySourceAuthorization,transactionalContentMD5,sourceUrl,sourceContentCrc64,maxSize,appendPosition,sourceRange1],isXML:!0,serializer:xmlSerializer$1},sealOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:AppendBlobSealHeaders},default:{bodyMapper:StorageError,headersMapper:AppendBlobSealExceptionHeaders}},queryParameters:[timeoutInSeconds,comp23],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifModifiedSince,ifUnmodifiedSince,ifMatch,ifNoneMatch,appendPosition],isXML:!0,serializer:xmlSerializer$1};class BlockBlobImpl{constructor(e){this.client=e}upload(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},uploadOperationSpec)}putBlobFromUrl(e,t,r){return this.client.sendOperationRequest({contentLength:e,copySource:t,options:r},putBlobFromUrlOperationSpec)}stageBlock(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,body:r,options:i},stageBlockOperationSpec)}stageBlockFromURL(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,sourceUrl:r,options:i},stageBlockFromURLOperationSpec)}commitBlockList(e,t){return this.client.sendOperationRequest({blocks:e,options:t},commitBlockListOperationSpec)}getBlockList(e,t){return this.client.sendOperationRequest({listType:e,options:t},getBlockListOperationSpec)}}const xmlSerializer=createSerializer(Mappers,!0),uploadOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlockBlobUploadHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobUploadExceptionHeaders}},requestBody:body1,queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,contentLength,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition,immutabilityPolicyExpiry,immutabilityPolicyMode,encryptionScope,tier,blobTagsString,legalHold1,transactionalContentMD5,transactionalContentCrc64,contentType1,accept2,blobType2],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:xmlSerializer},putBlobFromUrlOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlockBlobPutBlobFromUrlHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobPutBlobFromUrlExceptionHeaders}},queryParameters:[timeoutInSeconds],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition,encryptionScope,tier,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,sourceIfTags,copySource,blobTagsString,sourceContentMD5,copySourceAuthorization,copySourceTags,transactionalContentMD5,blobType2,copySourceBlobProperties],isXML:!0,serializer:xmlSerializer},stageBlockOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlockBlobStageBlockHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobStageBlockExceptionHeaders}},requestBody:body1,queryParameters:[timeoutInSeconds,comp24,blockId],urlParameters:[url],headerParameters:[version,requestId,contentLength,leaseId,encryptionKey,encryptionKeySha256,encryptionAlgorithm,encryptionScope,transactionalContentMD5,transactionalContentCrc64,contentType1,accept2],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:xmlSerializer},stageBlockFromURLOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlockBlobStageBlockFromURLHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobStageBlockFromURLExceptionHeaders}},queryParameters:[timeoutInSeconds,comp24,blockId],urlParameters:[url],headerParameters:[version,requestId,accept1,contentLength,leaseId,encryptionKey,encryptionKeySha256,encryptionAlgorithm,encryptionScope,sourceIfModifiedSince,sourceIfUnmodifiedSince,sourceIfMatch,sourceIfNoneMatch,sourceContentMD5,copySourceAuthorization,sourceUrl,sourceContentCrc64,sourceRange1],isXML:!0,serializer:xmlSerializer},commitBlockListOperationSpec={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:BlockBlobCommitBlockListHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobCommitBlockListExceptionHeaders}},requestBody:blocks,queryParameters:[timeoutInSeconds,comp25],urlParameters:[url],headerParameters:[contentType,accept,version,requestId,metadata,leaseId,ifModifiedSince,ifUnmodifiedSince,encryptionKey,encryptionKeySha256,encryptionAlgorithm,ifMatch,ifNoneMatch,ifTags,blobCacheControl,blobContentType,blobContentMD5,blobContentEncoding,blobContentLanguage,blobContentDisposition,immutabilityPolicyExpiry,immutabilityPolicyMode,encryptionScope,tier,blobTagsString,legalHold1,transactionalContentMD5,transactionalContentCrc64],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:xmlSerializer},getBlockListOperationSpec={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:BlockList,headersMapper:BlockBlobGetBlockListHeaders},default:{bodyMapper:StorageError,headersMapper:BlockBlobGetBlockListExceptionHeaders}},queryParameters:[timeoutInSeconds,snapshot,comp25,listType],urlParameters:[url],headerParameters:[version,requestId,accept1,leaseId,ifTags],isXML:!0,serializer:xmlSerializer};let StorageClient$1=class extends ExtendedServiceClient{constructor(e,t){var r,i;if(void 0===e)throw Error("'url' cannot be null");t||(t={});const n="azsdk-js-azure-storage-blob/12.24.0",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${n}`:""+n;super(Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8"}),t),{userAgentOptions:{userAgentPrefix:a},endpoint:null!==(i=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==i?i:"{url}"})),this.url=e,this.version=t.version||"2024-08-04",this.service=new ServiceImpl(this),this.container=new ContainerImpl(this),this.blob=new BlobImpl(this),this.pageBlob=new PageBlobImpl(this),this.appendBlob=new AppendBlobImpl(this),this.blockBlob=new BlockBlobImpl(this)}};class StorageContextClient extends StorageClient$1{async sendOperationRequest(e,t){const r=Object.assign({},t);return"/{containerName}"!==r.path&&"/{containerName}/{blob}"!==r.path||(r.path=""),super.sendOperationRequest(e,r)}}class StorageClient{constructor(e,t){this.url=escapeURLPath(e),this.accountName=getAccountNameFromUrl(e),this.pipeline=t,this.storageClientContext=new StorageContextClient(this.url,getCoreClientOptions(t)),this.isHttps=iEqual(getURLScheme(this.url)||"","https"),this.credential=getCredentialFromPipeline(t),this.storageClientContext.requestContentType=void 0}}const tracingClient=createTracingClient({packageName:"@azure/storage-blob",packageVersion:SDK_VERSION,namespace:"Microsoft.Storage"});class BlobSASPermissions{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){const t=new BlobSASPermissions;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError("Invalid permission: "+r)}return t}static from(e){const t=new BlobSASPermissions;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class ContainerSASPermissions{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){const t=new ContainerSASPermissions;for(const r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw new RangeError("Invalid permission "+r)}return t}static from(e){const t=new ContainerSASPermissions;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}}class UserDelegationKeyCredential{constructor(e,t){this.accountName=e,this.userDelegationKey=t,this.key=Buffer.from(t.value,"base64")}computeHMACSHA256(e){return createHmac("sha256",this.key).update(e,"utf8").digest("base64")}}var SASProtocol,SASProtocol2;SASProtocol2=SASProtocol||(SASProtocol={}),SASProtocol2.Https="https",SASProtocol2.HttpsAndHttp="https,http";class SASQueryParameters{get ipRange(){if(this.ipRangeInner)return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}constructor(e,t,r,i,n,a,o,s,l,c,m,d,p,u,h,g,y,f,b,x){this.version=e,this.signature=t,void 0!==r&&"string"!=typeof r?(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,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)):(this.services=i,this.resourceTypes=n,this.expiresOn=s,this.permissions=r,this.protocol=a,this.startsOn=o,this.ipRangeInner=l,this.encryptionScope=x,this.identifier=c,this.resource=m,this.cacheControl=d,this.contentDisposition=p,this.contentEncoding=u,this.contentLanguage=h,this.contentType=g,y&&(this.signedOid=y.signedObjectId,this.signedTenantId=y.signedTenantId,this.signedStartsOn=y.signedStartsOn,this.signedExpiresOn=y.signedExpiresOn,this.signedService=y.signedService,this.signedVersion=y.signedVersion,this.preauthorizedAgentObjectId=f,this.correlationId=b))}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"],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,!1):void 0);break;case"se":this.tryAppendQueryParameter(t,r,this.expiresOn?truncatedISO8061Date(this.expiresOn,!1):void 0);break;case"sip":this.tryAppendQueryParameter(t,r,this.ipRange?ipRangeToString(this.ipRange):void 0);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,!1):void 0);break;case"ske":this.tryAppendQueryParameter(t,r,this.signedExpiresOn?truncatedISO8061Date(this.signedExpiresOn,!1):void 0);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)}return t.join("&")}tryAppendQueryParameter(e,t,r){r&&(t=encodeURIComponent(t),r=encodeURIComponent(r),t.length>0&&r.length>0&&e.push(`${t}=${r}`))}}class BlobLeaseClient{get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,t){const r=e.storageClientContext;this._url=e.url,void 0===e.name?(this._isContainer=!0,this._containerOrBlobOperation=r.container):(this._isContainer=!1,this._containerOrBlobOperation=r.blob),t||(t=randomUUID()),this._leaseId=t}async acquireLease(e,t={}){var r,i,n,a,o;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==ETagNone||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(a=t.conditions)||void 0===a?void 0:a.ifNoneMatch)!==ETagNone||(null===(o=t.conditions)||void 0===o?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.");return tracingClient.withSpan("BlobLeaseClient-acquireLease",t,(async r=>{var i;return assertResponse(await this._containerOrBlobOperation.acquireLease({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),proposedLeaseId:this._leaseId,tracingOptions:r.tracingOptions}))}))}async changeLease(e,t={}){var r,i,n,a,o;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==ETagNone||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(a=t.conditions)||void 0===a?void 0:a.ifNoneMatch)!==ETagNone||(null===(o=t.conditions)||void 0===o?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.");return tracingClient.withSpan("BlobLeaseClient-changeLease",t,(async r=>{var i;const n=assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return this._leaseId=e,n}))}async releaseLease(e={}){var t,r,i,n,a;if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==ETagNone||(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)!==ETagNone||(null===(a=e.conditions)||void 0===a?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.");return tracingClient.withSpan("BlobLeaseClient-releaseLease",e,(async t=>{var r;return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async renewLease(e={}){var t,r,i,n,a;if(this._isContainer&&((null===(t=e.conditions)||void 0===t?void 0:t.ifMatch)&&(null===(r=e.conditions)||void 0===r?void 0:r.ifMatch)!==ETagNone||(null===(i=e.conditions)||void 0===i?void 0:i.ifNoneMatch)&&(null===(n=e.conditions)||void 0===n?void 0:n.ifNoneMatch)!==ETagNone||(null===(a=e.conditions)||void 0===a?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.");return tracingClient.withSpan("BlobLeaseClient-renewLease",e,(async t=>{var r;return this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions})}))}async breakLease(e,t={}){var r,i,n,a,o;if(this._isContainer&&((null===(r=t.conditions)||void 0===r?void 0:r.ifMatch)&&(null===(i=t.conditions)||void 0===i?void 0:i.ifMatch)!==ETagNone||(null===(n=t.conditions)||void 0===n?void 0:n.ifNoneMatch)&&(null===(a=t.conditions)||void 0===a?void 0:a.ifNoneMatch)!==ETagNone||(null===(o=t.conditions)||void 0===o?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.");return tracingClient.withSpan("BlobLeaseClient-breakLease",t,(async r=>{var i;const n={abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions};return assertResponse(await this._containerOrBlobOperation.breakLease(n))}))}}class RetriableReadableStream extends Readable$1{constructor(e,t,r,i,n={}){super({highWaterMark:n.highWaterMark}),this.retries=0,this.sourceDataHandler=e=>{if(this.options.doInjectErrorOnce)return this.options.doInjectErrorOnce=void 0,this.source.pause(),this.sourceErrorOrEndHandler(),void this.source.destroy();this.offset+=e.length,this.onProgress&&this.onProgress({loadedBytes:this.offset-this.start}),this.push(e)||this.source.pause()},this.sourceAbortedHandler=()=>{const e=new AbortError("The operation was aborted.");this.destroy(e)},this.sourceErrorOrEndHandler=e=>{e&&"AbortError"===e.name?this.destroy(e):(this.removeSourceEventHandlers(),this.offset-1===this.end?this.push(null):this.offset>this.end?this.destroy(Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`)):this.maxRetryRequests>this.retries?(this.retries+=1,this.getter(this.offset).then((e=>{this.source=e,this.setSourceEventHandlers()})).catch((e=>{this.destroy(e)}))):this.destroy(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}`)))},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),this.source.on("aborted",this.sourceAbortedHandler)}removeSourceEventHandlers(){this.source.removeListener("data",this.sourceDataHandler),this.source.removeListener("end",this.sourceErrorOrEndHandler),this.source.removeListener("error",this.sourceErrorOrEndHandler),this.source.removeListener("aborted",this.sourceAbortedHandler)}_destroy(e,t){this.removeSourceEventHandlers(),this.source.destroy(),t(null===e?void 0:e)}}class BlobDownloadResponse{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 isNode?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}constructor(e,t,r,i,n={}){this.originalResponse=e,this.blobDownloadStream=new RetriableReadableStream(this.originalResponse.readableStreamBody,t,r,i,n)}}const AVRO_SYNC_MARKER_SIZE=16,AVRO_INIT_BYTES=new Uint8Array([79,98,106,1]),AVRO_CODEC_KEY="avro.codec",AVRO_SCHEMA_KEY="avro.schema";class AvroParser{static async readFixedBytes(e,t,r={}){const i=await e.read(t,{abortSignal:r.abortSignal});if(i.length!==t)throw Error("Hit stream end.");return i}static async readByte(e,t={}){return(await AvroParser.readFixedBytes(e,1,t))[0]}static async readZigZagLong(e,t={}){let r,i,n,a=0,o=0;do{r=await AvroParser.readByte(e,t),i=128&r,a|=(127&r)<<o,o+=7}while(i&&28>o);if(i){n=268435456;do{r=await AvroParser.readByte(e,t),a+=(127&r)*n,n*=128}while(128&r);const i=(a%2?-(a+1):a)/2;if(Number.MIN_SAFE_INTEGER>i||i>Number.MAX_SAFE_INTEGER)throw Error("Integer overflow.");return i}return a>>1^-(1&a)}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(1===r)return!0;if(0===r)return!1;throw Error("Byte was not a boolean.")}static async readFloat(e,t={}){const r=await AvroParser.readFixedBytes(e,4,t);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,!0)}static async readDouble(e,t={}){const r=await AvroParser.readFixedBytes(e,8,t);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,!0)}static async readBytes(e,t={}){const r=await AvroParser.readLong(e,t);if(0>r)throw Error("Bytes size was negative.");return e.read(r,{abortSignal:t.abortSignal})}static async readString(e,t={}){const r=await AvroParser.readBytes(e,t);return(new TextDecoder).decode(r)}static async readMapPair(e,t,r={}){return{key:await AvroParser.readString(e,r),value:await t(e,r)}}static async readMap(e,t,r={}){const i=await AvroParser.readArray(e,((e,r={})=>AvroParser.readMapPair(e,t,r)),r),n={};for(const a of i)n[a.key]=a.value;return n}static async readArray(e,t,r={}){const i=[];for(let n=await AvroParser.readLong(e,r);0!==n;n=await AvroParser.readLong(e,r))for(0>n&&(await AvroParser.readLong(e,r),n=-n);n--;){const n=await t(e,r);i.push(n)}return i}}var AvroComplex,AvroComplex2,AvroPrimitive,AvroPrimitive2;AvroComplex2=AvroComplex||(AvroComplex={}),AvroComplex2.RECORD="record",AvroComplex2.ENUM="enum",AvroComplex2.ARRAY="array",AvroComplex2.MAP="map",AvroComplex2.UNION="union",AvroComplex2.FIXED="fixed",AvroPrimitive2=AvroPrimitive||(AvroPrimitive={}),AvroPrimitive2.NULL="null",AvroPrimitive2.BOOLEAN="boolean",AvroPrimitive2.INT="int",AvroPrimitive2.LONG="long",AvroPrimitive2.FLOAT="float",AvroPrimitive2.DOUBLE="double",AvroPrimitive2.BYTES="bytes",AvroPrimitive2.STRING="string";class AvroType{static fromSchema(e){return"string"==typeof e?AvroType.fromStringSchema(e):Array.isArray(e)?AvroType.fromArraySchema(e):AvroType.fromObjectSchema(e)}static fromStringSchema(e){switch(e){case AvroPrimitive.NULL:case AvroPrimitive.BOOLEAN:case AvroPrimitive.INT:case AvroPrimitive.LONG:case AvroPrimitive.FLOAT:case AvroPrimitive.DOUBLE:case AvroPrimitive.BYTES:case AvroPrimitive.STRING:return new AvroPrimitiveType(e);default:throw 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(r){}switch(t){case AvroComplex.RECORD:if(e.aliases)throw Error("aliases currently is not supported, schema: "+e);if(!e.name)throw Error("Required attribute 'name' doesn't exist on schema: "+e);const r={};if(!e.fields)throw 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 AvroComplex.ENUM:if(e.aliases)throw Error("aliases currently is not supported, schema: "+e);if(!e.symbols)throw Error("Required attribute 'symbols' doesn't exist on schema: "+e);return new AvroEnumType(e.symbols);case AvroComplex.MAP:if(!e.values)throw Error("Required attribute 'values' doesn't exist on schema: "+e);return new AvroMapType(AvroType.fromSchema(e.values));default:throw Error(`Unexpected Avro type ${t} in ${e}`)}}}class AvroPrimitiveType extends AvroType{constructor(e){super(),this._primitive=e}read(e,t={}){switch(this._primitive){case AvroPrimitive.NULL:return AvroParser.readNull();case AvroPrimitive.BOOLEAN:return AvroParser.readBoolean(e,t);case AvroPrimitive.INT:return AvroParser.readInt(e,t);case AvroPrimitive.LONG:return AvroParser.readLong(e,t);case AvroPrimitive.FLOAT:return AvroParser.readFloat(e,t);case AvroPrimitive.DOUBLE:return AvroParser.readDouble(e,t);case AvroPrimitive.BYTES:return AvroParser.readBytes(e,t);case AvroPrimitive.STRING:return AvroParser.readString(e,t);default:throw 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={}){return AvroParser.readMap(e,((e,t)=>this._itemType.read(e,t)),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)({}).hasOwnProperty.call(this._fields,i)&&(r[i]=await this._fields[i].read(e,t));return r}}class AvroReader{get blockOffset(){return this._blockOffset}get objectIndex(){return this._objectIndex}constructor(e,t,r,i){this._dataStream=e,this._headerStream=t||e,this._initialized=!1,this._blockOffset=r||0,this._objectIndex=i||0,this._initialBlockOffset=r||0}async initialize(e={}){if(!arraysEqual(await AvroParser.readFixedBytes(this._headerStream,AVRO_INIT_BYTES.length,{abortSignal:e.abortSignal}),AVRO_INIT_BYTES))throw Error("Stream is not an Avro file.");this._metadata=await AvroParser.readMap(this._headerStream,AvroParser.readString,{abortSignal:e.abortSignal});const t=this._metadata[AVRO_CODEC_KEY];if(null!=t&&"null"!==t)throw Error("Codecs are not supported");this._syncMarker=await AvroParser.readFixedBytes(this._headerStream,AVRO_SYNC_MARKER_SIZE,{abortSignal:e.abortSignal});const r=JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);if(this._itemType=AvroType.fromSchema(r),0===this._blockOffset&&(this._blockOffset=this._initialBlockOffset+this._dataStream.position),this._itemsRemainingInBlock=await AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}),await AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}),this._initialized=!0,this._objectIndex&&this._objectIndex>0)for(let i=0;this._objectIndex>i;i++)await this._itemType.read(this._dataStream,{abortSignal:e.abortSignal}),this._itemsRemainingInBlock--}hasNext(){return!this._initialized||this._itemsRemainingInBlock>0}parseObjects(){return __asyncGenerator(this,arguments,(function*(e={}){for(this._initialized||(yield __await(this.initialize(e)));this.hasNext();){const r=yield __await(this._itemType.read(this._dataStream,{abortSignal:e.abortSignal}));if(this._itemsRemainingInBlock--,this._objectIndex++,0===this._itemsRemainingInBlock){const r=yield __await(AvroParser.readFixedBytes(this._dataStream,AVRO_SYNC_MARKER_SIZE,{abortSignal:e.abortSignal}));if(this._blockOffset=this._initialBlockOffset+this._dataStream.position,this._objectIndex=0,!arraysEqual(this._syncMarker,r))throw Error("Stream is not a valid Avro file.");try{this._itemsRemainingInBlock=yield __await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal}))}catch(t){this._itemsRemainingInBlock=0}this._itemsRemainingInBlock>0&&(yield __await(AvroParser.readLong(this._dataStream,{abortSignal:e.abortSignal})))}yield yield __await(r)}}))}}class AvroReadable{}const ABORT_ERROR=new AbortError("Reading from the avro stream was aborted.");class AvroReadableFromStream extends AvroReadable{toUint8Array(e){return"string"==typeof e?Buffer.from(e):e}constructor(e){super(),this._readable=e,this._position=0}get position(){return this._position}async read(e,t={}){var r;if(null===(r=t.abortSignal)||void 0===r?void 0:r.aborted)throw ABORT_ERROR;if(0>e)throw Error("size parameter should be positive: "+e);if(0===e)return new Uint8Array;if(!this._readable.readable)throw Error("Stream no longer readable.");const i=this._readable.read(e);return i?(this._position+=i.length,this.toUint8Array(i)):new Promise(((r,i)=>{const n=()=>{this._readable.removeListener("readable",a),this._readable.removeListener("error",o),this._readable.removeListener("end",o),this._readable.removeListener("close",o),t.abortSignal&&t.abortSignal.removeEventListener("abort",s)},a=()=>{const t=this._readable.read(e);t&&(this._position+=t.length,n(),r(this.toUint8Array(t)))},o=()=>{n(),i()},s=()=>{n(),i(ABORT_ERROR)};this._readable.on("readable",a),this._readable.once("error",o),this._readable.once("end",o),this._readable.once("close",o),t.abortSignal&&t.abortSignal.addEventListener("abort",s)}))}}class BlobQuickQueryStream extends Readable$1{constructor(e,t={}){super(),this.avroPaused=!0,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(){this.avroPaused&&this.readInternal().catch((e=>{this.emit("error",e)}))}async readInternal(){let e;this.avroPaused=!1;do{if(e=await this.avroIter.next(),e.done)break;const t=e.value,r=t.$schema;if("string"!=typeof r)throw Error("Missing schema in avro record.");switch(r){case"com.microsoft.azure.storage.queryBlobContents.resultData":{const e=t.data;if(e instanceof Uint8Array==0)throw Error("Invalid data in avro result record.");this.push(Buffer.from(e))||(this.avroPaused=!0)}break;case"com.microsoft.azure.storage.queryBlobContents.progress":{const e=t.bytesScanned;if("number"!=typeof e)throw Error("Invalid bytesScanned in avro progress record.");this.onProgress&&this.onProgress({loadedBytes:e})}break;case"com.microsoft.azure.storage.queryBlobContents.end":if(this.onProgress){const e=t.totalBytes;if("number"!=typeof e)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("boolean"!=typeof e)throw Error("Invalid fatal in avro error record.");const r=t.name;if("string"!=typeof r)throw Error("Invalid name in avro error record.");const i=t.description;if("string"!=typeof i)throw Error("Invalid description in avro error record.");const n=t.position;if("number"!=typeof n)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{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(){}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(){}get readableStreamBody(){return isNode?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}constructor(e,t={}){this.originalResponse=e,this.blobDownloadStream=new BlobQuickQueryStream(this.originalResponse.readableStreamBody,t)}}var BlockBlobTier,BlockBlobTier2,PremiumPageBlobTier,PremiumPageBlobTier2,StorageBlobAudience,StorageBlobAudience2;BlockBlobTier2=BlockBlobTier||(BlockBlobTier={}),BlockBlobTier2.Hot="Hot",BlockBlobTier2.Cool="Cool",BlockBlobTier2.Cold="Cold",BlockBlobTier2.Archive="Archive",PremiumPageBlobTier2=PremiumPageBlobTier||(PremiumPageBlobTier={}),PremiumPageBlobTier2.P4="P4",PremiumPageBlobTier2.P6="P6",PremiumPageBlobTier2.P10="P10",PremiumPageBlobTier2.P15="P15",PremiumPageBlobTier2.P20="P20",PremiumPageBlobTier2.P30="P30",PremiumPageBlobTier2.P40="P40",PremiumPageBlobTier2.P50="P50",PremiumPageBlobTier2.P60="P60",PremiumPageBlobTier2.P70="P70",PremiumPageBlobTier2.P80="P80",StorageBlobAudience2=StorageBlobAudience||(StorageBlobAudience={}),StorageBlobAudience2.StorageOAuthScopes="https://storage.azure.com/.default",StorageBlobAudience2.DiskComputeOAuthScopes="https://disk.compute.azure.com/.default";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=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.promise.catch((()=>{}))}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){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 t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){const e=new PollerCancelledError("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new PollerStoppedError("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(this.cancelPromise){if(e.abortSignal)throw Error("A cancel request is currently pending")}else this.cancelPromise=this.cancelOnce(e);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return""+this.operation}}class BlobBeginCopyFromUrlPoller extends Poller{constructor(e){const{blobClient:t,copySource:r,intervalInMs:i=15e3,onProgress:n,resumeFrom:a,startCopyFromURLOptions:o}=e;let s;a&&(s=JSON.parse(a).state),super(makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({},s),{blobClient:t,copySource:r,startCopyFromURLOptions:o}))),"function"==typeof n&&this.onProgress(n),this.intervalInMs=i}delay(){return delay$2(this.intervalInMs)}}const cancel=async function(e={}){const t=this.state,{copyId:r}=t;return t.isCompleted?makeBlobBeginCopyFromURLPollOperation(t):r?(await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal}),t.isCancelled=!0,makeBlobBeginCopyFromURLPollOperation(t)):(t.isCancelled=!0,makeBlobBeginCopyFromURLPollOperation(t))},update=async function(e={}){const t=this.state,{blobClient:r,copySource:i,startCopyFromURLOptions:n}=t;if(t.isStarted){if(!t.isCompleted)try{const r=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:i,copyProgress:n}=r,a=t.copyProgress;n&&(t.copyProgress=n),"pending"===i&&n!==a&&"function"==typeof e.fireProgress?e.fireProgress(t):"success"===i?(t.result=r,t.isCompleted=!0):"failed"===i&&(t.error=Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`),t.isCompleted=!0)}catch(a){t.error=a,t.isCompleted=!0}}else{t.isStarted=!0;const e=await r.startCopyFromURL(i,n);t.copyId=e.copyId,"success"===e.copyStatus&&(t.result=e,t.isCompleted=!0)}return makeBlobBeginCopyFromURLPollOperation(t)},toString=function(){return JSON.stringify({state:this.state},((e,t)=>{if("blobClient"!==e)return t}))};var BatchStates,BatchStates2;BatchStates2=BatchStates||(BatchStates={}),BatchStates2[BatchStates2.Good=0]="Good",BatchStates2[BatchStates2.Error=1]="Error";class Batch{constructor(e=5){if(this.actives=0,this.completed=0,this.offset=0,this.operations=[],this.state=BatchStates.Good,1>e)throw new RangeError("concurrency must be larger than 0");this.concurrency=e,this.emitter=new EventEmitter}addOperation(e){this.operations.push((async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(t){this.emitter.emit("error",t)}}))}async do(){return 0===this.operations.length?Promise.resolve():(this.parallelExecute(),new Promise(((e,t)=>{this.emitter.on("finish",e),this.emitter.on("error",(e=>{this.state=BatchStates.Error,t(e)}))})))}nextOperation(){return this.operations.length>this.offset?this.operations[this.offset++]:null}parallelExecute(){if(this.state!==BatchStates.Error)if(this.operations.length>this.completed)for(;this.concurrency>this.actives;){const e=this.nextOperation();if(!e)return;e()}else this.emitter.emit("finish")}}class BuffersStream extends Readable$1{constructor(e,t,r){super(r),this.buffers=e,this.byteLength=t,this.byteOffsetInCurrentBuffer=0,this.bufferIndex=0,this.pushedBytesLength=0;let i=0;for(const n of this.buffers)i+=n.byteLength;if(this.byteLength>i)throw Error("Data size shouldn't be larger than the total length of buffers.")}_read(e){this.byteLength>this.pushedBytesLength||this.push(null),e||(e=this.readableHighWaterMark);const t=[];let r=0;for(;e>r&&this.byteLength>this.pushedBytesLength;){const i=this.buffers[this.bufferIndex].byteLength-this.byteOffsetInCurrentBuffer,n=Math.min(i,this.byteLength-this.pushedBytesLength);if(n>e-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}{const e=this.byteOffsetInCurrentBuffer+n;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,e)),n===i?(this.byteOffsetInCurrentBuffer=0,this.bufferIndex++):this.byteOffsetInCurrentBuffer=e,this.pushedBytesLength+=n,r+=n}}t.length>1?this.push(Buffer.concat(t)):1===t.length&&this.push(t[0])}}const maxBufferLength=require$$0$5.constants.MAX_LENGTH;class PooledBuffer{get size(){return this._size}constructor(e,t,r){this.buffers=[],this.capacity=e,this._size=0;const i=Math.ceil(e/maxBufferLength);for(let n=0;i>n;n++){let t=n===i-1?e%maxBufferLength:maxBufferLength;0===t&&(t=maxBufferLength),this.buffers.push(Buffer.allocUnsafe(t))}t&&this.fill(t,r)}fill(e,t){this._size=Math.min(this.capacity,t);let r=0,i=0,n=0,a=0,o=0;for(;this._size>o;){const t=e[r],s=this.buffers[i],l=t.copy(s,n,a);o+=l,a+=l,n+=l,a===t.length&&(r++,a=0),n===s.length&&(i++,n=0)}e.splice(0,r),e.length>0&&(e[0]=e[0].slice(a))}getReadableStream(){return new BuffersStream(this.buffers,this.size)}}class BufferScheduler{constructor(e,t,r,i,n,a){if(this.emitter=new EventEmitter,this.offset=0,this.isStreamEnd=!1,this.isError=!1,this.executingOutgoingHandlers=0,this.numBuffers=0,this.unresolvedDataArray=[],this.unresolvedLength=0,this.incoming=[],this.outgoing=[],0>=t)throw new RangeError("bufferSize must be larger than 0, current is "+t);if(0>=r)throw new RangeError("maxBuffers must be larger than 0, current is "+r);if(0>=n)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=a}async do(){return new Promise(((e,t)=>{this.readable.on("data",(e=>{e="string"==typeof e?Buffer.from(e,this.encoding):e,this.appendUnresolvedData(e),this.resolveData()||this.readable.pause()})),this.readable.on("error",(e=>{this.emitter.emit("error",e)})),this.readable.on("end",(()=>{this.isStreamEnd=!0,this.emitter.emit("checkEnd")})),this.emitter.on("error",(e=>{this.isError=!0,this.readable.pause(),t(e)})),this.emitter.on("checkEnd",(()=>{if(this.outgoing.length>0)this.triggerOutgoingHandlers();else if(this.isStreamEnd&&0===this.executingOutgoingHandlers)if(this.unresolvedLength>0&&this.bufferSize>this.unresolvedLength){const r=this.shiftBufferFromUnresolvedDataArray();this.outgoingHandler((()=>r.getReadableStream()),r.size,this.offset).then(e).catch(t)}else{if(this.unresolvedLength>=this.bufferSize)return;e()}}))}))}appendUnresolvedData(e){this.unresolvedDataArray.push(e),this.unresolvedLength+=e.length}shiftBufferFromUnresolvedDataArray(e){return e?e.fill(this.unresolvedDataArray,this.unresolvedLength):e=new PooledBuffer(this.bufferSize,this.unresolvedDataArray,this.unresolvedLength),this.unresolvedLength-=e.size,e}resolveData(){for(;this.unresolvedLength>=this.bufferSize;){let e;if(this.incoming.length>0)e=this.incoming.shift(),this.shiftBufferFromUnresolvedDataArray(e);else{if(this.numBuffers>=this.maxBuffers)return!1;e=this.shiftBufferFromUnresolvedDataArray(),this.numBuffers++}this.outgoing.push(e),this.triggerOutgoingHandlers()}return!0}async triggerOutgoingHandlers(){let e;do{if(this.executingOutgoingHandlers>=this.concurrency)return;e=this.outgoing.shift(),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(r){return void this.emitter.emit("error",r)}this.executingOutgoingHandlers--,this.reuseBuffer(e),this.emitter.emit("checkEnd")}reuseBuffer(e){this.incoming.push(e),this.isError||!this.resolveData()||this.isStreamEnd||this.readable.resume()}}const fsStat=require$$9.promisify(fs$5.stat),fsCreateReadStream=fs$5.createReadStream;class BlobClient extends StorageClient{get name(){return this._name}get containerName(){return this._containerName}constructor(e,t,r,i){let n,a;if(i=i||{},isPipelineLike(t))a=e,n=t;else if(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t))a=e,n=newPipeline(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw Error("Expecting non-empty strings for containerName and blobName parameters");{const o=t,s=r,l=extractConnectionStringParts(e);if("AccountConnString"===l.kind){if(!isNode)throw Error("Account connection string is only supported in Node.js environment");{const e=new StorageSharedKeyCredential(l.accountName,l.accountKey);a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s)),i.proxyOptions||(i.proxyOptions=getDefaultProxySettings(l.proxyUri)),n=newPipeline(e,i)}}else{if("SASConnString"!==l.kind)throw Error("Connection string must be either an Account connection string or a SAS connection string");a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s))+"?"+l.accountSas,n=newPipeline(new AnonymousCredential,i)}}}else a=e,r&&"string"!=typeof r&&(i=r),n=newPipeline(new AnonymousCredential,i);super(a,n),({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl()),this.blobContext=this.storageClientContext.blob,this._snapshot=getURLParameter(this.url,URLConstants.Parameters.SNAPSHOT),this._versionId=getURLParameter(this.url,URLConstants.Parameters.VERSIONID)}withSnapshot(e){return new BlobClient(setURLParameter(this.url,URLConstants.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}withVersion(e){return new BlobClient(setURLParameter(this.url,URLConstants.Parameters.VERSIONID,0===e.length?void 0: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={}){return r.conditions=r.conditions||{},r.conditions=r.conditions||{},ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlobClient-download",r,(async i=>{var n;const a=assertResponse(await this.blobContext.download({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:isNode?void 0:r.onProgress},range:0!==e||t?rangeToString({offset:e,count:t}):void 0,rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey,tracingOptions:i.tracingOptions})),o=Object.assign(Object.assign({},a),{_response:a._response,objectReplicationDestinationPolicyId:a.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(a.objectReplicationRules)});if(!isNode)return o;if((void 0===r.maxRetryRequests||0>r.maxRetryRequests)&&(r.maxRetryRequests=DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS),void 0===a.contentLength)throw new RangeError("File download response doesn't contain valid content length header");if(!a.etag)throw new RangeError("File download response doesn't contain valid etag header");return new BlobDownloadResponse(o,(async t=>{var i;const n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||a.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:null===(i=r.conditions)||void 0===i?void 0:i.tagConditions},range:rangeToString({count:e+a.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,a.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}))}async exists(e={}){return tracingClient.withSpan("BlobClient-exists",e,(async t=>{try{return ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions}),!0}catch(r){if(404===r.statusCode)return!1;if(409===r.statusCode&&(r.details.errorCode===BlobUsesCustomerSpecifiedEncryptionMsg||r.details.errorCode===BlobDoesNotUseCustomerSpecifiedEncryption))return!0;throw r}}))}async getProperties(e={}){return e.conditions=e.conditions||{},ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlobClient-getProperties",e,(async t=>{var r;const i=assertResponse(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(i.objectReplicationRules)})}))}async delete(e={}){return e.conditions=e.conditions||{},tracingClient.withSpan("BlobClient-delete",e,(async t=>{var r;return assertResponse(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async deleteIfExists(e={}){return tracingClient.withSpan("BlobClient-deleteIfExists",e,(async e=>{var t,r;try{const t=assertResponse(await this.delete(e));return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(i){if("BlobNotFound"===(null===(t=i.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=i.response)||void 0===r?void 0:r.parsedHeaders),{_response:i.response});throw i}}))}async undelete(e={}){return tracingClient.withSpan("BlobClient-undelete",e,(async t=>assertResponse(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async setHTTPHeaders(e,t={}){return t.conditions=t.conditions||{},ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlobClient-setHTTPHeaders",t,(async r=>{var i;return assertResponse(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))}))}async setMetadata(e,t={}){return t.conditions=t.conditions||{},ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlobClient-setMetadata",t,(async r=>{var i;return assertResponse(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))}))}async setTags(e,t={}){return tracingClient.withSpan("BlobClient-setTags",t,(async r=>{var i;return assertResponse(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions,tags:toBlobTags(e)}))}))}async getTags(e={}){return tracingClient.withSpan("BlobClient-getTags",e,(async t=>{var r;const i=assertResponse(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,tags:toTags({blobTagSet:i.blobTagSet})||{}})}))}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlobClient-createSnapshot",e,(async t=>{var r;return assertResponse(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions}))}))}async beginCopyFromURL(e,t={}){const r=new BlobBeginCopyFromUrlPoller({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await r.poll(),r}async abortCopyFromURL(e,t={}){return tracingClient.withSpan("BlobClient-abortCopyFromURL",t,(async r=>assertResponse(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:r.tracingOptions}))))}async syncCopyFromURL(e,t={}){return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},tracingClient.withSpan("BlobClient-syncCopyFromURL",t,(async r=>{var i,n,a,o,s,l,c;return assertResponse(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(n=t.sourceConditions)||void 0===n?void 0:n.ifMatch,sourceIfModifiedSince:null===(a=t.sourceConditions)||void 0===a?void 0:a.ifModifiedSince,sourceIfNoneMatch:null===(o=t.sourceConditions)||void 0===o?void 0:o.ifNoneMatch,sourceIfUnmodifiedSince:null===(s=t.sourceConditions)||void 0===s?void 0:s.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),immutabilityPolicyExpiry:null===(l=t.immutabilityPolicy)||void 0===l?void 0:l.expiriesOn,immutabilityPolicyMode:null===(c=t.immutabilityPolicy)||void 0===c?void 0:c.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions}))}))}async setAccessTier(e,t={}){return tracingClient.withSpan("BlobClient-setAccessTier",t,(async r=>{var i;return assertResponse(await this.blobContext.setTier(toAccessTier(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),rehydratePriority:t.rehydratePriority,tracingOptions:r.tracingOptions}))}))}async downloadToBuffer(e,t,r,i={}){var n;let a,o=0,s=0,l=i;e instanceof Buffer?(a=e,o=t||0,s="number"==typeof r?r:0):(o="number"==typeof e?e:0,s="number"==typeof t?t:0,l=r||{});let c=null!==(n=l.blockSize)&&void 0!==n?n:0;if(0>c)throw new RangeError("blockSize option must be >= 0");if(0===c&&(c=DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES),0>o)throw new RangeError("offset option must be >= 0");if(s&&0>=s)throw new RangeError("count option must be greater than 0");return l.conditions||(l.conditions={}),tracingClient.withSpan("BlobClient-downloadToBuffer",l,(async e=>{if(!s){const t=await this.getProperties(Object.assign(Object.assign({},l),{tracingOptions:e.tracingOptions}));if(s=t.contentLength-o,0>s)throw new RangeError(`offset ${o} shouldn't be larger than blob size ${t.contentLength}`)}if(!a)try{a=Buffer.alloc(s)}catch(i){throw Error(`Unable to allocate the buffer of size: ${s}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${i.message}`)}if(s>a.length)throw new RangeError("The buffer's size should be equal to or larger than the request count of bytes: "+s);let t=0;const r=new Batch(l.concurrency);for(let n=o;o+s>n;n+=c)r.addOperation((async()=>{let r=o+s;r>n+c&&(r=n+c);const i=(await this.download(n,r-n,{abortSignal:l.abortSignal,conditions:l.conditions,maxRetryRequests:l.maxRetryRequestsPerBlock,customerProvidedKey:l.customerProvidedKey,tracingOptions:e.tracingOptions})).readableStreamBody;await streamToBuffer(i,a,n-o,r-o),t+=r-n,l.onProgress&&l.onProgress({loadedBytes:t})}));return await r.do(),a}))}async downloadToFile(e,t=0,r,i={}){return tracingClient.withSpan("BlobClient-downloadToFile",i,(async n=>{const a=await this.download(t,r,Object.assign(Object.assign({},i),{tracingOptions:n.tracingOptions}));return a.readableStreamBody&&await readStreamToLocalFile(a.readableStreamBody,e),a.blobDownloadStream=void 0,a}))}getBlobAndContainerNamesFromUrl(){let e,t;try{const r=new URL(this.url);if("blob"===r.host.split(".")[1]){const i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}else if(isIpEndpointStyle(r)){const i=r.pathname.match("/([^/]*)/([^/]*)(/(.*))?");e=i[2],t=i[4]}else{const i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}if(e=decodeURIComponent(e),t=decodeURIComponent(t),t=t.replace(/\\/g,"/"),!e)throw Error("Provided containerName is invalid.");return{blobName:t,containerName:e}}catch(r){throw Error("Unable to extract blobName and containerName with provided information.")}}async startCopyFromURL(e,t={}){return tracingClient.withSpan("BlobClient-startCopyFromURL",t,(async r=>{var i,n,a;return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},assertResponse(await this.blobContext.startCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(a=t.immutabilityPolicy)||void 0===a?void 0:a.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),sealBlob:t.sealBlob,tracingOptions:r.tracingOptions}))}))}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,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential);t(appendToURLQuery(this.url,r))}))}async deleteImmutabilityPolicy(e={}){return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy",e,(async e=>assertResponse(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:e.tracingOptions}))))}async setImmutabilityPolicy(e,t={}){return tracingClient.withSpan("BlobClient-setImmutabilityPolicy",t,(async t=>assertResponse(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:t.tracingOptions}))))}async setLegalHold(e,t={}){return tracingClient.withSpan("BlobClient-setLegalHold",t,(async t=>assertResponse(await this.blobContext.setLegalHold(e,{tracingOptions:t.tracingOptions}))))}async getAccountInfo(e={}){return tracingClient.withSpan("BlobClient-getAccountInfo",e,(async t=>assertResponse(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}}class AppendBlobClient extends BlobClient{constructor(e,t,r,i){let n,a;if(i=i||{},isPipelineLike(t))a=e,n=t;else if(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t))a=e,n=newPipeline(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw Error("Expecting non-empty strings for containerName and blobName parameters");{const o=t,s=r,l=extractConnectionStringParts(e);if("AccountConnString"===l.kind){if(!isNode)throw Error("Account connection string is only supported in Node.js environment");{const e=new StorageSharedKeyCredential(l.accountName,l.accountKey);a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s)),i.proxyOptions||(i.proxyOptions=getDefaultProxySettings(l.proxyUri)),n=newPipeline(e,i)}}else{if("SASConnString"!==l.kind)throw Error("Connection string must be either an Account connection string or a SAS connection string");a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s))+"?"+l.accountSas,n=newPipeline(new AnonymousCredential,i)}}}else a=e,n=newPipeline(new AnonymousCredential,i);super(a,n),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(e){return new AppendBlobClient(setURLParameter(this.url,URLConstants.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps),tracingClient.withSpan("AppendBlobClient-create",e,(async t=>{var r,i,n;return assertResponse(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:null===(i=e.immutabilityPolicy)||void 0===i?void 0:i.expiriesOn,immutabilityPolicyMode:null===(n=e.immutabilityPolicy)||void 0===n?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:toBlobTagsString(e.tags),tracingOptions:t.tracingOptions}))}))}async createIfNotExists(e={}){const t={ifNoneMatch:ETagAny};return tracingClient.withSpan("AppendBlobClient-createIfNotExists",e,(async e=>{var r,i;try{const r=assertResponse(await this.create(Object.assign(Object.assign({},e),{conditions:t})));return Object.assign(Object.assign({succeeded:!0},r),{_response:r._response})}catch(n){if("BlobAlreadyExists"===(null===(r=n.details)||void 0===r?void 0:r.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(i=n.response)||void 0===i?void 0:i.parsedHeaders),{_response:n.response});throw n}}))}async seal(e={}){return e.conditions=e.conditions||{},tracingClient.withSpan("AppendBlobClient-seal",e,(async t=>{var r;return assertResponse(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null===(r=e.conditions)||void 0===r?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async appendBlock(e,t,r={}){return r.conditions=r.conditions||{},ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps),tracingClient.withSpan("AppendBlobClient-appendBlock",r,(async i=>{var n;return assertResponse(await this.appendBlobContext.appendBlock(t,e,{abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))}))}async appendBlockFromURL(e,t,r,i={}){return i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{},ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps),tracingClient.withSpan("AppendBlobClient-appendBlockFromURL",i,(async n=>{var a,o,s,l,c;return assertResponse(await this.appendBlobContext.appendBlockFromUrl(e,0,{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:null===(a=i.conditions)||void 0===a?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(o=i.sourceConditions)||void 0===o?void 0:o.ifMatch,sourceIfModifiedSince:null===(s=i.sourceConditions)||void 0===s?void 0:s.ifModifiedSince,sourceIfNoneMatch:null===(l=i.sourceConditions)||void 0===l?void 0:l.ifNoneMatch,sourceIfUnmodifiedSince:null===(c=i.sourceConditions)||void 0===c?void 0:c.ifUnmodifiedSince},copySourceAuthorization:httpAuthorizationToString(i.sourceAuthorization),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))}))}}class BlockBlobClient extends BlobClient{constructor(e,t,r,i){let n,a;if(i=i||{},isPipelineLike(t))a=e,n=t;else if(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t))a=e,n=newPipeline(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw Error("Expecting non-empty strings for containerName and blobName parameters");{const o=t,s=r,l=extractConnectionStringParts(e);if("AccountConnString"===l.kind){if(!isNode)throw Error("Account connection string is only supported in Node.js environment");{const e=new StorageSharedKeyCredential(l.accountName,l.accountKey);a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s)),i.proxyOptions||(i.proxyOptions=getDefaultProxySettings(l.proxyUri)),n=newPipeline(e,i)}}else{if("SASConnString"!==l.kind)throw Error("Connection string must be either an Account connection string or a SAS connection string");a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s))+"?"+l.accountSas,n=newPipeline(new AnonymousCredential,i)}}}else a=e,r&&"string"!=typeof r&&(i=r),n=newPipeline(new AnonymousCredential,i);super(a,n),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(e){return new BlockBlobClient(setURLParameter(this.url,URLConstants.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async query(e,t={}){if(ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),!isNode)throw Error("This operation currently is only supported in Node.js.");return tracingClient.withSpan("BlockBlobClient-query",t,(async r=>{var i;const n=assertResponse(await this._blobContext.query({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:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,tracingOptions:r.tracingOptions}));return new BlobQueryResponse(n,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})}))}async upload(e,t,r={}){return r.conditions=r.conditions||{},ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlockBlobClient-upload",r,(async i=>{var n,a,o;return assertResponse(await this.blockBlobContext.upload(t,e,{abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:null===(a=r.immutabilityPolicy)||void 0===a?void 0:a.expiriesOn,immutabilityPolicyMode:null===(o=r.immutabilityPolicy)||void 0===o?void 0:o.policyMode,legalHold:r.legalHold,tier:toAccessTier(r.tier),blobTagsString:toBlobTagsString(r.tags),tracingOptions:i.tracingOptions}))}))}async syncUploadFromURL(e,t={}){return t.conditions=t.conditions||{},ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlockBlobClient-syncUploadFromURL",t,(async r=>{var i,n,a,o,s,l;return assertResponse(await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(n=t.sourceConditions)||void 0===n?void 0:n.ifMatch,sourceIfModifiedSince:null===(a=t.sourceConditions)||void 0===a?void 0:a.ifModifiedSince,sourceIfNoneMatch:null===(o=t.sourceConditions)||void 0===o?void 0:o.ifNoneMatch,sourceIfUnmodifiedSince:null===(s=t.sourceConditions)||void 0===s?void 0:s.ifUnmodifiedSince,sourceIfTags:null===(l=t.sourceConditions)||void 0===l?void 0:l.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions})))}))}async stageBlock(e,t,r,i={}){return ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlockBlobClient-stageBlock",i,(async n=>assertResponse(await this.blockBlobContext.stageBlock(e,r,t,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,requestOptions:{onUploadProgress:i.onProgress},transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))))}async stageBlockFromURL(e,t,r=0,i,n={}){return ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlockBlobClient-stageBlockFromURL",n,(async a=>assertResponse(await this.blockBlobContext.stageBlockFromURL(e,0,t,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,sourceRange:0!==r||i?rangeToString({offset:r,count:i}):void 0,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization),tracingOptions:a.tracingOptions}))))}async commitBlockList(e,t={}){return t.conditions=t.conditions||{},ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),tracingClient.withSpan("BlockBlobClient-commitBlockList",t,(async r=>{var i,n,a;return assertResponse(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(a=t.immutabilityPolicy)||void 0===a?void 0:a.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),tracingOptions:r.tracingOptions}))}))}async getBlockList(e,t={}){return tracingClient.withSpan("BlockBlobClient-getBlockList",t,(async r=>{var i;const n=assertResponse(await this.blockBlobContext.getBlockList(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return n.committedBlocks||(n.committedBlocks=[]),n.uncommittedBlocks||(n.uncommittedBlocks=[]),n}))}async uploadData(e,t={}){return tracingClient.withSpan("BlockBlobClient-uploadData",t,(async t=>{if(isNode){let r;return r=e instanceof Buffer?e:e instanceof ArrayBuffer?Buffer.from(e):Buffer.from(e.buffer,e.byteOffset,e.byteLength),this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.byteLength,t)}{const r=new Blob([e]);return this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.size,t)}}))}async uploadBrowserData(e,t={}){return tracingClient.withSpan("BlockBlobClient-uploadBrowserData",t,(async t=>{const r=new Blob([e]);return this.uploadSeekableInternal(((e,t)=>r.slice(e,e+t)),r.size,t)}))}async uploadSeekableInternal(e,t,r={}){var i,n;let a=null!==(i=r.blockSize)&&void 0!==i?i:0;if(0>a||a>BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES)throw new RangeError("blockSize option must be >= 0 and <= "+BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES);const o=null!==(n=r.maxSingleShotSize)&&void 0!==n?n:BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;if(0>o||o>BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES)throw new RangeError("maxSingleShotSize option must be >= 0 and <= "+BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES);if(0===a){if(t>BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES*BLOCK_BLOB_MAX_BLOCKS)throw new RangeError(t+" is too larger to upload to a block blob.");t>o&&(a=Math.ceil(t/BLOCK_BLOB_MAX_BLOCKS),DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES>a&&(a=DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES))}return r.blobHTTPHeaders||(r.blobHTTPHeaders={}),r.conditions||(r.conditions={}),tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal",r,(async i=>{if(o>=t)return assertResponse(await this.upload(e(0,t),t,i));const n=Math.floor((t-1)/a)+1;if(n>BLOCK_BLOB_MAX_BLOCKS)throw new RangeError("The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= "+BLOCK_BLOB_MAX_BLOCKS);const s=[],l=randomUUID();let c=0;const m=new Batch(r.concurrency);for(let o=0;n>o;o++)m.addOperation((async()=>{const m=generateBlockID(l,o),d=a*o,p=(o===n-1?t:d+a)-d;s.push(m),await this.stageBlock(m,e(d,p),p,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),c+=p,r.onProgress&&r.onProgress({loadedBytes:c})}));return await m.do(),this.commitBlockList(s,i)}))}async uploadFile(e,t={}){return tracingClient.withSpan("BlockBlobClient-uploadFile",t,(async r=>{const i=(await fsStat(e)).size;return this.uploadSeekableInternal(((t,r)=>()=>fsCreateReadStream(e,{autoClose:!0,end:r?t+r-1:1/0,start:t})),i,Object.assign(Object.assign({},t),{tracingOptions:r.tracingOptions}))}))}async uploadStream(e,t=DEFAULT_BLOCK_BUFFER_SIZE_BYTES,r=5,i={}){return i.blobHTTPHeaders||(i.blobHTTPHeaders={}),i.conditions||(i.conditions={}),tracingClient.withSpan("BlockBlobClient-uploadStream",i,(async n=>{let a=0;const o=randomUUID();let s=0;const l=[],c=new BufferScheduler(e,t,r,(async(e,t)=>{const r=generateBlockID(o,a);l.push(r),a++,await this.stageBlock(r,e,t,{conditions:i.conditions,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}),s+=t,i.onProgress&&i.onProgress({loadedBytes:s})}),Math.ceil(r/4*3));return await c.do(),assertResponse(await this.commitBlockList(l,Object.assign(Object.assign({},i),{tracingOptions:n.tracingOptions})))}))}}class PageBlobClient extends BlobClient{constructor(e,t,r,i){let n,a;if(i=i||{},isPipelineLike(t))a=e,n=t;else if(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t))a=e,n=newPipeline(t,i=r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t||!r||"string"!=typeof r)throw Error("Expecting non-empty strings for containerName and blobName parameters");{const o=t,s=r,l=extractConnectionStringParts(e);if("AccountConnString"===l.kind){if(!isNode)throw Error("Account connection string is only supported in Node.js environment");{const e=new StorageSharedKeyCredential(l.accountName,l.accountKey);a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s)),i.proxyOptions||(i.proxyOptions=getDefaultProxySettings(l.proxyUri)),n=newPipeline(e,i)}}else{if("SASConnString"!==l.kind)throw Error("Connection string must be either an Account connection string or a SAS connection string");a=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(s))+"?"+l.accountSas,n=newPipeline(new AnonymousCredential,i)}}}else a=e,n=newPipeline(new AnonymousCredential,i);super(a,n),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(e){return new PageBlobClient(setURLParameter(this.url,URLConstants.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e,t={}){return t.conditions=t.conditions||{},ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps),tracingClient.withSpan("PageBlobClient-create",t,(async r=>{var i,n,a;return assertResponse(await this.pageBlobContext.create(0,e,{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null===(n=t.immutabilityPolicy)||void 0===n?void 0:n.expiriesOn,immutabilityPolicyMode:null===(a=t.immutabilityPolicy)||void 0===a?void 0:a.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),tracingOptions:r.tracingOptions}))}))}async createIfNotExists(e,t={}){return tracingClient.withSpan("PageBlobClient-createIfNotExists",t,(async r=>{var i,n;try{const i={ifNoneMatch:ETagAny},n=assertResponse(await this.create(e,Object.assign(Object.assign({},t),{conditions:i,tracingOptions:r.tracingOptions})));return Object.assign(Object.assign({succeeded:!0},n),{_response:n._response})}catch(a){if("BlobAlreadyExists"===(null===(i=a.details)||void 0===i?void 0:i.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(n=a.response)||void 0===n?void 0:n.parsedHeaders),{_response:a.response});throw a}}))}async uploadPages(e,t,r,i={}){return i.conditions=i.conditions||{},ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps),tracingClient.withSpan("PageBlobClient-uploadPages",i,(async n=>{var a;return assertResponse(await this.pageBlobContext.uploadPages(r,e,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(a=i.conditions)||void 0===a?void 0:a.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,tracingOptions:n.tracingOptions}))}))}async uploadPagesFromURL(e,t,r,i,n={}){return n.conditions=n.conditions||{},n.sourceConditions=n.sourceConditions||{},ensureCpkIfSpecified(n.customerProvidedKey,this.isHttps),tracingClient.withSpan("PageBlobClient-uploadPagesFromURL",n,(async a=>{var o,s,l,c,m;return assertResponse(await this.pageBlobContext.uploadPagesFromURL(e,rangeToString({offset:t,count:i}),0,rangeToString({offset:r,count:i}),{abortSignal:n.abortSignal,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,sequenceNumberAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null===(o=n.conditions)||void 0===o?void 0:o.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null===(s=n.sourceConditions)||void 0===s?void 0:s.ifMatch,sourceIfModifiedSince:null===(l=n.sourceConditions)||void 0===l?void 0:l.ifModifiedSince,sourceIfNoneMatch:null===(c=n.sourceConditions)||void 0===c?void 0:c.ifNoneMatch,sourceIfUnmodifiedSince:null===(m=n.sourceConditions)||void 0===m?void 0:m.ifUnmodifiedSince},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:httpAuthorizationToString(n.sourceAuthorization),tracingOptions:a.tracingOptions}))}))}async clearPages(e=0,t,r={}){return r.conditions=r.conditions||{},tracingClient.withSpan("PageBlobClient-clearPages",r,(async i=>{var n;return assertResponse(await this.pageBlobContext.clearPages(0,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:rangeToString({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))}))}async getPageRanges(e=0,t,r={}){return r.conditions=r.conditions||{},tracingClient.withSpan("PageBlobClient-getPageRanges",r,(async i=>{var n;return rangeResponseFromModel(assertResponse(await this.pageBlobContext.getPageRanges({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),range:rangeToString({offset:e,count:t}),tracingOptions:i.tracingOptions})))}))}async listPageRangesSegment(e=0,t,r,i={}){return tracingClient.withSpan("PageBlobClient-getPageRangesSegment",i,(async n=>{var a;return assertResponse(await this.pageBlobContext.getPageRanges({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(a=i.conditions)||void 0===a?void 0:a.tagConditions}),range:rangeToString({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize,tracingOptions:n.tracingOptions}))}))}listPageRangeItemSegments(){return __asyncGenerator(this,arguments,(function*(e=0,t,r,i={}){let n;if(r||void 0===r)do{n=yield __await(this.listPageRangesSegment(e,t,r,i)),r=n.continuationToken,yield yield __await(yield __await(n))}while(r)}))}listPageRangeItems(){return __asyncGenerator(this,arguments,(function*(e=0,t,r={}){var i,n,a;try{for(var o,s=!0,l=__asyncValues(this.listPageRangeItemSegments(e,t,void 0,r));!(i=(o=yield __await(l.next())).done);s=!0){s=!1;const e=o.value;yield __await(yield*__asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(c){n={error:c}}finally{try{s||i||!(a=l.return)||(yield __await(a.call(l)))}finally{if(n)throw n.error}}}))}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};const i=this.listPageRangeItems(e,t,r);return{next:()=>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={}){return i.conditions=i.conditions||{},tracingClient.withSpan("PageBlobClient-getPageRangesDiff",i,(async n=>{var a;return rangeResponseFromModel(assertResponse(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(a=i.conditions)||void 0===a?void 0:a.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),tracingOptions:n.tracingOptions})))}))}async listPageRangesDiffSegment(e,t,r,i,n={}){return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment",n,(async a=>{var o;return assertResponse(await this.pageBlobContext.getPageRangesDiff({abortSignal:null==n?void 0:n.abortSignal,leaseAccessConditions:null==n?void 0:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},null==n?void 0:n.conditions),{ifTags:null===(o=null==n?void 0:n.conditions)||void 0===o?void 0:o.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),marker:i,maxPageSize:null==n?void 0:n.maxPageSize,tracingOptions:a.tracingOptions}))}))}listPageRangeDiffItemSegments(e,t,r,i,n){return __asyncGenerator(this,arguments,(function*(){let a;if(i||void 0===i)do{a=yield __await(this.listPageRangesDiffSegment(e,t,r,i,n)),i=a.continuationToken,yield yield __await(yield __await(a))}while(i)}))}listPageRangeDiffItems(e,t,r,i){return __asyncGenerator(this,arguments,(function*(){var n,a,o;try{for(var s,l=!0,c=__asyncValues(this.listPageRangeDiffItemSegments(e,t,r,void 0,i));!(n=(s=yield __await(c.next())).done);l=!0){l=!1;const e=s.value;yield __await(yield*__asyncDelegator(__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(m){a={error:m}}finally{try{l||n||!(o=c.return)||(yield __await(o.call(c)))}finally{if(a)throw a.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const n=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next:()=>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={}){return i.conditions=i.conditions||{},tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks",i,(async n=>{var a;return rangeResponseFromModel(assertResponse(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null===(a=i.conditions)||void 0===a?void 0:a.tagConditions}),prevSnapshotUrl:r,range:rangeToString({offset:e,count:t}),tracingOptions:n.tracingOptions})))}))}async resize(e,t={}){return t.conditions=t.conditions||{},tracingClient.withSpan("PageBlobClient-resize",t,(async r=>{var i;return assertResponse(await this.pageBlobContext.resize(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))}))}async updateSequenceNumber(e,t,r={}){return r.conditions=r.conditions||{},tracingClient.withSpan("PageBlobClient-updateSequenceNumber",r,(async i=>{var n;return assertResponse(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null===(n=r.conditions)||void 0===n?void 0:n.tagConditions}),tracingOptions:i.tracingOptions}))}))}async startCopyIncremental(e,t={}){return tracingClient.withSpan("PageBlobClient-startCopyIncremental",t,(async r=>{var i;return assertResponse(await this.pageBlobContext.copyIncremental(e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null===(i=t.conditions)||void 0===i?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))}))}}const HTTP_HEADER_DELIMITER=": ",SPACE_DELIMITER=" ",NOT_FOUND=-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||0===t.size)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}${HTTP_LINE_ENDING}`,this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==HTTPURLConnection.HTTP_ACCEPTED)throw Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);const e=(await getBodyAsText(this.batchResponse)).split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1),t=e.length;if(t!==this.subRequests.size&&1!==t)throw Error("Invalid state: sub responses' count is not equal to sub requests' count.");const r=Array(t);let i=0,n=0;for(let a=0;t>a;a++){const t=e[a],o={};o.headers=toHttpHeadersLike(createHttpHeaders());const s=t.split(""+HTTP_LINE_ENDING);let l=!1,c=!1,m=!1,d=NOT_FOUND;for(const e of s)if(l)if(""!==e.trim())if(c)o.bodyAsText||(o.bodyAsText=""),o.bodyAsText+=e;else{if(-1===e.indexOf(HTTP_HEADER_DELIMITER))throw Error(`Invalid state: find non-empty line '${e}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`);const t=e.split(HTTP_HEADER_DELIMITER);o.headers.set(t[0],t[1]),t[0]===HeaderConstants.X_MS_ERROR_CODE&&(o.errorCode=t[1],m=!0)}else c||(c=!0);else if(e.startsWith(HeaderConstants.CONTENT_ID)&&(d=parseInt(e.split(HTTP_HEADER_DELIMITER)[1])),e.startsWith(HTTP_VERSION_1_1)){l=!0;const t=e.split(SPACE_DELIMITER);o.status=parseInt(t[1]),o.statusMessage=t.slice(2).join(SPACE_DELIMITER)}d!==NOT_FOUND&&Number.isInteger(d)&&d>=0&&this.subRequests.size>d&&void 0===r[d]?(o._request=this.subRequests.get(d),r[d]=o):logger.error(`subResponses[${a}] is dropped as the Content-ID is not found or invalid, Content-ID: ${d}`),m?n++:i++}return{subResponses:r,subResponsesSucceededCount:i,subResponsesFailedCount:n}}}var MutexLockStatus,MutexLockStatus2,KnownEncryptionAlgorithmType;MutexLockStatus2=MutexLockStatus||(MutexLockStatus={}),MutexLockStatus2[MutexLockStatus2.LOCKED=0]="LOCKED",MutexLockStatus2[MutexLockStatus2.UNLOCKED=1]="UNLOCKED";class Mutex{static async lock(e){return new Promise((t=>{void 0===this.keys[e]||this.keys[e]===MutexLockStatus.UNLOCKED?(this.keys[e]=MutexLockStatus.LOCKED,t()):this.onUnlockEvent(e,(()=>{this.keys[e]=MutexLockStatus.LOCKED,t()}))}))}static async unlock(e){return new Promise((t=>{this.keys[e]===MutexLockStatus.LOCKED&&this.emitUnlockEvent(e),delete this.keys[e],t()}))}static onUnlockEvent(e,t){void 0===this.listeners[e]?this.listeners[e]=[t]:this.listeners[e].push(t)}static emitUnlockEvent(e){if(void 0!==this.listeners[e]&&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),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 i,n;if("string"==typeof e&&(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t)))i=e,n=t;else{if(!(e instanceof BlobClient))throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");i=e.url,n=e.credential,r=t}return r||(r={}),tracingClient.withSpan("BatchDeleteRequest-addSubRequest",r,(async e=>{this.setBatchType("delete"),await this.addSubRequestInternal({url:i,credential:n},(async()=>{await new BlobClient(i,this.batchRequest.createPipeline(n)).delete(e)}))}))}async setBlobAccessTier(e,t,r,i){let n,a,o;if("string"==typeof e&&(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t)))n=e,a=t,o=r;else{if(!(e instanceof BlobClient))throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");n=e.url,a=e.credential,o=t,i=r}return i||(i={}),tracingClient.withSpan("BatchSetTierRequest-addSubRequest",i,(async e=>{this.setBatchType("setAccessTier"),await this.addSubRequestInternal({url:n,credential:a},(async()=>{await new BlobClient(n,this.batchRequest.createPipeline(a)).setAccessTier(o,e)}))}))}}class InnerBatchRequest{constructor(){this.operationCount=0,this.body="";const e=randomUUID();this.boundary="batch_"+e,this.subRequestPrefix=`--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`,this.multipartContentType="multipart/mixed; boundary="+this.boundary,this.batchRequestEnding=`--${this.boundary}--`,this.subRequests=new Map}createPipeline(e){const t=createEmptyPipeline();t.addPolicy(serializationPolicy({stringifyXML:stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}}),{phase:"Serialize"}),t.addPolicy(batchHeaderFilterPolicy()),t.addPolicy(batchRequestAssemblePolicy(this),{afterPhase:"Sign"}),isTokenCredential(e)?t.addPolicy(bearerTokenAuthenticationPolicy({credential:e,scopes:StorageOAuthScopes,challengeCallbacks:{authorizeRequestOnChallenge:authorizeRequestOnTenantChallenge}}),{phase:"Sign"}):e instanceof StorageSharedKeyCredential&&t.addPolicy(storageSharedKeyCredentialPolicy({accountName:e.accountName,accountKey:e.accountKey}),{phase:"Sign"});const r=new Pipeline([]);return r._credential=e,r._corePipeline=t,r}appendSubRequestToBody(e){this.body+=[this.subRequestPrefix,`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,"",`${""+e.method} ${getURLPathAndQuery(e.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`].join(HTTP_LINE_ENDING);for(const[t,r]of e.headers)this.body+=`${t}: ${r}${HTTP_LINE_ENDING}`;this.body+=HTTP_LINE_ENDING}preAddSubRequest(e){if(this.operationCount>=BATCH_MAX_REQUEST)throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} 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}${HTTP_LINE_ENDING}`}getMultipartContentType(){return this.multipartContentType}getSubRequests(){return this.subRequests}}class BlobBatchClient{constructor(e,t,r){let i;i=isPipelineLike(t)?t:newPipeline(t||new AnonymousCredential,r);const n=new StorageContextClient(e,getCoreClientOptions(i)),a=getURLPath(e);this.serviceOrContainerContext=a&&"/"!==a?n.container:n.service}createBatch(){return new BlobBatch}async deleteBlobs(e,t,r){const i=new BlobBatch;for(const n of e)"string"==typeof n?await i.deleteBlob(n,t,r):await i.deleteBlob(n,t);return this.submitBatch(i)}async setBlobsAccessTier(e,t,r,i){const n=new BlobBatch;for(const a of e)"string"==typeof a?await n.setBlobAccessTier(a,t,r,i):await n.setBlobAccessTier(a,t,r);return this.submitBatch(n)}async submitBatch(e,t={}){if(!e||0===e.getSubRequests().size)throw new RangeError("Batch request should contain one or more sub requests.");return tracingClient.withSpan("BlobBatchClient-submitBatch",t,(async t=>{const r=e.getHttpRequestBody(),i=assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(r),e.getMultiPartContentType(),r,Object.assign({},t))),n=new BatchResponseParser(i,e.getSubRequests()),a=await n.parseBatchResponse();return{_response:i._response,contentType:i.contentType,errorCode:i.errorCode,requestId:i.requestId,clientRequestId:i.clientRequestId,version:i.version,subResponses:a.subResponses,subResponsesSucceededCount:a.subResponsesSucceededCount,subResponsesFailedCount:a.subResponsesFailedCount}}))}}class ContainerClient extends StorageClient{get containerName(){return this._containerName}constructor(e,t,r){let i,n;if(r=r||{},isPipelineLike(t))n=e,i=t;else if(isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t))n=e,i=newPipeline(t,r);else if(t||"string"==typeof t){if(!t||"string"!=typeof t)throw Error("Expecting non-empty strings for containerName parameter");{const a=t,o=extractConnectionStringParts(e);if("AccountConnString"===o.kind){if(!isNode)throw Error("Account connection string is only supported in Node.js environment");{const e=new StorageSharedKeyCredential(o.accountName,o.accountKey);n=appendToURLPath(o.url,encodeURIComponent(a)),r.proxyOptions||(r.proxyOptions=getDefaultProxySettings(o.proxyUri)),i=newPipeline(e,r)}}else{if("SASConnString"!==o.kind)throw Error("Connection string must be either an Account connection string or a SAS connection string");n=appendToURLPath(o.url,encodeURIComponent(a))+"?"+o.accountSas,i=newPipeline(new AnonymousCredential,r)}}}else n=e,i=newPipeline(new AnonymousCredential,r);super(n,i),this._containerName=this.getContainerNameFromUrl(),this.containerContext=this.storageClientContext.container}async create(e={}){return tracingClient.withSpan("ContainerClient-create",e,(async e=>assertResponse(await this.containerContext.create(e))))}async createIfNotExists(e={}){return tracingClient.withSpan("ContainerClient-createIfNotExists",e,(async e=>{var t,r;try{const t=await this.create(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(i){if("ContainerAlreadyExists"===(null===(t=i.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=i.response)||void 0===r?void 0:r.parsedHeaders),{_response:i.response});throw i}}))}async exists(e={}){return tracingClient.withSpan("ContainerClient-exists",e,(async t=>{try{return await this.getProperties({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}),!0}catch(r){if(404===r.statusCode)return!1;throw r}}))}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={}){return e.conditions||(e.conditions={}),tracingClient.withSpan("ContainerClient-getProperties",e,(async t=>assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({abortSignal:e.abortSignal},e.conditions),{tracingOptions:t.tracingOptions})))))}async delete(e={}){return e.conditions||(e.conditions={}),tracingClient.withSpan("ContainerClient-delete",e,(async t=>assertResponse(await this.containerContext.delete({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:e.conditions,tracingOptions:t.tracingOptions}))))}async deleteIfExists(e={}){return tracingClient.withSpan("ContainerClient-deleteIfExists",e,(async e=>{var t,r;try{const t=await this.delete(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(i){if("ContainerNotFound"===(null===(t=i.details)||void 0===t?void 0:t.errorCode))return Object.assign(Object.assign({succeeded:!1},null===(r=i.response)||void 0===r?void 0:r.parsedHeaders),{_response:i.response});throw i}}))}async setMetadata(e,t={}){if(t.conditions||(t.conditions={}),t.conditions.ifUnmodifiedSince)throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service");return tracingClient.withSpan("ContainerClient-setMetadata",t,(async r=>assertResponse(await this.containerContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:t.conditions,tracingOptions:r.tracingOptions}))))}async getAccessPolicy(e={}){return e.conditions||(e.conditions={}),tracingClient.withSpan("ContainerClient-getAccessPolicy",e,(async t=>{const r=assertResponse(await this.containerContext.getAccessPolicy({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,tracingOptions:t.tracingOptions})),i={_response:r._response,blobPublicAccess:r.blobPublicAccess,date:r.date,etag:r.etag,errorCode:r.errorCode,lastModified:r.lastModified,requestId:r.requestId,clientRequestId:r.clientRequestId,signedIdentifiers:[],version:r.version};for(const e of r){let t;e.accessPolicy&&(t={permissions:e.accessPolicy.permissions},e.accessPolicy.expiresOn&&(t.expiresOn=new Date(e.accessPolicy.expiresOn)),e.accessPolicy.startsOn&&(t.startsOn=new Date(e.accessPolicy.startsOn))),i.signedIdentifiers.push({accessPolicy:t,id:e.id})}return i}))}async setAccessPolicy(e,t,r={}){return r.conditions=r.conditions||{},tracingClient.withSpan("ContainerClient-setAccessPolicy",r,(async i=>{const n=[];for(const e of t||[])n.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 assertResponse(await this.containerContext.setAccessPolicy({abortSignal:r.abortSignal,access:e,containerAcl:n,leaseAccessConditions:r.conditions,modifiedAccessConditions:r.conditions,tracingOptions:i.tracingOptions}))}))}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async uploadBlockBlob(e,t,r,i={}){return tracingClient.withSpan("ContainerClient-uploadBlockBlob",i,(async i=>{const n=this.getBlockBlobClient(e),a=await n.upload(t,r,i);return{blockBlobClient:n,response:a}}))}async deleteBlob(e,t={}){return tracingClient.withSpan("ContainerClient-deleteBlob",t,(async r=>{let i=this.getBlobClient(e);return t.versionId&&(i=i.withVersion(t.versionId)),i.delete(r)}))}async listBlobFlatSegment(e,t={}){return tracingClient.withSpan("ContainerClient-listBlobFlatSegment",t,(async r=>{const i=assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({marker:e},t),{tracingOptions:r.tracingOptions})));return Object.assign(Object.assign({},i),{_response:Object.assign(Object.assign({},i._response),{parsedBody:ConvertInternalResponseOfListBlobFlat(i._response.parsedBody)}),segment:Object.assign(Object.assign({},i.segment),{blobItems:i.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)})))})})}))}async listBlobHierarchySegment(e,t,r={}){return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment",r,(async i=>{var n;const a=assertResponse(await this.containerContext.listBlobHierarchySegment(e,Object.assign(Object.assign({marker:t},r),{tracingOptions:i.tracingOptions})));return Object.assign(Object.assign({},a),{_response:Object.assign(Object.assign({},a._response),{parsedBody:ConvertInternalResponseOfListBlobHierarchy(a._response.parsedBody)}),segment:Object.assign(Object.assign({},a.segment),{blobItems:a.segment.blobItems.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name),tags:toTags(e.blobTags),objectReplicationSourceProperties:parseObjectReplicationRecord(e.objectReplicationMetadata)}))),blobPrefixes:null===(n=a.segment.blobPrefixes)||void 0===n?void 0:n.map((e=>Object.assign(Object.assign({},e),{name:BlobNameToString(e.name)})))})})}))}listSegments(e){return __asyncGenerator(this,arguments,(function*(e,t={}){let r;if(e||void 0===e)do{r=yield __await(this.listBlobFlatSegment(e,t)),e=r.continuationToken,yield yield __await(yield __await(r))}while(e)}))}listItems(){return __asyncGenerator(this,arguments,(function*(e={}){var t,r,i;try{for(var n,a=!0,o=__asyncValues(this.listSegments(void 0,e));!(t=(n=yield __await(o.next())).done);a=!0){a=!1;const e=n.value;yield __await(yield*__asyncDelegator(__asyncValues(e.segment.blobItems)))}}catch(s){r={error:s}}finally{try{a||t||!(i=o.return)||(yield __await(i.call(o)))}finally{if(r)throw r.error}}}))}listBlobsFlat(e={}){const t=[];e.includeCopy&&t.push("copy"),e.includeDeleted&&t.push("deleted"),e.includeMetadata&&t.push("metadata"),e.includeSnapshots&&t.push("snapshots"),e.includeVersions&&t.push("versions"),e.includeUncommitedBlobs&&t.push("uncommittedblobs"),e.includeTags&&t.push("tags"),e.includeDeletedWithVersions&&t.push("deletedwithversions"),e.includeImmutabilityPolicy&&t.push("immutabilitypolicy"),e.includeLegalHold&&t.push("legalhold"),""===e.prefix&&(e.prefix=void 0);const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{}),i=this.listItems(r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}listHierarchySegments(e,t){return __asyncGenerator(this,arguments,(function*(e,t,r={}){let i;if(t||void 0===t)do{i=yield __await(this.listBlobHierarchySegment(e,t,r)),t=i.continuationToken,yield yield __await(yield __await(i))}while(t)}))}listItemsByHierarchy(e){return __asyncGenerator(this,arguments,(function*(e,t={}){var r,i,n;try{for(var a,o=!0,s=__asyncValues(this.listHierarchySegments(e,void 0,t));!(r=(a=yield __await(s.next())).done);o=!0){o=!1;const e=a.value.segment;if(e.blobPrefixes)for(const t of e.blobPrefixes)yield yield __await(Object.assign({kind:"prefix"},t));for(const t of e.blobItems)yield yield __await(Object.assign({kind:"blob"},t))}}catch(l){i={error:l}}finally{try{o||r||!(n=s.return)||(yield __await(n.call(s)))}finally{if(i)throw i.error}}}))}listBlobsByHierarchy(e,t={}){if(""===e)throw new RangeError("delimiter should contain one or more characters");const r=[];t.includeCopy&&r.push("copy"),t.includeDeleted&&r.push("deleted"),t.includeMetadata&&r.push("metadata"),t.includeSnapshots&&r.push("snapshots"),t.includeVersions&&r.push("versions"),t.includeUncommitedBlobs&&r.push("uncommittedblobs"),t.includeTags&&r.push("tags"),t.includeDeletedWithVersions&&r.push("deletedwithversions"),t.includeImmutabilityPolicy&&r.push("immutabilitypolicy"),t.includeLegalHold&&r.push("legalhold"),""===t.prefix&&(t.prefix=void 0);const i=Object.assign(Object.assign({},t),r.length>0?{include:r}:{}),n=this.listItemsByHierarchy(e,i);return{next:async()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.listHierarchySegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},i))}}async findBlobsByTagsSegment(e,t,r={}){return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment",r,(async i=>{const n=assertResponse(await this.containerContext.filterBlobs({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},n),{_response:n._response,blobs:n.blobs.map((e=>{var t;let r="";return 1===(null===(t=e.tags)||void 0===t?void 0:t.blobTagSet.length)&&(r=e.tags.blobTagSet[0].value),Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))})}))}findBlobsByTagsSegments(e,t){return __asyncGenerator(this,arguments,(function*(e,t,r={}){let i;if(t||void 0===t)do{i=yield __await(this.findBlobsByTagsSegment(e,t,r)),i.blobs=i.blobs||[],t=i.continuationToken,yield yield __await(i)}while(t)}))}findBlobsByTagsItems(e){return __asyncGenerator(this,arguments,(function*(e,t={}){var r,i,n;try{for(var a,o=!0,s=__asyncValues(this.findBlobsByTagsSegments(e,void 0,t));!(r=(a=yield __await(s.next())).done);o=!0){o=!1;const e=a.value;yield __await(yield*__asyncDelegator(__asyncValues(e.blobs)))}}catch(l){i={error:l}}finally{try{o||r||!(n=s.return)||(yield __await(n.call(s)))}finally{if(i)throw i.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t),i=this.findBlobsByTagsItems(e,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}async getAccountInfo(e={}){return tracingClient.withSpan("ContainerClient-getAccountInfo",e,(async t=>assertResponse(await this.containerContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}getContainerNameFromUrl(){let e;try{const t=new URL(this.url);if(e="blob"===t.hostname.split(".")[1]?t.pathname.split("/")[1]:isIpEndpointStyle(t)?t.pathname.split("/")[2]:t.pathname.split("/")[1],e=decodeURIComponent(e),!e)throw Error("Provided containerName is invalid.");return e}catch(t){throw 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);t(appendToURLQuery(this.url,r))}))}getBlobBatchClient(){return new BlobBatchClient(this.url,this.pipeline)}}class AccountSASPermissions{constructor(){this.read=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.add=!1,this.create=!1,this.update=!1,this.process=!1,this.tag=!1,this.filter=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){const t=new AccountSASPermissions;for(const r of e)switch(r){case"r":t.read=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"l":t.list=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"u":t.update=!0;break;case"p":t.process=!0;break;case"t":t.tag=!0;break;case"f":t.filter=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError("Invalid permission character: "+r)}return t}static from(e){const t=new AccountSASPermissions;return e.read&&(t.read=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.filter&&(t.filter=!0),e.tag&&(t.tag=!0),e.list&&(t.list=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.update&&(t.update=!0),e.process&&(t.process=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){const e=[];return this.read&&e.push("r"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.filter&&e.push("f"),this.tag&&e.push("t"),this.list&&e.push("l"),this.add&&e.push("a"),this.create&&e.push("c"),this.update&&e.push("u"),this.process&&e.push("p"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class AccountSASResourceTypes{constructor(){this.service=!1,this.container=!1,this.object=!1}static parse(e){const t=new AccountSASResourceTypes;for(const r of e)switch(r){case"s":t.service=!0;break;case"c":t.container=!0;break;case"o":t.object=!0;break;default:throw new RangeError("Invalid resource type: "+r)}return t}toString(){const e=[];return this.service&&e.push("s"),this.container&&e.push("c"),this.object&&e.push("o"),e.join("")}}class AccountSASServices{constructor(){this.blob=!1,this.file=!1,this.queue=!1,this.table=!1}static parse(e){const t=new AccountSASServices;for(const r of e)switch(r){case"b":t.blob=!0;break;case"f":t.file=!0;break;case"q":t.queue=!0;break;case"t":t.table=!0;break;default:throw new RangeError("Invalid service character: "+r)}return t}toString(){const e=[];return this.blob&&e.push("b"),this.table&&e.push("t"),this.queue&&e.push("q"),this.file&&e.push("f"),e.join("")}}class BlobServiceClient extends StorageClient{static fromConnectionString(e,t){t=t||{};const r=extractConnectionStringParts(e);if("AccountConnString"===r.kind){if(isNode){const e=new StorageSharedKeyCredential(r.accountName,r.accountKey);t.proxyOptions||(t.proxyOptions=getDefaultProxySettings(r.proxyUri));const i=newPipeline(e,t);return new BlobServiceClient(r.url,i)}throw Error("Account connection string is only supported in Node.js environment")}if("SASConnString"===r.kind){const e=newPipeline(new AnonymousCredential,t);return new BlobServiceClient(r.url+"?"+r.accountSas,e)}throw Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,t,r){let i;i=isPipelineLike(t)?t:isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||isTokenCredential(t)?newPipeline(t,r):newPipeline(new AnonymousCredential,r),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new ContainerClient(appendToURLPath(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,t={}){return tracingClient.withSpan("BlobServiceClient-createContainer",t,(async t=>{const r=this.getContainerClient(e),i=await r.create(t);return{containerClient:r,containerCreateResponse:i}}))}async deleteContainer(e,t={}){return tracingClient.withSpan("BlobServiceClient-deleteContainer",t,(async t=>this.getContainerClient(e).delete(t)))}async undeleteContainer(e,t,r={}){return tracingClient.withSpan("BlobServiceClient-undeleteContainer",r,(async i=>{const n=this.getContainerClient(r.destinationContainerName||e),a=n.storageClientContext.container;return{containerClient:n,containerUndeleteResponse:assertResponse(await a.restore({deletedContainerName:e,deletedContainerVersion:t,tracingOptions:i.tracingOptions}))}}))}async renameContainer(e,t,r={}){return tracingClient.withSpan("BlobServiceClient-renameContainer",r,(async i=>{var n;const a=this.getContainerClient(t),o=a.storageClientContext.container;return{containerClient:a,containerRenameResponse:assertResponse(await o.rename(e,Object.assign(Object.assign({},i),{sourceLeaseId:null===(n=r.sourceCondition)||void 0===n?void 0:n.leaseId})))}}))}async getProperties(e={}){return tracingClient.withSpan("BlobServiceClient-getProperties",e,(async t=>assertResponse(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async setProperties(e,t={}){return tracingClient.withSpan("BlobServiceClient-setProperties",t,(async r=>assertResponse(await this.serviceContext.setProperties(e,{abortSignal:t.abortSignal,tracingOptions:r.tracingOptions}))))}async getStatistics(e={}){return tracingClient.withSpan("BlobServiceClient-getStatistics",e,(async t=>assertResponse(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async getAccountInfo(e={}){return tracingClient.withSpan("BlobServiceClient-getAccountInfo",e,(async t=>assertResponse(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async listContainersSegment(e,t={}){return tracingClient.withSpan("BlobServiceClient-listContainersSegment",t,(async r=>assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({abortSignal:t.abortSignal,marker:e},t),{include:"string"==typeof t.include?[t.include]:t.include,tracingOptions:r.tracingOptions})))))}async findBlobsByTagsSegment(e,t,r={}){return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment",r,(async i=>{const n=assertResponse(await this.serviceContext.filterBlobs({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},n),{_response:n._response,blobs:n.blobs.map((e=>{var t;let r="";return 1===(null===(t=e.tags)||void 0===t?void 0:t.blobTagSet.length)&&(r=e.tags.blobTagSet[0].value),Object.assign(Object.assign({},e),{tags:toTags(e.tags),tagValue:r})}))})}))}findBlobsByTagsSegments(e,t){return __asyncGenerator(this,arguments,(function*(e,t,r={}){let i;if(t||void 0===t)do{i=yield __await(this.findBlobsByTagsSegment(e,t,r)),i.blobs=i.blobs||[],t=i.continuationToken,yield yield __await(i)}while(t)}))}findBlobsByTagsItems(e){return __asyncGenerator(this,arguments,(function*(e,t={}){var r,i,n;try{for(var a,o=!0,s=__asyncValues(this.findBlobsByTagsSegments(e,void 0,t));!(r=(a=yield __await(s.next())).done);o=!0){o=!1;const e=a.value;yield __await(yield*__asyncDelegator(__asyncValues(e.blobs)))}}catch(l){i={error:l}}finally{try{o||r||!(n=s.return)||(yield __await(n.call(s)))}finally{if(i)throw i.error}}}))}findBlobsByTags(e,t={}){const r=Object.assign({},t),i=this.findBlobsByTagsItems(e,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}listSegments(e){return __asyncGenerator(this,arguments,(function*(e,t={}){let r;if(e||void 0===e)do{r=yield __await(this.listContainersSegment(e,t)),r.containerItems=r.containerItems||[],e=r.continuationToken,yield yield __await(yield __await(r))}while(e)}))}listItems(){return __asyncGenerator(this,arguments,(function*(e={}){var t,r,i;try{for(var n,a=!0,o=__asyncValues(this.listSegments(void 0,e));!(t=(n=yield __await(o.next())).done);a=!0){a=!1;const e=n.value;yield __await(yield*__asyncDelegator(__asyncValues(e.containerItems)))}}catch(s){r={error:s}}finally{try{a||t||!(i=o.return)||(yield __await(i.call(o)))}finally{if(r)throw r.error}}}))}listContainers(e={}){""===e.prefix&&(e.prefix=void 0);const t=[];e.includeDeleted&&t.push("deleted"),e.includeMetadata&&t.push("metadata"),e.includeSystem&&t.push("system");const r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{}),i=this.listItems(r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}async getUserDelegationKey(e,t,r={}){return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey",r,(async i=>{const n=assertResponse(await this.serviceContext.getUserDelegationKey({startsOn:truncatedISO8061Date(e,!1),expiresOn:truncatedISO8061Date(t,!1)},{abortSignal:r.abortSignal,tracingOptions:i.tracingOptions}));return Object.assign({_response:n._response,requestId:n.requestId,clientRequestId:n.clientRequestId,version:n.version,date:n.date,errorCode:n.errorCode},{signedObjectId:n.signedObjectId,signedTenantId:n.signedTenantId,signedStartsOn:new Date(n.signedStartsOn),signedExpiresOn:new Date(n.signedExpiresOn),signedService:n.signedService,signedVersion:n.signedVersion,value:n.value})}))}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");void 0===e&&(e=new Date((new Date).getTime()+36e5));const n=""+generateAccountSASQueryParameters(Object.assign({permissions:t,expiresOn:e,resourceTypes:r,services:""+AccountSASServices.parse("b")},i),this.credential);return appendToURLQuery(this.url,n)}}(KnownEncryptionAlgorithmType||(KnownEncryptionAlgorithmType={})).AES256="AES256";const src=Object.freeze(Object.defineProperty({__proto__:null,AccountSASPermissions:AccountSASPermissions,AccountSASResourceTypes:AccountSASResourceTypes,AccountSASServices:AccountSASServices,AnonymousCredential:AnonymousCredential,AnonymousCredentialPolicy:AnonymousCredentialPolicy,AppendBlobClient:AppendBlobClient,BaseRequestPolicy:BaseRequestPolicy,BlobBatch:BlobBatch,BlobBatchClient:BlobBatchClient,BlobClient:BlobClient,BlobLeaseClient:BlobLeaseClient,BlobSASPermissions:BlobSASPermissions,BlobServiceClient:BlobServiceClient,BlockBlobClient:BlockBlobClient,get BlockBlobTier(){return BlockBlobTier},ContainerClient:ContainerClient,ContainerSASPermissions:ContainerSASPermissions,Credential:Credential,CredentialPolicy:CredentialPolicy,get KnownEncryptionAlgorithmType(){return KnownEncryptionAlgorithmType},PageBlobClient:PageBlobClient,Pipeline:Pipeline,get PremiumPageBlobTier(){return PremiumPageBlobTier},RestError:RestError,get SASProtocol(){return SASProtocol},SASQueryParameters:SASQueryParameters,get StorageBlobAudience(){return StorageBlobAudience},StorageBrowserPolicy:StorageBrowserPolicy,StorageBrowserPolicyFactory:StorageBrowserPolicyFactory,StorageOAuthScopes:StorageOAuthScopes,StorageRetryPolicy:StorageRetryPolicy,StorageRetryPolicyFactory:StorageRetryPolicyFactory,get StorageRetryPolicyType(){return StorageRetryPolicyType$1},StorageSharedKeyCredential:StorageSharedKeyCredential,StorageSharedKeyCredentialPolicy:StorageSharedKeyCredentialPolicy,generateAccountSASQueryParameters:generateAccountSASQueryParameters,generateBlobSASQueryParameters:generateBlobSASQueryParameters,getBlobServiceAccountAudience:getBlobServiceAccountAudience,isPipelineLike:isPipelineLike,logger:logger,newPipeline:newPipeline},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(src);var requestUtils={},__createBinding$5=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$5=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$5=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$5(t,e,r);return __setModuleDefault$5(t,e),t},__awaiter$4=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(requestUtils,"__esModule",{value:!0}),requestUtils.retryHttpClientResponse=requestUtils.retryTypedResponse=requestUtils.retry=requestUtils.isRetryableStatusCode=requestUtils.isServerErrorStatusCode=requestUtils.isSuccessStatusCode=void 0;const core$4=__importStar$5(requireCore()),http_client_1$2=require$$1$3,constants_1$2=constants;requestUtils.isSuccessStatusCode=isSuccessStatusCode,requestUtils.isServerErrorStatusCode=isServerErrorStatusCode,requestUtils.isRetryableStatusCode=isRetryableStatusCode,requestUtils.retry=retry,requestUtils.retryTypedResponse=retryTypedResponse,requestUtils.retryHttpClientResponse=retryHttpClientResponse;const require$$10=getAugmentedNamespace(src$1);var __createBinding$4=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$4=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$4=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$4(t,e,r);return __setModuleDefault$4(t,e),t},__awaiter$3=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(downloadUtils,"__esModule",{value:!0}),downloadUtils.downloadCacheStorageSDK=downloadUtils.downloadCacheHttpClientConcurrent=downloadUtils.downloadCacheHttpClient=downloadUtils.DownloadProgress=void 0;const core$3=__importStar$4(requireCore()),http_client_1$1=require$$1$3,storage_blob_1=require$$2,buffer=__importStar$4(require$$0$5),fs$1=__importStar$4(fs__default),stream$1=__importStar$4(require$$0$2),util=__importStar$4(require$$9__default),utils$3=__importStar$4(cacheUtils),constants_1$1=constants,requestUtils_1$1=requestUtils,abort_controller_1=require$$10;class DownloadProgress{constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,core$3.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,t=(e/this.contentLength*100).toFixed(1),r=Date.now()-this.startTime;core$3.info(`Received ${e} of ${this.contentLength} (${t}%), ${(e/1048576/(r/1e3)).toFixed(1)} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const t=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(t,e))};this.timeoutHandle=setTimeout(t,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}}downloadUtils.DownloadProgress=DownloadProgress,downloadUtils.downloadCacheHttpClient=downloadCacheHttpClient,downloadUtils.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent,downloadUtils.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>__awaiter$3(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),e)))}));var options={},__createBinding$3=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$3=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$3=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$3(t,e,r);return __setModuleDefault$3(t,e),t};Object.defineProperty(options,"__esModule",{value:!0}),options.getDownloadOptions=options.getUploadOptions=void 0;const core$2=__importStar$3(requireCore());options.getUploadOptions=getUploadOptions,options.getDownloadOptions=getDownloadOptions;var __createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$2(t,e,r);return __setModuleDefault$2(t,e),t},__awaiter$2=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(cacheHttpClient$1,"__esModule",{value:!0}),cacheHttpClient$1.saveCache=cacheHttpClient$1.reserveCache=cacheHttpClient$1.downloadCache=cacheHttpClient$1.getCacheEntry=cacheHttpClient$1.getCacheVersion=void 0;const core$1=__importStar$2(requireCore()),http_client_1=require$$1$3,auth_1=auth,crypto=__importStar$2(crypto$1),fs=__importStar$2(fs__default),url_1=require$$5,utils$2=__importStar$2(cacheUtils),downloadUtils_1=downloadUtils,options_1=options,requestUtils_1=requestUtils,versionSalt="1.0";cacheHttpClient$1.getCacheVersion=getCacheVersion,cacheHttpClient$1.getCacheEntry=getCacheEntry,cacheHttpClient$1.downloadCache=downloadCache,cacheHttpClient$1.reserveCache=reserveCache,cacheHttpClient$1.saveCache=saveCache$1;var tar={},__createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding$1(t,e,r);return __setModuleDefault$1(t,e),t},__awaiter$1=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(tar,"__esModule",{value:!0}),tar.createTar=tar.extractTar=tar.listTar=void 0;const exec_1=exec$1,io=__importStar$1(io$3),fs_1=fs__default,path$1=__importStar$1(path__default),utils$1=__importStar$1(cacheUtils),constants_1=constants,IS_WINDOWS$1="win32"===process.platform;tar.listTar=listTar,tar.extractTar=extractTar,tar.createTar=createTar;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(cache,"__esModule",{value:!0}),cache.saveCache=cache.restoreCache=cache.isFeatureAvailable=cache.ReserveCacheError=cache.ValidationError=void 0;const core=__importStar(requireCore()),path=__importStar(path__default),utils=__importStar(cacheUtils),cacheHttpClient=__importStar(cacheHttpClient$1),tar_1=tar;class ValidationError extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,ValidationError.prototype)}}cache.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,ReserveCacheError.prototype)}}cache.ReserveCacheError=ReserveCacheError,cache.isFeatureAvailable=isFeatureAvailable,cache.restoreCache=restoreCache,cache.saveCache=saveCache;var parse={exports:{}},tomlParser={exports:{}};const ParserEND=1114112;class ParserError extends Error{constructor(e,t,r){super("[ParserError] "+e,t,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,ParserError)}}class State{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class Parser{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new State(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=e+"",this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this._buf.length>this.ii}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let e;this.char=ParserEND;do{e=this.state.parser,this.runOne()}while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if("function"!=typeof e)throw new ParserError("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new State(e)}callNow(e,t){return this.call(e,t),this.runOne()}return(e){if(0===this.stack.length)throw this.error(new ParserError("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===ParserEND)throw this.error(new ParserError("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new ParserError("Must declare a parseStart method")}}Parser.END=ParserEND,Parser.Error=ParserError;var parser=Parser,createDatetime=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t},formatNum=(e,t)=>{for(t+="";e>t.length;)t="0"+t;return t};const f$2=formatNum;class FloatingDateTime extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${f$2(2,this.getUTCMonth()+1)}-${f$2(2,this.getUTCDate())}T${f$2(2,this.getUTCHours())}:${f$2(2,this.getUTCMinutes())}:${f$2(2,this.getUTCSeconds())}.${f$2(3,this.getUTCMilliseconds())}`}}var createDatetimeFloat=e=>{const t=new FloatingDateTime(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t};const f$1=formatNum,DateTime=commonjsGlobal.Date;let Date$1=class extends DateTime{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${f$1(2,this.getUTCMonth()+1)}-${f$1(2,this.getUTCDate())}`}};var createDate$1=e=>{const t=new Date$1(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t};const f=formatNum;class Time extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${f(2,this.getUTCHours())}:${f(2,this.getUTCMinutes())}:${f(2,this.getUTCSeconds())}.${f(3,this.getUTCMilliseconds())}`}}var createTime$1=e=>{const t=new Time(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t};tomlParser.exports=makeParserClass(parser),tomlParser.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=e=>{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},tomlParser.exports.TomlError=TomlError;const createDateTime=createDatetime,createDateTimeFloat=createDatetimeFloat,createDate=createDate$1,createTime=createTime$1,CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"},_type=Symbol(),_declared=Symbol(),hasOwnProperty={}.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0},INLINE_TABLE=Symbol(),TABLE=Symbol(),_contentType=Symbol(),INLINE_LIST=Symbol(),LIST=Symbol();let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=commonjsGlobal.BigInt.asIntN(64,e)}catch(_){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return this.value+""}[_inspect](){return`[BigInt: ${""+this}]}`}valueOf(){return this.value}}const INTEGER=Symbol(),FLOAT=Symbol();var tomlParserExports=tomlParser.exports,parsePrettyError=prettyError$2,parseString_1=parseString;const TOMLParser$2=tomlParserExports,prettyError$1=parsePrettyError;var parseAsync_1=parseAsync;const TOMLParser$1=tomlParserExports,prettyError=parsePrettyError;var parseStream_1=parseStream;const stream=require$$0$2,TOMLParser=tomlParserExports;parse.exports=parseString_1,parse.exports.async=parseAsync_1,parse.exports.stream=parseStream_1,parse.exports.prettyError=parsePrettyError;var stringify$1={exports:{}};stringify$1.exports=stringify,stringify$1.exports.value=stringifyInline;const IS_WINDOWS="win32"===process.platform,IS_LINUX="linux"===process.platform,IS_MAC="darwin"===process.platform,WINDOWS_ARCHS=["x86","x64"],WINDOWS_PLATFORMS=["win32","win64"],PYPY_VERSION_FILE="PYPY_VERSION",TOKEN=coreExports.getInput("token"),AUTH=TOKEN?"token "+TOKEN:void 0,MANIFEST_REPO_OWNER="actions",MANIFEST_REPO_NAME="python-versions",MANIFEST_REPO_BRANCH="main",MANIFEST_URL=`https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`,dirname="string"==typeof __dirname?__dirname:path__default.dirname(fileURLToPath(import.meta.url)),checkLatest=!1;export{setupActionsPython};
|
||
//# sourceMappingURL=actions_python-ED6yYGxu.mjs.map
|