"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/semver/internal/constants.js var require_constants = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; module2.exports = { MAX_LENGTH, MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_SAFE_INTEGER, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; } }); // node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports2, module2) { "use strict"; var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug; } }); // node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports2, module2) { "use strict"; var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants(); var debug = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var safeSrc = exports2.safeSrc = []; var t = exports2.t = {}; var R = 0; var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; var makeSafeRegex = /* @__PURE__ */ __name((value) => { for (const [token, max] of safeRegexReplacements) { value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); } return value; }, "makeSafeRegex"); var createToken = /* @__PURE__ */ __name((name, value, isGlobal) => { const safe = makeSafeRegex(value); const index = R++; debug(name, index, value); t[name] = index; src[index] = value; safeSrc[index] = safe; re[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }, "createToken"); createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); createToken("FULL", `^${src[t.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); createToken("COERCERTL", src[t.COERCE], true); createToken("COERCERTLFULL", src[t.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); exports2.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); exports2.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); exports2.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); } }); // node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports2, module2) { "use strict"; var looseOption = Object.freeze({ loose: true }); var emptyOpts = Object.freeze({}); var parseOptions = /* @__PURE__ */ __name((options) => { if (!options) { return emptyOpts; } if (typeof options !== "object") { return looseOption; } return options; }, "parseOptions"); module2.exports = parseOptions; } }); // node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports2, module2) { "use strict"; var numeric = /^[0-9]+$/; var compareIdentifiers = /* @__PURE__ */ __name((a, b) => { if (typeof a === "number" && typeof b === "number") { return a === b ? 0 : a < b ? -1 : 1; } const anum = numeric.test(a); const bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }, "compareIdentifiers"); var rcompareIdentifiers = /* @__PURE__ */ __name((a, b) => compareIdentifiers(b, a), "rcompareIdentifiers"); module2.exports = { compareIdentifiers, rcompareIdentifiers }; } }); // node_modules/semver/classes/semver.js var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var SemVer = class _SemVer { static { __name(this, "SemVer"); } constructor(version, options) { options = parseOptions(options); if (version instanceof _SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { return version; } else { version = version.version; } } else if (typeof version !== "string") { throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); } if (version.length > MAX_LENGTH) { throw new TypeError( `version is longer than ${MAX_LENGTH} characters` ); } debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError(`Invalid Version: ${version}`); } this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map((id) => { if (/^[0-9]+$/.test(id)) { const num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } format() { this.version = `${this.major}.${this.minor}.${this.patch}`; if (this.prerelease.length) { this.version += `-${this.prerelease.join(".")}`; } return this.version; } toString() { return this.version; } compare(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof _SemVer)) { if (typeof other === "string" && other === this.version) { return 0; } other = new _SemVer(other, this.options); } if (other.version === this.version) { return 0; } return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } if (this.major < other.major) { return -1; } if (this.major > other.major) { return 1; } if (this.minor < other.minor) { return -1; } if (this.minor > other.minor) { return 1; } if (this.patch < other.patch) { return -1; } if (this.patch > other.patch) { return 1; } return 0; } comparePre(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } let i = 0; do { const a = this.prerelease[i]; const b = other.prerelease[i]; debug("prerelease compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } compareBuild(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } let i = 0; do { const a = this.build[i]; const b = other.build[i]; debug("build compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. inc(release, identifier, identifierBase) { if (release.startsWith("pre")) { if (!identifier && identifierBase === false) { throw new Error("invalid increment argument: identifier is empty"); } if (identifier) { const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); if (!match || match[1] !== identifier) { throw new Error(`invalid identifier: ${identifier}`); } } } switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier, identifierBase); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier, identifierBase); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier, identifierBase); this.inc("pre", identifier, identifierBase); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier, identifierBase); } this.inc("pre", identifier, identifierBase); break; case "release": if (this.prerelease.length === 0) { throw new Error(`version ${this.raw} is not a prerelease`); } this.prerelease.length = 0; break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": { const base = Number(identifierBase) ? 1 : 0; if (this.prerelease.length === 0) { this.prerelease = [base]; } else { let i = this.prerelease.length; while (--i >= 0) { if (typeof this.prerelease[i] === "number") { this.prerelease[i]++; i = -2; } } if (i === -1) { if (identifier === this.prerelease.join(".") && identifierBase === false) { throw new Error("invalid increment argument: identifier already exists"); } this.prerelease.push(base); } } if (identifier) { let prerelease = [identifier, base]; if (identifierBase === false) { prerelease = [identifier]; } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = prerelease; } } else { this.prerelease = prerelease; } } break; } default: throw new Error(`invalid increment argument: ${release}`); } this.raw = this.format(); if (this.build.length) { this.raw += `+${this.build.join(".")}`; } return this; } }; module2.exports = SemVer; } }); // node_modules/semver/functions/parse.js var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var parse = /* @__PURE__ */ __name((version, options, throwErrors = false) => { if (version instanceof SemVer) { return version; } try { return new SemVer(version, options); } catch (er) { if (!throwErrors) { return null; } throw er; } }, "parse"); module2.exports = parse; } }); // node_modules/semver/functions/valid.js var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; var parse = require_parse(); var valid = /* @__PURE__ */ __name((version, options) => { const v = parse(version, options); return v ? v.version : null; }, "valid"); module2.exports = valid; } }); // node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; var parse = require_parse(); var clean = /* @__PURE__ */ __name((version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }, "clean"); module2.exports = clean; } }); // node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var inc = /* @__PURE__ */ __name((version, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { return new SemVer( version instanceof SemVer ? version.version : version, options ).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }, "inc"); module2.exports = inc; } }); // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; var parse = require_parse(); var diff = /* @__PURE__ */ __name((version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) { return null; } const v1Higher = comparison > 0; const highVersion = v1Higher ? v1 : v2; const lowVersion = v1Higher ? v2 : v1; const highHasPre = !!highVersion.prerelease.length; const lowHasPre = !!lowVersion.prerelease.length; if (lowHasPre && !highHasPre) { if (!lowVersion.patch && !lowVersion.minor) { return "major"; } if (lowVersion.compareMain(highVersion) === 0) { if (lowVersion.minor && !lowVersion.patch) { return "minor"; } return "patch"; } } const prefix = highHasPre ? "pre" : ""; if (v1.major !== v2.major) { return prefix + "major"; } if (v1.minor !== v2.minor) { return prefix + "minor"; } if (v1.patch !== v2.patch) { return prefix + "patch"; } return "prerelease"; }, "diff"); module2.exports = diff; } }); // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var major = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major"); module2.exports = major; } }); // node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/semver/functions/minor.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var minor = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).minor, "minor"); module2.exports = minor; } }); // node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/semver/functions/patch.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var patch = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).patch, "patch"); module2.exports = patch; } }); // node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; var parse = require_parse(); var prerelease = /* @__PURE__ */ __name((version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }, "prerelease"); module2.exports = prerelease; } }); // node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var compare = /* @__PURE__ */ __name((a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)), "compare"); module2.exports = compare; } }); // node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/semver/functions/rcompare.js"(exports2, module2) { "use strict"; var compare = require_compare(); var rcompare = /* @__PURE__ */ __name((a, b, loose) => compare(b, a, loose), "rcompare"); module2.exports = rcompare; } }); // node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ "node_modules/semver/functions/compare-loose.js"(exports2, module2) { "use strict"; var compare = require_compare(); var compareLoose = /* @__PURE__ */ __name((a, b) => compare(a, b, true), "compareLoose"); module2.exports = compareLoose; } }); // node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/semver/functions/compare-build.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var compareBuild = /* @__PURE__ */ __name((a, b, loose) => { const versionA = new SemVer(a, loose); const versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }, "compareBuild"); module2.exports = compareBuild; } }); // node_modules/semver/functions/sort.js var require_sort = __commonJS({ "node_modules/semver/functions/sort.js"(exports2, module2) { "use strict"; var compareBuild = require_compare_build(); var sort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(a, b, loose)), "sort"); module2.exports = sort; } }); // node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ "node_modules/semver/functions/rsort.js"(exports2, module2) { "use strict"; var compareBuild = require_compare_build(); var rsort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(b, a, loose)), "rsort"); module2.exports = rsort; } }); // node_modules/semver/functions/gt.js var require_gt = __commonJS({ "node_modules/semver/functions/gt.js"(exports2, module2) { "use strict"; var compare = require_compare(); var gt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) > 0, "gt"); module2.exports = gt; } }); // node_modules/semver/functions/lt.js var require_lt = __commonJS({ "node_modules/semver/functions/lt.js"(exports2, module2) { "use strict"; var compare = require_compare(); var lt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) < 0, "lt"); module2.exports = lt; } }); // node_modules/semver/functions/eq.js var require_eq = __commonJS({ "node_modules/semver/functions/eq.js"(exports2, module2) { "use strict"; var compare = require_compare(); var eq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) === 0, "eq"); module2.exports = eq; } }); // node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/semver/functions/neq.js"(exports2, module2) { "use strict"; var compare = require_compare(); var neq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) !== 0, "neq"); module2.exports = neq; } }); // node_modules/semver/functions/gte.js var require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports2, module2) { "use strict"; var compare = require_compare(); var gte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) >= 0, "gte"); module2.exports = gte; } }); // node_modules/semver/functions/lte.js var require_lte = __commonJS({ "node_modules/semver/functions/lte.js"(exports2, module2) { "use strict"; var compare = require_compare(); var lte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) <= 0, "lte"); module2.exports = lte; } }); // node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ "node_modules/semver/functions/cmp.js"(exports2, module2) { "use strict"; var eq = require_eq(); var neq = require_neq(); var gt = require_gt(); var gte = require_gte(); var lt = require_lt(); var lte = require_lte(); var cmp = /* @__PURE__ */ __name((a, op, b, loose) => { switch (op) { case "===": if (typeof a === "object") { a = a.version; } if (typeof b === "object") { b = b.version; } return a === b; case "!==": if (typeof a === "object") { a = a.version; } if (typeof b === "object") { b = b.version; } return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }, "cmp"); module2.exports = cmp; } }); // node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var parse = require_parse(); var { safeRe: re, t } = require_re(); var coerce = /* @__PURE__ */ __name((version, options) => { if (version instanceof SemVer) { return version; } if (typeof version === "number") { version = String(version); } if (typeof version !== "string") { return null; } options = options || {}; let match = null; if (!options.rtl) { match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; let next; while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } const major = match[2]; const minor = match[3] || "0"; const patch = match[4] || "0"; const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options); }, "coerce"); module2.exports = coerce; } }); // node_modules/semver/internal/lrucache.js var require_lrucache = __commonJS({ "node_modules/semver/internal/lrucache.js"(exports2, module2) { "use strict"; var LRUCache = class { static { __name(this, "LRUCache"); } constructor() { this.max = 1e3; this.map = /* @__PURE__ */ new Map(); } get(key) { const value = this.map.get(key); if (value === void 0) { return void 0; } else { this.map.delete(key); this.map.set(key, value); return value; } } delete(key) { return this.map.delete(key); } set(key, value) { const deleted = this.delete(key); if (!deleted && value !== void 0) { if (this.map.size >= this.max) { const firstKey = this.map.keys().next().value; this.delete(firstKey); } this.map.set(key, value); } return this; } }; module2.exports = LRUCache; } }); // node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/semver/classes/range.js"(exports2, module2) { "use strict"; var SPACE_CHARACTERS = /\s+/g; var Range = class _Range { static { __name(this, "Range"); } constructor(range, options) { options = parseOptions(options); if (range instanceof _Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new _Range(range.raw, options); } } if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; this.formatted = void 0; return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range.trim().replace(SPACE_CHARACTERS, " "); this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${this.raw}`); } if (this.set.length > 1) { const first = this.set[0]; this.set = this.set.filter((c) => !isNullSet(c[0])); if (this.set.length === 0) { this.set = [first]; } else if (this.set.length > 1) { for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { this.set = [c]; break; } } } } this.formatted = void 0; } get range() { if (this.formatted === void 0) { this.formatted = ""; for (let i = 0; i < this.set.length; i++) { if (i > 0) { this.formatted += "||"; } const comps = this.set[i]; for (let k = 0; k < comps.length; k++) { if (k > 0) { this.formatted += " "; } this.formatted += comps[k].toString().trim(); } } } return this.formatted; } format() { return this.range; } toString() { return this.range; } parseRange(range) { const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); const memoKey = memoOpts + ":" + range; const cached = cache2.get(memoKey); if (cached) { return cached; } const loose = this.options.loose; const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); debug("hyphen replace", range); range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range); range = range.replace(re[t.TILDETRIM], tildeTrimReplace); debug("tilde trim", range); range = range.replace(re[t.CARETTRIM], caretTrimReplace); debug("caret trim", range); let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) { rangeList = rangeList.filter((comp) => { debug("loose invalid filter", comp, this.options); return !!comp.match(re[t.COMPARATORLOOSE]); }); } debug("range list", rangeList); const rangeMap = /* @__PURE__ */ new Map(); const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); for (const comp of comparators) { if (isNullSet(comp)) { return [comp]; } rangeMap.set(comp.value, comp); } if (rangeMap.size > 1 && rangeMap.has("")) { rangeMap.delete(""); } const result = [...rangeMap.values()]; cache2.set(memoKey, result); return result; } intersects(range, options) { if (!(range instanceof _Range)) { throw new TypeError("a Range is required"); } return this.set.some((thisComparators) => { return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); }); }); }); }); } // if ANY of the sets match ALL of its comparators, then pass test(version) { if (!version) { return false; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } for (let i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true; } } return false; } }; module2.exports = Range; var LRU = require_lrucache(); var cache2 = new LRU(); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug = require_debug(); var SemVer = require_semver(); var { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); var isNullSet = /* @__PURE__ */ __name((c) => c.value === "<0.0.0-0", "isNullSet"); var isAny = /* @__PURE__ */ __name((c) => c.value === "", "isAny"); var isSatisfiable = /* @__PURE__ */ __name((comparators, options) => { let result = true; const remainingComparators = comparators.slice(); let testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; }, "isSatisfiable"); var parseComparator = /* @__PURE__ */ __name((comp, options) => { comp = comp.replace(re[t.BUILD], ""); debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; }, "parseComparator"); var isX = /* @__PURE__ */ __name((id) => !id || id.toLowerCase() === "x" || id === "*", "isX"); var replaceTildes = /* @__PURE__ */ __name((comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }, "replaceTildes"); var replaceTilde = /* @__PURE__ */ __name((comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { debug("tilde", comp, _, M, m, p, pr); let ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; } else if (isX(p)) { ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; } else if (pr) { debug("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else { ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; } debug("tilde return", ret); return ret; }); }, "replaceTilde"); var replaceCarets = /* @__PURE__ */ __name((comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); }, "replaceCarets"); var replaceCaret = /* @__PURE__ */ __name((comp, options) => { debug("caret", comp, options); const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { debug("caret", comp, _, M, m, p, pr); let ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; } else if (isX(p)) { if (M === "0") { ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; } else { ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; } else { ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } } else { ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; } else { ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; } } else { ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; } } debug("caret return", ret); return ret; }); }, "replaceCaret"); var replaceXRanges = /* @__PURE__ */ __name((comp, options) => { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); }, "replaceXRanges"); var replaceXRange = /* @__PURE__ */ __name((comp, options) => { comp = comp.trim(); const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug("xRange", comp, ret, gtlt, M, m, p, pr); const xM = isX(M); const xm = xM || isX(m); const xp = xm || isX(p); const anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } if (gtlt === "<") { pr = "-0"; } ret = `${gtlt + M}.${m}.${p}${pr}`; } else if (xm) { ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; } else if (xp) { ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; } debug("xRange return", ret); return ret; }); }, "replaceXRange"); var replaceStars = /* @__PURE__ */ __name((comp, options) => { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); }, "replaceStars"); var replaceGTE0 = /* @__PURE__ */ __name((comp, options) => { debug("replaceGTE0", comp, options); return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }, "replaceGTE0"); var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = `>=${fM}.0.0${incPr ? "-0" : ""}`; } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; } else if (fpr) { from = `>=${from}`; } else { from = `>=${from}${incPr ? "-0" : ""}`; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0`; } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0`; } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}`; } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0`; } else { to = `<=${to}`; } return `${from} ${to}`.trim(); }, "hyphenReplace"); var testSet = /* @__PURE__ */ __name((set, version, options) => { for (let i = 0; i < set.length; i++) { if (!set[i].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { for (let i = 0; i < set.length; i++) { debug(set[i].semver); if (set[i].semver === Comparator.ANY) { continue; } if (set[i].semver.prerelease.length > 0) { const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } } } return false; } return true; }, "testSet"); } }); // node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ "node_modules/semver/classes/comparator.js"(exports2, module2) { "use strict"; var ANY = Symbol("SemVer ANY"); var Comparator = class _Comparator { static { __name(this, "Comparator"); } static get ANY() { return ANY; } constructor(comp, options) { options = parseOptions(options); if (comp instanceof _Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } comp = comp.trim().split(/\s+/).join(" "); debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } parse(comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const m = comp.match(r); if (!m) { throw new TypeError(`Invalid comparator: ${comp}`); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } } toString() { return this.value; } test(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY || version === ANY) { return true; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } return cmp(version, this.operator, this.semver, this.options); } intersects(comp, options) { if (!(comp instanceof _Comparator)) { throw new TypeError("a Comparator is required"); } if (this.operator === "") { if (this.value === "") { return true; } return new Range(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") { return true; } return new Range(this.value, options).test(comp.semver); } options = parseOptions(options); if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { return false; } if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { return false; } if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { return true; } if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { return true; } if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { return true; } if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { return true; } if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { return true; } return false; } }; module2.exports = Comparator; var parseOptions = require_parse_options(); var { safeRe: re, t } = require_re(); var cmp = require_cmp(); var debug = require_debug(); var SemVer = require_semver(); var Range = require_range(); } }); // node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports2, module2) { "use strict"; var Range = require_range(); var satisfies = /* @__PURE__ */ __name((version, range, options) => { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version); }, "satisfies"); module2.exports = satisfies; } }); // node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ "node_modules/semver/ranges/to-comparators.js"(exports2, module2) { "use strict"; var Range = require_range(); var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")), "toComparators"); module2.exports = toComparators; } }); // node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var Range = require_range(); var maxSatisfying = /* @__PURE__ */ __name((versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; }, "maxSatisfying"); module2.exports = maxSatisfying; } }); // node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ "node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var Range = require_range(); var minSatisfying = /* @__PURE__ */ __name((versions, range, options) => { let min = null; let minSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; }, "minSatisfying"); module2.exports = minSatisfying; } }); // node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/semver/ranges/min-version.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var Range = require_range(); var gt = require_gt(); var minVersion = /* @__PURE__ */ __name((range, loose) => { range = new Range(range, loose); let minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { const compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!setMin || gt(compver, setMin)) { setMin = compver; } break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); if (setMin && (!minver || gt(minver, setMin))) { minver = setMin; } } if (minver && range.test(minver)) { return minver; } return null; }, "minVersion"); module2.exports = minVersion; } }); // node_modules/semver/ranges/valid.js var require_valid2 = __commonJS({ "node_modules/semver/ranges/valid.js"(exports2, module2) { "use strict"; var Range = require_range(); var validRange = /* @__PURE__ */ __name((range, options) => { try { return new Range(range, options).range || "*"; } catch (er) { return null; } }, "validRange"); module2.exports = validRange; } }); // node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/semver/ranges/outside.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; var Range = require_range(); var satisfies = require_satisfies(); var gt = require_gt(); var lt = require_lt(); var lte = require_lte(); var gte = require_gte(); var outside = /* @__PURE__ */ __name((version, range, hilo, options) => { version = new SemVer(version, options); range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version, range, options)) { return false; } for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false; } } return true; }, "outside"); module2.exports = outside; } }); // node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports2, module2) { "use strict"; var outside = require_outside(); var gtr = /* @__PURE__ */ __name((version, range, options) => outside(version, range, ">", options), "gtr"); module2.exports = gtr; } }); // node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports2, module2) { "use strict"; var outside = require_outside(); var ltr = /* @__PURE__ */ __name((version, range, options) => outside(version, range, "<", options), "ltr"); module2.exports = ltr; } }); // node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ "node_modules/semver/ranges/intersects.js"(exports2, module2) { "use strict"; var Range = require_range(); var intersects = /* @__PURE__ */ __name((r1, r2, options) => { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2, options); }, "intersects"); module2.exports = intersects; } }); // node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ "node_modules/semver/ranges/simplify.js"(exports2, module2) { "use strict"; var satisfies = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { const set = []; let first = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); for (const version of v) { const included = satisfies(version, range, options); if (included) { prev = version; if (!first) { first = version; } } else { if (prev) { set.push([first, prev]); } prev = null; first = null; } } if (first) { set.push([first, null]); } const ranges = []; for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { ranges.push("*"); } else if (!max) { ranges.push(`>=${min}`); } else if (min === v[0]) { ranges.push(`<=${max}`); } else { ranges.push(`${min} - ${max}`); } } const simplified = ranges.join(" || "); const original = typeof range.raw === "string" ? range.raw : String(range); return simplified.length < original.length ? simplified : range; }; } }); // node_modules/semver/ranges/subset.js var require_subset = __commonJS({ "node_modules/semver/ranges/subset.js"(exports2, module2) { "use strict"; var Range = require_range(); var Comparator = require_comparator(); var { ANY } = Comparator; var satisfies = require_satisfies(); var compare = require_compare(); var subset = /* @__PURE__ */ __name((sub, dom, options = {}) => { if (sub === dom) { return true; } sub = new Range(sub, options); dom = new Range(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options); sawNonNull = sawNonNull || isSub !== null; if (isSub) { continue OUTER; } } if (sawNonNull) { return false; } } return true; }, "subset"); var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; var minimumVersion = [new Comparator(">=0.0.0")]; var simpleSubset = /* @__PURE__ */ __name((sub, dom, options) => { if (sub === dom) { return true; } if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) { return true; } else if (options.includePrerelease) { sub = minimumVersionWithPreRelease; } else { sub = minimumVersion; } } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) { return true; } else { dom = minimumVersion; } } const eqSet = /* @__PURE__ */ new Set(); let gt, lt; for (const c of sub) { if (c.operator === ">" || c.operator === ">=") { gt = higherGT(gt, c, options); } else if (c.operator === "<" || c.operator === "<=") { lt = lowerLT(lt, c, options); } else { eqSet.add(c.semver); } } if (eqSet.size > 1) { return null; } let gtltComp; if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options); if (gtltComp > 0) { return null; } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { return null; } } for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) { return null; } if (lt && !satisfies(eq, String(lt), options)) { return null; } for (const c of dom) { if (!satisfies(eq, String(c), options)) { return false; } } return true; } let higher, lower; let hasDomLT, hasDomGT; let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false; } for (const c of dom) { hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { needDomGTPre = false; } } if (c.operator === ">" || c.operator === ">=") { higher = higherGT(gt, c, options); if (higher === c && higher !== gt) { return false; } } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { return false; } } if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { needDomLTPre = false; } } if (c.operator === "<" || c.operator === "<=") { lower = lowerLT(lt, c, options); if (lower === c && lower !== lt) { return false; } } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { return false; } } if (!c.operator && (lt || gt) && gtltComp !== 0) { return false; } } if (gt && hasDomLT && !lt && gtltComp !== 0) { return false; } if (lt && hasDomGT && !gt && gtltComp !== 0) { return false; } if (needDomGTPre || needDomLTPre) { return false; } return true; }, "simpleSubset"); var higherGT = /* @__PURE__ */ __name((a, b, options) => { if (!a) { return b; } const comp = compare(a.semver, b.semver, options); return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }, "higherGT"); var lowerLT = /* @__PURE__ */ __name((a, b, options) => { if (!a) { return b; } const comp = compare(a.semver, b.semver, options); return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }, "lowerLT"); module2.exports = subset; } }); // node_modules/semver/index.js var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); var constants = require_constants(); var SemVer = require_semver(); var identifiers = require_identifiers(); var parse = require_parse(); var valid = require_valid(); var clean = require_clean(); var inc = require_inc(); var diff = require_diff(); var major = require_major(); var minor = require_minor(); var patch = require_patch(); var prerelease = require_prerelease(); var compare = require_compare(); var rcompare = require_rcompare(); var compareLoose = require_compare_loose(); var compareBuild = require_compare_build(); var sort = require_sort(); var rsort = require_rsort(); var gt = require_gt(); var lt = require_lt(); var eq = require_eq(); var neq = require_neq(); var gte = require_gte(); var lte = require_lte(); var cmp = require_cmp(); var coerce = require_coerce(); var Comparator = require_comparator(); var Range = require_range(); var satisfies = require_satisfies(); var toComparators = require_to_comparators(); var maxSatisfying = require_max_satisfying(); var minSatisfying = require_min_satisfying(); var minVersion = require_min_version(); var validRange = require_valid2(); var outside = require_outside(); var gtr = require_gtr(); var ltr = require_ltr(); var intersects = require_intersects(); var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { parse, valid, clean, inc, diff, major, minor, patch, prerelease, compare, rcompare, compareLoose, compareBuild, sort, rsort, gt, lt, eq, neq, gte, lte, cmp, coerce, Comparator, Range, satisfies, toComparators, maxSatisfying, minSatisfying, minVersion, validRange, outside, gtr, ltr, intersects, simplifyRange, subset, SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, RELEASE_TYPES: constants.RELEASE_TYPES, compareIdentifiers: identifiers.compareIdentifiers, rcompareIdentifiers: identifiers.rcompareIdentifiers }; } }); // node_modules/@actions/core/lib/utils.js var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toCommandProperties = exports2.toCommandValue = void 0; function toCommandValue(input) { if (input === null || input === void 0) { return ""; } else if (typeof input === "string" || input instanceof String) { return input; } return JSON.stringify(input); } __name(toCommandValue, "toCommandValue"); exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; } return { title: annotationProperties.title, file: annotationProperties.file, line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, endColumn: annotationProperties.endColumn }; } __name(toCommandProperties, "toCommandProperties"); exports2.toCommandProperties = toCommandProperties; } }); // node_modules/@actions/core/lib/command.js var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } __name(issueCommand, "issueCommand"); exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } __name(issue, "issue"); exports2.issue = issue; var CMD_STRING = "::"; var Command = class { static { __name(this, "Command"); } constructor(command, properties, message) { if (!command) { command = "missing.command"; } this.command = command; this.properties = properties; this.message = message; } toString() { let cmdStr = CMD_STRING + this.command; if (this.properties && Object.keys(this.properties).length > 0) { cmdStr += " "; let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { const val = this.properties[key]; if (val) { if (first) { first = false; } else { cmdStr += ","; } cmdStr += `${key}=${escapeProperty(val)}`; } } } } cmdStr += `${CMD_STRING}${escapeData(this.message)}`; return cmdStr; } }; function escapeData(s) { return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } __name(escapeData, "escapeData"); function escapeProperty(s) { return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } __name(escapeProperty, "escapeProperty"); } }); // node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto2 = __importStar2(require("crypto")); var fs = __importStar2(require("fs")); var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { encoding: "utf8" }); } __name(issueFileCommand, "issueFileCommand"); exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } __name(prepareKeyValueMessage, "prepareKeyValueMessage"); exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); // node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.checkBypass = exports2.getProxyUrl = void 0; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { return void 0; } const proxyVar = (() => { if (usingSsl) { return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; } else { return process.env["http_proxy"] || process.env["HTTP_PROXY"]; } })(); if (proxyVar) { try { return new DecodedURL(proxyVar); } catch (_a) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } } else { return void 0; } } __name(getProxyUrl, "getProxyUrl"); exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } const reqHost = reqUrl.hostname; if (isLoopbackAddress(reqHost)) { return true; } const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; if (!noProxy) { return false; } let reqPort; if (reqUrl.port) { reqPort = Number(reqUrl.port); } else if (reqUrl.protocol === "http:") { reqPort = 80; } else if (reqUrl.protocol === "https:") { reqPort = 443; } const upperReqHosts = [reqUrl.hostname.toUpperCase()]; if (typeof reqPort === "number") { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { return true; } } return false; } __name(checkBypass, "checkBypass"); exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } __name(isLoopbackAddress, "isLoopbackAddress"); var DecodedURL = class extends URL { static { __name(this, "DecodedURL"); } constructor(url, base) { super(url, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } get username() { return this._decodedUsername; } get password() { return this._decodedPassword; } }; } }); // node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ "node_modules/tunnel/lib/tunnel.js"(exports2) { "use strict"; var net = require("net"); var tls = require("tls"); var http = require("http"); var https = require("https"); var events = require("events"); var assert = require("assert"); var util = require("util"); exports2.httpOverHttp = httpOverHttp; exports2.httpsOverHttp = httpsOverHttp; exports2.httpOverHttps = httpOverHttps; exports2.httpsOverHttps = httpsOverHttps; function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; } __name(httpOverHttp, "httpOverHttp"); function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } __name(httpsOverHttp, "httpsOverHttp"); function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } __name(httpOverHttps, "httpOverHttps"); function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } __name(httpsOverHttps, "httpsOverHttps"); function TunnelingAgent(options) { var self2 = this; self2.options = options || {}; self2.proxyOptions = self2.options.proxy || {}; self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; self2.requests = []; self2.sockets = []; self2.on("free", /* @__PURE__ */ __name(function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); for (var i = 0, len = self2.requests.length; i < len; ++i) { var pending = self2.requests[i]; if (pending.host === options2.host && pending.port === options2.port) { self2.requests.splice(i, 1); pending.request.onSocket(socket); return; } } socket.destroy(); self2.removeSocket(socket); }, "onFree")); } __name(TunnelingAgent, "TunnelingAgent"); util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = /* @__PURE__ */ __name(function addRequest(req, host, port, localAddress) { var self2 = this; var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); if (self2.sockets.length >= this.maxSockets) { self2.requests.push(options); return; } self2.createSocket(options, function(socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); req.onSocket(socket); function onFree() { self2.emit("free", socket, options); } __name(onFree, "onFree"); function onCloseOrRemove(err) { self2.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); } __name(onCloseOrRemove, "onCloseOrRemove"); }); }, "addRequest"); TunnelingAgent.prototype.createSocket = /* @__PURE__ */ __name(function createSocket(options, cb) { var self2 = this; var placeholder = {}; self2.sockets.push(placeholder); var connectOptions = mergeOptions({}, self2.proxyOptions, { method: "CONNECT", path: options.host + ":" + options.port, agent: false, headers: { host: options.host + ":" + options.port } }); if (options.localAddress) { connectOptions.localAddress = options.localAddress; } if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug("making CONNECT request"); var connectReq = self2.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); connectReq.once("upgrade", onUpgrade); connectReq.once("connect", onConnect); connectReq.once("error", onError); connectReq.end(); function onResponse(res) { res.upgrade = true; } __name(onResponse, "onResponse"); function onUpgrade(res, socket, head) { process.nextTick(function() { onConnect(res, socket, head); }); } __name(onUpgrade, "onUpgrade"); function onConnect(res, socket, head) { connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { debug( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug("got illegal response body from proxy"); socket.destroy(); var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); return; } debug("tunneling connection has established"); self2.sockets[self2.sockets.indexOf(placeholder)] = socket; return cb(socket); } __name(onConnect, "onConnect"); function onError(cause) { connectReq.removeAllListeners(); debug( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); } __name(onError, "onError"); }, "createSocket"); TunnelingAgent.prototype.removeSocket = /* @__PURE__ */ __name(function removeSocket(socket) { var pos = this.sockets.indexOf(socket); if (pos === -1) { return; } this.sockets.splice(pos, 1); var pending = this.requests.shift(); if (pending) { this.createSocket(pending, function(socket2) { pending.request.onSocket(socket2); }); } }, "removeSocket"); function createSecureSocket(options, cb) { var self2 = this; TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { var hostHeader = options.request.getHeader("host"); var tlsOptions = mergeOptions({}, self2.options, { socket, servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host }); var secureSocket = tls.connect(0, tlsOptions); self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; cb(secureSocket); }); } __name(createSecureSocket, "createSecureSocket"); function toOptions(host, port, localAddress) { if (typeof host === "string") { return { host, port, localAddress }; } return host; } __name(toOptions, "toOptions"); function mergeOptions(target) { for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i]; if (typeof overrides === "object") { var keys = Object.keys(overrides); for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { var k = keys[j]; if (overrides[k] !== void 0) { target[k] = overrides[k]; } } } } return target; } __name(mergeOptions, "mergeOptions"); var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; } else { args.unshift("TUNNEL:"); } console.error.apply(console, args); }, "debug"); } else { debug = /* @__PURE__ */ __name(function() { }, "debug"); } exports2.debug = debug; } }); // node_modules/tunnel/index.js var require_tunnel2 = __commonJS({ "node_modules/tunnel/index.js"(exports2, module2) { module2.exports = require_tunnel(); } }); // node_modules/undici/lib/core/symbols.js var require_symbols = __commonJS({ "node_modules/undici/lib/core/symbols.js"(exports2, module2) { module2.exports = { kClose: Symbol("close"), kDestroy: Symbol("destroy"), kDispatch: Symbol("dispatch"), kUrl: Symbol("url"), kWriting: Symbol("writing"), kResuming: Symbol("resuming"), kQueue: Symbol("queue"), kConnect: Symbol("connect"), kConnecting: Symbol("connecting"), kHeadersList: Symbol("headers list"), kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), kKeepAliveTimeoutValue: Symbol("keep alive timeout"), kKeepAlive: Symbol("keep alive"), kHeadersTimeout: Symbol("headers timeout"), kBodyTimeout: Symbol("body timeout"), kServerName: Symbol("server name"), kLocalAddress: Symbol("local address"), kHost: Symbol("host"), kNoRef: Symbol("no ref"), kBodyUsed: Symbol("used"), kRunning: Symbol("running"), kBlocking: Symbol("blocking"), kPending: Symbol("pending"), kSize: Symbol("size"), kBusy: Symbol("busy"), kQueued: Symbol("queued"), kFree: Symbol("free"), kConnected: Symbol("connected"), kClosed: Symbol("closed"), kNeedDrain: Symbol("need drain"), kReset: Symbol("reset"), kDestroyed: Symbol.for("nodejs.stream.destroyed"), kMaxHeadersSize: Symbol("max headers size"), kRunningIdx: Symbol("running index"), kPendingIdx: Symbol("pending index"), kError: Symbol("error"), kClients: Symbol("clients"), kClient: Symbol("client"), kParser: Symbol("parser"), kOnDestroyed: Symbol("destroy callbacks"), kPipelining: Symbol("pipelining"), kSocket: Symbol("socket"), kHostHeader: Symbol("host header"), kConnector: Symbol("connector"), kStrictContentLength: Symbol("strict content length"), kMaxRedirections: Symbol("maxRedirections"), kMaxRequests: Symbol("maxRequestsPerClient"), kProxy: Symbol("proxy agent options"), kCounter: Symbol("socket request counter"), kInterceptors: Symbol("dispatch interceptors"), kMaxResponseSize: Symbol("max response size"), kHTTP2Session: Symbol("http2Session"), kHTTP2SessionState: Symbol("http2Session state"), kHTTP2BuildRequest: Symbol("http2 build request"), kHTTP1BuildRequest: Symbol("http1 build request"), kHTTP2CopyHeaders: Symbol("http2 copy headers"), kHTTPConnVersion: Symbol("http connection version"), kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), kConstruct: Symbol("constructable") }; } }); // node_modules/undici/lib/core/errors.js var require_errors = __commonJS({ "node_modules/undici/lib/core/errors.js"(exports2, module2) { "use strict"; var UndiciError = class extends Error { static { __name(this, "UndiciError"); } constructor(message) { super(message); this.name = "UndiciError"; this.code = "UND_ERR"; } }; var ConnectTimeoutError = class _ConnectTimeoutError extends UndiciError { static { __name(this, "ConnectTimeoutError"); } constructor(message) { super(message); Error.captureStackTrace(this, _ConnectTimeoutError); this.name = "ConnectTimeoutError"; this.message = message || "Connect Timeout Error"; this.code = "UND_ERR_CONNECT_TIMEOUT"; } }; var HeadersTimeoutError = class _HeadersTimeoutError extends UndiciError { static { __name(this, "HeadersTimeoutError"); } constructor(message) { super(message); Error.captureStackTrace(this, _HeadersTimeoutError); this.name = "HeadersTimeoutError"; this.message = message || "Headers Timeout Error"; this.code = "UND_ERR_HEADERS_TIMEOUT"; } }; var HeadersOverflowError = class _HeadersOverflowError extends UndiciError { static { __name(this, "HeadersOverflowError"); } constructor(message) { super(message); Error.captureStackTrace(this, _HeadersOverflowError); this.name = "HeadersOverflowError"; this.message = message || "Headers Overflow Error"; this.code = "UND_ERR_HEADERS_OVERFLOW"; } }; var BodyTimeoutError = class _BodyTimeoutError extends UndiciError { static { __name(this, "BodyTimeoutError"); } constructor(message) { super(message); Error.captureStackTrace(this, _BodyTimeoutError); this.name = "BodyTimeoutError"; this.message = message || "Body Timeout Error"; this.code = "UND_ERR_BODY_TIMEOUT"; } }; var ResponseStatusCodeError = class _ResponseStatusCodeError extends UndiciError { static { __name(this, "ResponseStatusCodeError"); } constructor(message, statusCode, headers, body) { super(message); Error.captureStackTrace(this, _ResponseStatusCodeError); this.name = "ResponseStatusCodeError"; this.message = message || "Response Status Code Error"; this.code = "UND_ERR_RESPONSE_STATUS_CODE"; this.body = body; this.status = statusCode; this.statusCode = statusCode; this.headers = headers; } }; var InvalidArgumentError = class _InvalidArgumentError extends UndiciError { static { __name(this, "InvalidArgumentError"); } constructor(message) { super(message); Error.captureStackTrace(this, _InvalidArgumentError); this.name = "InvalidArgumentError"; this.message = message || "Invalid Argument Error"; this.code = "UND_ERR_INVALID_ARG"; } }; var InvalidReturnValueError = class _InvalidReturnValueError extends UndiciError { static { __name(this, "InvalidReturnValueError"); } constructor(message) { super(message); Error.captureStackTrace(this, _InvalidReturnValueError); this.name = "InvalidReturnValueError"; this.message = message || "Invalid Return Value Error"; this.code = "UND_ERR_INVALID_RETURN_VALUE"; } }; var RequestAbortedError = class _RequestAbortedError extends UndiciError { static { __name(this, "RequestAbortedError"); } constructor(message) { super(message); Error.captureStackTrace(this, _RequestAbortedError); this.name = "AbortError"; this.message = message || "Request aborted"; this.code = "UND_ERR_ABORTED"; } }; var InformationalError = class _InformationalError extends UndiciError { static { __name(this, "InformationalError"); } constructor(message) { super(message); Error.captureStackTrace(this, _InformationalError); this.name = "InformationalError"; this.message = message || "Request information"; this.code = "UND_ERR_INFO"; } }; var RequestContentLengthMismatchError = class _RequestContentLengthMismatchError extends UndiciError { static { __name(this, "RequestContentLengthMismatchError"); } constructor(message) { super(message); Error.captureStackTrace(this, _RequestContentLengthMismatchError); this.name = "RequestContentLengthMismatchError"; this.message = message || "Request body length does not match content-length header"; this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; } }; var ResponseContentLengthMismatchError = class _ResponseContentLengthMismatchError extends UndiciError { static { __name(this, "ResponseContentLengthMismatchError"); } constructor(message) { super(message); Error.captureStackTrace(this, _ResponseContentLengthMismatchError); this.name = "ResponseContentLengthMismatchError"; this.message = message || "Response body length does not match content-length header"; this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; } }; var ClientDestroyedError = class _ClientDestroyedError extends UndiciError { static { __name(this, "ClientDestroyedError"); } constructor(message) { super(message); Error.captureStackTrace(this, _ClientDestroyedError); this.name = "ClientDestroyedError"; this.message = message || "The client is destroyed"; this.code = "UND_ERR_DESTROYED"; } }; var ClientClosedError = class _ClientClosedError extends UndiciError { static { __name(this, "ClientClosedError"); } constructor(message) { super(message); Error.captureStackTrace(this, _ClientClosedError); this.name = "ClientClosedError"; this.message = message || "The client is closed"; this.code = "UND_ERR_CLOSED"; } }; var SocketError = class _SocketError extends UndiciError { static { __name(this, "SocketError"); } constructor(message, socket) { super(message); Error.captureStackTrace(this, _SocketError); this.name = "SocketError"; this.message = message || "Socket error"; this.code = "UND_ERR_SOCKET"; this.socket = socket; } }; var NotSupportedError = class _NotSupportedError extends UndiciError { static { __name(this, "NotSupportedError"); } constructor(message) { super(message); Error.captureStackTrace(this, _NotSupportedError); this.name = "NotSupportedError"; this.message = message || "Not supported error"; this.code = "UND_ERR_NOT_SUPPORTED"; } }; var BalancedPoolMissingUpstreamError = class extends UndiciError { static { __name(this, "BalancedPoolMissingUpstreamError"); } constructor(message) { super(message); Error.captureStackTrace(this, NotSupportedError); this.name = "MissingUpstreamError"; this.message = message || "No upstream has been added to the BalancedPool"; this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; } }; var HTTPParserError = class _HTTPParserError extends Error { static { __name(this, "HTTPParserError"); } constructor(message, code, data) { super(message); Error.captureStackTrace(this, _HTTPParserError); this.name = "HTTPParserError"; this.code = code ? `HPE_${code}` : void 0; this.data = data ? data.toString() : void 0; } }; var ResponseExceededMaxSizeError = class _ResponseExceededMaxSizeError extends UndiciError { static { __name(this, "ResponseExceededMaxSizeError"); } constructor(message) { super(message); Error.captureStackTrace(this, _ResponseExceededMaxSizeError); this.name = "ResponseExceededMaxSizeError"; this.message = message || "Response content exceeded max size"; this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; } }; var RequestRetryError = class _RequestRetryError extends UndiciError { static { __name(this, "RequestRetryError"); } constructor(message, code, { headers, data }) { super(message); Error.captureStackTrace(this, _RequestRetryError); this.name = "RequestRetryError"; this.message = message || "Request retry error"; this.code = "UND_ERR_REQ_RETRY"; this.statusCode = code; this.data = data; this.headers = headers; } }; module2.exports = { HTTPParserError, UndiciError, HeadersTimeoutError, HeadersOverflowError, BodyTimeoutError, RequestContentLengthMismatchError, ConnectTimeoutError, ResponseStatusCodeError, InvalidArgumentError, InvalidReturnValueError, RequestAbortedError, ClientDestroyedError, ClientClosedError, InformationalError, SocketError, NotSupportedError, ResponseContentLengthMismatchError, BalancedPoolMissingUpstreamError, ResponseExceededMaxSizeError, RequestRetryError }; } }); // node_modules/undici/lib/core/constants.js var require_constants2 = __commonJS({ "node_modules/undici/lib/core/constants.js"(exports2, module2) { "use strict"; var headerNameLowerCasedRecord = {}; var wellknownHeaderNames = [ "Accept", "Accept-Encoding", "Accept-Language", "Accept-Ranges", "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", "Age", "Allow", "Alt-Svc", "Alt-Used", "Authorization", "Cache-Control", "Clear-Site-Data", "Connection", "Content-Disposition", "Content-Encoding", "Content-Language", "Content-Length", "Content-Location", "Content-Range", "Content-Security-Policy", "Content-Security-Policy-Report-Only", "Content-Type", "Cookie", "Cross-Origin-Embedder-Policy", "Cross-Origin-Opener-Policy", "Cross-Origin-Resource-Policy", "Date", "Device-Memory", "Downlink", "ECT", "ETag", "Expect", "Expect-CT", "Expires", "Forwarded", "From", "Host", "If-Match", "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Keep-Alive", "Last-Modified", "Link", "Location", "Max-Forwards", "Origin", "Permissions-Policy", "Pragma", "Proxy-Authenticate", "Proxy-Authorization", "RTT", "Range", "Referer", "Referrer-Policy", "Refresh", "Retry-After", "Sec-WebSocket-Accept", "Sec-WebSocket-Extensions", "Sec-WebSocket-Key", "Sec-WebSocket-Protocol", "Sec-WebSocket-Version", "Server", "Server-Timing", "Service-Worker-Allowed", "Service-Worker-Navigation-Preload", "Set-Cookie", "SourceMap", "Strict-Transport-Security", "Supports-Loading-Mode", "TE", "Timing-Allow-Origin", "Trailer", "Transfer-Encoding", "Upgrade", "Upgrade-Insecure-Requests", "User-Agent", "Vary", "Via", "WWW-Authenticate", "X-Content-Type-Options", "X-DNS-Prefetch-Control", "X-Frame-Options", "X-Permitted-Cross-Domain-Policies", "X-Powered-By", "X-Requested-With", "X-XSS-Protection" ]; for (let i = 0; i < wellknownHeaderNames.length; ++i) { const key = wellknownHeaderNames[i]; const lowerCasedKey = key.toLowerCase(); headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; } Object.setPrototypeOf(headerNameLowerCasedRecord, null); module2.exports = { wellknownHeaderNames, headerNameLowerCasedRecord }; } }); // node_modules/undici/lib/core/util.js var require_util = __commonJS({ "node_modules/undici/lib/core/util.js"(exports2, module2) { "use strict"; var assert = require("assert"); var { kDestroyed, kBodyUsed } = require_symbols(); var { IncomingMessage } = require("http"); var stream = require("stream"); var net = require("net"); var { InvalidArgumentError } = require_errors(); var { Blob: Blob2 } = require("buffer"); var nodeUtil = require("util"); var { stringify } = require("querystring"); var { headerNameLowerCasedRecord } = require_constants2(); var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { } __name(nop, "nop"); function isStream(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } __name(isStream, "isStream"); function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } __name(isBlobLike, "isBlobLike"); function buildURL(url, queryParams) { if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { url += "?" + stringified; } return url; } __name(buildURL, "buildURL"); function parseURL(url) { if (typeof url === "string") { url = new URL(url); if (!/^https?:/.test(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } return url; } if (!url || typeof url !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } if (!/^https?:/.test(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } if (!(url instanceof URL)) { if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } if (url.path != null && typeof url.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } if (url.pathname != null && typeof url.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } if (url.hostname != null && typeof url.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } if (url.origin != null && typeof url.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; let path2 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path2 && !path2.startsWith("/")) { path2 = `/${path2}`; } url = new URL(origin + path2); } return url; } __name(parseURL, "parseURL"); function parseOrigin(url) { url = parseURL(url); if (url.pathname !== "/" || url.search || url.hash) { throw new InvalidArgumentError("invalid url"); } return url; } __name(parseOrigin, "parseOrigin"); function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); assert(idx2 !== -1); return host.substring(1, idx2); } const idx = host.indexOf(":"); if (idx === -1) return host; return host.substring(0, idx); } __name(getHostname, "getHostname"); function getServerName(host) { if (!host) { return null; } assert.strictEqual(typeof host, "string"); const servername = getHostname(host); if (net.isIP(servername)) { return ""; } return servername; } __name(getServerName, "getServerName"); function deepClone(obj) { return JSON.parse(JSON.stringify(obj)); } __name(deepClone, "deepClone"); function isAsyncIterable(obj) { return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); } __name(isAsyncIterable, "isAsyncIterable"); function isIterable(obj) { return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); } __name(isIterable, "isIterable"); function bodyLength(body) { if (body == null) { return 0; } else if (isStream(body)) { const state = body._readableState; return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; } else if (isBlobLike(body)) { return body.size != null ? body.size : null; } else if (isBuffer(body)) { return body.byteLength; } return null; } __name(bodyLength, "bodyLength"); function isDestroyed(stream2) { return !stream2 || !!(stream2.destroyed || stream2[kDestroyed]); } __name(isDestroyed, "isDestroyed"); function isReadableAborted(stream2) { const state = stream2 && stream2._readableState; return isDestroyed(stream2) && state && !state.endEmitted; } __name(isReadableAborted, "isReadableAborted"); function destroy(stream2, err) { if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { return; } if (typeof stream2.destroy === "function") { if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { stream2.socket = null; } stream2.destroy(err); } else if (err) { process.nextTick((stream3, err2) => { stream3.emit("error", err2); }, stream2, err); } if (stream2.destroyed !== true) { stream2[kDestroyed] = true; } } __name(destroy, "destroy"); var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; function parseKeepAliveTimeout(val) { const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } __name(parseKeepAliveTimeout, "parseKeepAliveTimeout"); function headerNameToString(value) { return headerNameLowerCasedRecord[value] || value.toLowerCase(); } __name(headerNameToString, "headerNameToString"); function parseHeaders(headers, obj = {}) { if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); let val = obj[key]; if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { if (!Array.isArray(val)) { val = [val]; obj[key] = val; } val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); } return obj; } __name(parseHeaders, "parseHeaders"); function parseRawHeaders(headers) { const ret = []; let hasContentLength = false; let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { contentDispositionIdx = ret.push(key, val) - 1; } else { ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); } return ret; } __name(parseRawHeaders, "parseRawHeaders"); function isBuffer(buffer) { return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); } __name(isBuffer, "isBuffer"); function validateHandler(handler, method, upgrade) { if (!handler || typeof handler !== "object") { throw new InvalidArgumentError("handler must be an object"); } if (typeof handler.onConnect !== "function") { throw new InvalidArgumentError("invalid onConnect method"); } if (typeof handler.onError !== "function") { throw new InvalidArgumentError("invalid onError method"); } if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { throw new InvalidArgumentError("invalid onBodySent method"); } if (upgrade || method === "CONNECT") { if (typeof handler.onUpgrade !== "function") { throw new InvalidArgumentError("invalid onUpgrade method"); } } else { if (typeof handler.onHeaders !== "function") { throw new InvalidArgumentError("invalid onHeaders method"); } if (typeof handler.onData !== "function") { throw new InvalidArgumentError("invalid onData method"); } if (typeof handler.onComplete !== "function") { throw new InvalidArgumentError("invalid onComplete method"); } } } __name(validateHandler, "validateHandler"); function isDisturbed(body) { return !!(body && (stream.isDisturbed ? stream.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); } __name(isDisturbed, "isDisturbed"); function isErrored(body) { return !!(body && (stream.isErrored ? stream.isErrored(body) : /state: 'errored'/.test( nodeUtil.inspect(body) ))); } __name(isErrored, "isErrored"); function isReadable(body) { return !!(body && (stream.isReadable ? stream.isReadable(body) : /state: 'readable'/.test( nodeUtil.inspect(body) ))); } __name(isReadable, "isReadable"); function getSocketInfo(socket) { return { localAddress: socket.localAddress, localPort: socket.localPort, remoteAddress: socket.remoteAddress, remotePort: socket.remotePort, remoteFamily: socket.remoteFamily, timeout: socket.timeout, bytesWritten: socket.bytesWritten, bytesRead: socket.bytesRead }; } __name(getSocketInfo, "getSocketInfo"); async function* convertIterableToBuffer(iterable) { for await (const chunk of iterable) { yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); } } __name(convertIterableToBuffer, "convertIterableToBuffer"); var ReadableStream2; function ReadableStreamFrom(iterable) { if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } if (ReadableStream2.from) { return ReadableStream2.from(convertIterableToBuffer(iterable)); } let iterator; return new ReadableStream2( { async start() { iterator = iterable[Symbol.asyncIterator](); }, async pull(controller) { const { done, value } = await iterator.next(); if (done) { queueMicrotask(() => { controller.close(); }); } else { const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); controller.enqueue(new Uint8Array(buf)); } return controller.desiredSize > 0; }, async cancel(reason) { await iterator.return(); } }, 0 ); } __name(ReadableStreamFrom, "ReadableStreamFrom"); function isFormDataLike(object) { return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; } __name(isFormDataLike, "isFormDataLike"); function throwIfAborted(signal) { if (!signal) { return; } if (typeof signal.throwIfAborted === "function") { signal.throwIfAborted(); } else { if (signal.aborted) { const err = new Error("The operation was aborted"); err.name = "AbortError"; throw err; } } } __name(throwIfAborted, "throwIfAborted"); function addAbortListener(signal, listener) { if ("addEventListener" in signal) { signal.addEventListener("abort", listener, { once: true }); return () => signal.removeEventListener("abort", listener); } signal.addListener("abort", listener); return () => signal.removeListener("abort", listener); } __name(addAbortListener, "addAbortListener"); var hasToWellFormed = !!String.prototype.toWellFormed; function toUSVString(val) { if (hasToWellFormed) { return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { return nodeUtil.toUSVString(val); } return `${val}`; } __name(toUSVString, "toUSVString"); function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; return m ? { start: parseInt(m[1]), end: m[2] ? parseInt(m[2]) : null, size: m[3] ? parseInt(m[3]) : null } : null; } __name(parseRangeHeader, "parseRangeHeader"); var kEnumerableProperty = /* @__PURE__ */ Object.create(null); kEnumerableProperty.enumerable = true; module2.exports = { kEnumerableProperty, nop, isDisturbed, isErrored, isReadable, toUSVString, isReadableAborted, isBlobLike, parseOrigin, parseURL, getServerName, isStream, isIterable, isAsyncIterable, isDestroyed, headerNameToString, parseRawHeaders, parseHeaders, parseKeepAliveTimeout, destroy, bodyLength, deepClone, ReadableStreamFrom, isBuffer, validateHandler, getSocketInfo, isFormDataLike, buildURL, throwIfAborted, addAbortListener, parseRangeHeader, nodeMajor, nodeMinor, nodeHasAutoSelectFamily: nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 13, safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"] }; } }); // node_modules/undici/lib/timers.js var require_timers = __commonJS({ "node_modules/undici/lib/timers.js"(exports2, module2) { "use strict"; var fastNow = Date.now(); var fastNowTimeout; var fastTimers = []; function onTimeout() { fastNow = Date.now(); let len = fastTimers.length; let idx = 0; while (idx < len) { const timer = fastTimers[idx]; if (timer.state === 0) { timer.state = fastNow + timer.delay; } else if (timer.state > 0 && fastNow >= timer.state) { timer.state = -1; timer.callback(timer.opaque); } if (timer.state === -1) { timer.state = -2; if (idx !== len - 1) { fastTimers[idx] = fastTimers.pop(); } else { fastTimers.pop(); } len -= 1; } else { idx += 1; } } if (fastTimers.length > 0) { refreshTimeout(); } } __name(onTimeout, "onTimeout"); function refreshTimeout() { if (fastNowTimeout && fastNowTimeout.refresh) { fastNowTimeout.refresh(); } else { clearTimeout(fastNowTimeout); fastNowTimeout = setTimeout(onTimeout, 1e3); if (fastNowTimeout.unref) { fastNowTimeout.unref(); } } } __name(refreshTimeout, "refreshTimeout"); var Timeout = class { static { __name(this, "Timeout"); } constructor(callback, delay, opaque) { this.callback = callback; this.delay = delay; this.opaque = opaque; this.state = -2; this.refresh(); } refresh() { if (this.state === -2) { fastTimers.push(this); if (!fastNowTimeout || fastTimers.length === 1) { refreshTimeout(); } } this.state = 0; } clear() { this.state = -1; } }; module2.exports = { setTimeout(callback, delay, opaque) { return delay < 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); }, clearTimeout(timeout) { if (timeout instanceof Timeout) { timeout.clear(); } else { clearTimeout(timeout); } } }; } }); // node_modules/@fastify/busboy/deps/streamsearch/sbmh.js var require_sbmh = __commonJS({ "node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports2, module2) { "use strict"; var EventEmitter = require("node:events").EventEmitter; var inherits = require("node:util").inherits; function SBMH(needle) { if (typeof needle === "string") { needle = Buffer.from(needle); } if (!Buffer.isBuffer(needle)) { throw new TypeError("The needle has to be a String or a Buffer."); } const needleLength = needle.length; if (needleLength === 0) { throw new Error("The needle cannot be an empty String/Buffer."); } if (needleLength > 256) { throw new Error("The needle cannot have a length bigger than 256."); } this.maxMatches = Infinity; this.matches = 0; this._occ = new Array(256).fill(needleLength); this._lookbehind_size = 0; this._needle = needle; this._bufpos = 0; this._lookbehind = Buffer.alloc(needleLength); for (var i = 0; i < needleLength - 1; ++i) { this._occ[needle[i]] = needleLength - 1 - i; } } __name(SBMH, "SBMH"); inherits(SBMH, EventEmitter); SBMH.prototype.reset = function() { this._lookbehind_size = 0; this.matches = 0; this._bufpos = 0; }; SBMH.prototype.push = function(chunk, pos) { if (!Buffer.isBuffer(chunk)) { chunk = Buffer.from(chunk, "binary"); } const chlen = chunk.length; this._bufpos = pos || 0; let r; while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk); } return r; }; SBMH.prototype._sbmh_feed = function(data) { const len = data.length; const needle = this._needle; const needleLength = needle.length; const lastNeedleChar = needle[needleLength - 1]; let pos = -this._lookbehind_size; let ch; if (pos < 0) { while (pos < 0 && pos <= len - needleLength) { ch = this._sbmh_lookup_char(data, pos + needleLength - 1); if (ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1)) { this._lookbehind_size = 0; ++this.matches; this.emit("info", true); return this._bufpos = pos + needleLength; } pos += this._occ[ch]; } if (pos < 0) { while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos; } } if (pos >= 0) { this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); this._lookbehind_size = 0; } else { const bytesToCutOff = this._lookbehind_size + pos; if (bytesToCutOff > 0) { this.emit("info", false, this._lookbehind, 0, bytesToCutOff); } this._lookbehind.copy( this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff ); this._lookbehind_size -= bytesToCutOff; data.copy(this._lookbehind, this._lookbehind_size); this._lookbehind_size += len; this._bufpos = len; return len; } } pos += (pos >= 0) * this._bufpos; if (data.indexOf(needle, pos) !== -1) { pos = data.indexOf(needle, pos); ++this.matches; if (pos > 0) { this.emit("info", true, data, this._bufpos, pos); } else { this.emit("info", true); } return this._bufpos = pos + needleLength; } else { pos = len - needleLength; } while (pos < len && (data[pos] !== needle[0] || Buffer.compare( data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos) ) !== 0)) { ++pos; } if (pos < len) { data.copy(this._lookbehind, 0, pos, pos + (len - pos)); this._lookbehind_size = len - pos; } if (pos > 0) { this.emit("info", false, data, this._bufpos, pos < len ? pos : len); } this._bufpos = len; return len; }; SBMH.prototype._sbmh_lookup_char = function(data, pos) { return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; }; SBMH.prototype._sbmh_memcmp = function(data, pos, len) { for (var i = 0; i < len; ++i) { if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false; } } return true; }; module2.exports = SBMH; } }); // node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js var require_PartStream = __commonJS({ "node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports2, module2) { "use strict"; var inherits = require("node:util").inherits; var ReadableStream2 = require("node:stream").Readable; function PartStream(opts) { ReadableStream2.call(this, opts); } __name(PartStream, "PartStream"); inherits(PartStream, ReadableStream2); PartStream.prototype._read = function(n) { }; module2.exports = PartStream; } }); // node_modules/@fastify/busboy/lib/utils/getLimit.js var require_getLimit = __commonJS({ "node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports2, module2) { "use strict"; module2.exports = /* @__PURE__ */ __name(function getLimit(limits, name, defaultLimit) { if (!limits || limits[name] === void 0 || limits[name] === null) { return defaultLimit; } if (typeof limits[name] !== "number" || isNaN(limits[name])) { throw new TypeError("Limit " + name + " is not a valid number"); } return limits[name]; }, "getLimit"); } }); // node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js var require_HeaderParser = __commonJS({ "node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports2, module2) { "use strict"; var EventEmitter = require("node:events").EventEmitter; var inherits = require("node:util").inherits; var getLimit = require_getLimit(); var StreamSearch = require_sbmh(); var B_DCRLF = Buffer.from("\r\n\r\n"); var RE_CRLF = /\r\n/g; var RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; function HeaderParser(cfg) { EventEmitter.call(this); cfg = cfg || {}; const self2 = this; this.nread = 0; this.maxed = false; this.npairs = 0; this.maxHeaderPairs = getLimit(cfg, "maxHeaderPairs", 2e3); this.maxHeaderSize = getLimit(cfg, "maxHeaderSize", 80 * 1024); this.buffer = ""; this.header = {}; this.finished = false; this.ss = new StreamSearch(B_DCRLF); this.ss.on("info", function(isMatch, data, start, end) { if (data && !self2.maxed) { if (self2.nread + end - start >= self2.maxHeaderSize) { end = self2.maxHeaderSize - self2.nread + start; self2.nread = self2.maxHeaderSize; self2.maxed = true; } else { self2.nread += end - start; } self2.buffer += data.toString("binary", start, end); } if (isMatch) { self2._finish(); } }); } __name(HeaderParser, "HeaderParser"); inherits(HeaderParser, EventEmitter); HeaderParser.prototype.push = function(data) { const r = this.ss.push(data); if (this.finished) { return r; } }; HeaderParser.prototype.reset = function() { this.finished = false; this.buffer = ""; this.header = {}; this.ss.reset(); }; HeaderParser.prototype._finish = function() { if (this.buffer) { this._parseHeader(); } this.ss.matches = this.ss.maxMatches; const header = this.header; this.header = {}; this.buffer = ""; this.finished = true; this.nread = this.npairs = 0; this.maxed = false; this.emit("header", header); }; HeaderParser.prototype._parseHeader = function() { if (this.npairs === this.maxHeaderPairs) { return; } const lines = this.buffer.split(RE_CRLF); const len = lines.length; let m, h; for (var i = 0; i < len; ++i) { if (lines[i].length === 0) { continue; } if (lines[i][0] === " " || lines[i][0] === " ") { if (h) { this.header[h][this.header[h].length - 1] += lines[i]; continue; } } const posColon = lines[i].indexOf(":"); if (posColon === -1 || posColon === 0) { return; } m = RE_HDR.exec(lines[i]); h = m[1].toLowerCase(); this.header[h] = this.header[h] || []; this.header[h].push(m[2] || ""); if (++this.npairs === this.maxHeaderPairs) { break; } } }; module2.exports = HeaderParser; } }); // node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js var require_Dicer = __commonJS({ "node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports2, module2) { "use strict"; var WritableStream = require("node:stream").Writable; var inherits = require("node:util").inherits; var StreamSearch = require_sbmh(); var PartStream = require_PartStream(); var HeaderParser = require_HeaderParser(); var DASH = 45; var B_ONEDASH = Buffer.from("-"); var B_CRLF = Buffer.from("\r\n"); var EMPTY_FN = /* @__PURE__ */ __name(function() { }, "EMPTY_FN"); function Dicer(cfg) { if (!(this instanceof Dicer)) { return new Dicer(cfg); } WritableStream.call(this, cfg); if (!cfg || !cfg.headerFirst && typeof cfg.boundary !== "string") { throw new TypeError("Boundary required"); } if (typeof cfg.boundary === "string") { this.setBoundary(cfg.boundary); } else { this._bparser = void 0; } this._headerFirst = cfg.headerFirst; this._dashes = 0; this._parts = 0; this._finished = false; this._realFinish = false; this._isPreamble = true; this._justMatched = false; this._firstWrite = true; this._inHeader = true; this._part = void 0; this._cb = void 0; this._ignoreData = false; this._partOpts = { highWaterMark: cfg.partHwm }; this._pause = false; const self2 = this; this._hparser = new HeaderParser(cfg); this._hparser.on("header", function(header) { self2._inHeader = false; self2._part.emit("header", header); }); } __name(Dicer, "Dicer"); inherits(Dicer, WritableStream); Dicer.prototype.emit = function(ev) { if (ev === "finish" && !this._realFinish) { if (!this._finished) { const self2 = this; process.nextTick(function() { self2.emit("error", new Error("Unexpected end of multipart data")); if (self2._part && !self2._ignoreData) { const type = self2._isPreamble ? "Preamble" : "Part"; self2._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); self2._part.push(null); process.nextTick(function() { self2._realFinish = true; self2.emit("finish"); self2._realFinish = false; }); return; } self2._realFinish = true; self2.emit("finish"); self2._realFinish = false; }); } } else { WritableStream.prototype.emit.apply(this, arguments); } }; Dicer.prototype._write = function(data, encoding, cb) { if (!this._hparser && !this._bparser) { return cb(); } if (this._headerFirst && this._isPreamble) { if (!this._part) { this._part = new PartStream(this._partOpts); if (this.listenerCount("preamble") !== 0) { this.emit("preamble", this._part); } else { this._ignore(); } } const r = this._hparser.push(data); if (!this._inHeader && r !== void 0 && r < data.length) { data = data.slice(r); } else { return cb(); } } if (this._firstWrite) { this._bparser.push(B_CRLF); this._firstWrite = false; } this._bparser.push(data); if (this._pause) { this._cb = cb; } else { cb(); } }; Dicer.prototype.reset = function() { this._part = void 0; this._bparser = void 0; this._hparser = void 0; }; Dicer.prototype.setBoundary = function(boundary) { const self2 = this; this._bparser = new StreamSearch("\r\n--" + boundary); this._bparser.on("info", function(isMatch, data, start, end) { self2._oninfo(isMatch, data, start, end); }); }; Dicer.prototype._ignore = function() { if (this._part && !this._ignoreData) { this._ignoreData = true; this._part.on("error", EMPTY_FN); this._part.resume(); } }; Dicer.prototype._oninfo = function(isMatch, data, start, end) { let buf; const self2 = this; let i = 0; let r; let shouldWriteMore = true; if (!this._part && this._justMatched && data) { while (this._dashes < 2 && start + i < end) { if (data[start + i] === DASH) { ++i; ++this._dashes; } else { if (this._dashes) { buf = B_ONEDASH; } this._dashes = 0; break; } } if (this._dashes === 2) { if (start + i < end && this.listenerCount("trailer") !== 0) { this.emit("trailer", data.slice(start + i, end)); } this.reset(); this._finished = true; if (self2._parts === 0) { self2._realFinish = true; self2.emit("finish"); self2._realFinish = false; } } if (this._dashes) { return; } } if (this._justMatched) { this._justMatched = false; } if (!this._part) { this._part = new PartStream(this._partOpts); this._part._read = function(n) { self2._unpause(); }; if (this._isPreamble && this.listenerCount("preamble") !== 0) { this.emit("preamble", this._part); } else if (this._isPreamble !== true && this.listenerCount("part") !== 0) { this.emit("part", this._part); } else { this._ignore(); } if (!this._isPreamble) { this._inHeader = true; } } if (data && start < end && !this._ignoreData) { if (this._isPreamble || !this._inHeader) { if (buf) { shouldWriteMore = this._part.push(buf); } shouldWriteMore = this._part.push(data.slice(start, end)); if (!shouldWriteMore) { this._pause = true; } } else if (!this._isPreamble && this._inHeader) { if (buf) { this._hparser.push(buf); } r = this._hparser.push(data.slice(start, end)); if (!this._inHeader && r !== void 0 && r < end) { this._oninfo(false, data, start + r, end); } } } if (isMatch) { this._hparser.reset(); if (this._isPreamble) { this._isPreamble = false; } else { if (start !== end) { ++this._parts; this._part.on("end", function() { if (--self2._parts === 0) { if (self2._finished) { self2._realFinish = true; self2.emit("finish"); self2._realFinish = false; } else { self2._unpause(); } } }); } } this._part.push(null); this._part = void 0; this._ignoreData = false; this._justMatched = true; this._dashes = 0; } }; Dicer.prototype._unpause = function() { if (!this._pause) { return; } this._pause = false; if (this._cb) { const cb = this._cb; this._cb = void 0; cb(); } }; module2.exports = Dicer; } }); // node_modules/@fastify/busboy/lib/utils/decodeText.js var require_decodeText = __commonJS({ "node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports2, module2) { "use strict"; var utf8Decoder = new TextDecoder("utf-8"); var textDecoders = /* @__PURE__ */ new Map([ ["utf-8", utf8Decoder], ["utf8", utf8Decoder] ]); function getDecoder(charset) { let lc; while (true) { switch (charset) { case "utf-8": case "utf8": return decoders.utf8; case "latin1": case "ascii": case "us-ascii": case "iso-8859-1": case "iso8859-1": case "iso88591": case "iso_8859-1": case "windows-1252": case "iso_8859-1:1987": case "cp1252": case "x-cp1252": return decoders.latin1; case "utf16le": case "utf-16le": case "ucs2": case "ucs-2": return decoders.utf16le; case "base64": return decoders.base64; default: if (lc === void 0) { lc = true; charset = charset.toLowerCase(); continue; } return decoders.other.bind(charset); } } } __name(getDecoder, "getDecoder"); var decoders = { utf8: (data, sourceEncoding) => { if (data.length === 0) { return ""; } if (typeof data === "string") { data = Buffer.from(data, sourceEncoding); } return data.utf8Slice(0, data.length); }, latin1: (data, sourceEncoding) => { if (data.length === 0) { return ""; } if (typeof data === "string") { return data; } return data.latin1Slice(0, data.length); }, utf16le: (data, sourceEncoding) => { if (data.length === 0) { return ""; } if (typeof data === "string") { data = Buffer.from(data, sourceEncoding); } return data.ucs2Slice(0, data.length); }, base64: (data, sourceEncoding) => { if (data.length === 0) { return ""; } if (typeof data === "string") { data = Buffer.from(data, sourceEncoding); } return data.base64Slice(0, data.length); }, other: (data, sourceEncoding) => { if (data.length === 0) { return ""; } if (typeof data === "string") { data = Buffer.from(data, sourceEncoding); } if (textDecoders.has(exports2.toString())) { try { return textDecoders.get(exports2).decode(data); } catch { } } return typeof data === "string" ? data : data.toString(); } }; function decodeText(text, sourceEncoding, destEncoding) { if (text) { return getDecoder(destEncoding)(text, sourceEncoding); } return text; } __name(decodeText, "decodeText"); module2.exports = decodeText; } }); // node_modules/@fastify/busboy/lib/utils/parseParams.js var require_parseParams = __commonJS({ "node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports2, module2) { "use strict"; var decodeText = require_decodeText(); var RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; var EncodedLookup = { "%00": "\0", "%01": "", "%02": "", "%03": "", "%04": "", "%05": "", "%06": "", "%07": "\x07", "%08": "\b", "%09": " ", "%0a": "\n", "%0A": "\n", "%0b": "\v", "%0B": "\v", "%0c": "\f", "%0C": "\f", "%0d": "\r", "%0D": "\r", "%0e": "", "%0E": "", "%0f": "", "%0F": "", "%10": "", "%11": "", "%12": "", "%13": "", "%14": "", "%15": "", "%16": "", "%17": "", "%18": "", "%19": "", "%1a": "", "%1A": "", "%1b": "\x1B", "%1B": "\x1B", "%1c": "", "%1C": "", "%1d": "", "%1D": "", "%1e": "", "%1E": "", "%1f": "", "%1F": "", "%20": " ", "%21": "!", "%22": '"', "%23": "#", "%24": "$", "%25": "%", "%26": "&", "%27": "'", "%28": "(", "%29": ")", "%2a": "*", "%2A": "*", "%2b": "+", "%2B": "+", "%2c": ",", "%2C": ",", "%2d": "-", "%2D": "-", "%2e": ".", "%2E": ".", "%2f": "/", "%2F": "/", "%30": "0", "%31": "1", "%32": "2", "%33": "3", "%34": "4", "%35": "5", "%36": "6", "%37": "7", "%38": "8", "%39": "9", "%3a": ":", "%3A": ":", "%3b": ";", "%3B": ";", "%3c": "<", "%3C": "<", "%3d": "=", "%3D": "=", "%3e": ">", "%3E": ">", "%3f": "?", "%3F": "?", "%40": "@", "%41": "A", "%42": "B", "%43": "C", "%44": "D", "%45": "E", "%46": "F", "%47": "G", "%48": "H", "%49": "I", "%4a": "J", "%4A": "J", "%4b": "K", "%4B": "K", "%4c": "L", "%4C": "L", "%4d": "M", "%4D": "M", "%4e": "N", "%4E": "N", "%4f": "O", "%4F": "O", "%50": "P", "%51": "Q", "%52": "R", "%53": "S", "%54": "T", "%55": "U", "%56": "V", "%57": "W", "%58": "X", "%59": "Y", "%5a": "Z", "%5A": "Z", "%5b": "[", "%5B": "[", "%5c": "\\", "%5C": "\\", "%5d": "]", "%5D": "]", "%5e": "^", "%5E": "^", "%5f": "_", "%5F": "_", "%60": "`", "%61": "a", "%62": "b", "%63": "c", "%64": "d", "%65": "e", "%66": "f", "%67": "g", "%68": "h", "%69": "i", "%6a": "j", "%6A": "j", "%6b": "k", "%6B": "k", "%6c": "l", "%6C": "l", "%6d": "m", "%6D": "m", "%6e": "n", "%6E": "n", "%6f": "o", "%6F": "o", "%70": "p", "%71": "q", "%72": "r", "%73": "s", "%74": "t", "%75": "u", "%76": "v", "%77": "w", "%78": "x", "%79": "y", "%7a": "z", "%7A": "z", "%7b": "{", "%7B": "{", "%7c": "|", "%7C": "|", "%7d": "}", "%7D": "}", "%7e": "~", "%7E": "~", "%7f": "\x7F", "%7F": "\x7F", "%80": "\x80", "%81": "\x81", "%82": "\x82", "%83": "\x83", "%84": "\x84", "%85": "\x85", "%86": "\x86", "%87": "\x87", "%88": "\x88", "%89": "\x89", "%8a": "\x8A", "%8A": "\x8A", "%8b": "\x8B", "%8B": "\x8B", "%8c": "\x8C", "%8C": "\x8C", "%8d": "\x8D", "%8D": "\x8D", "%8e": "\x8E", "%8E": "\x8E", "%8f": "\x8F", "%8F": "\x8F", "%90": "\x90", "%91": "\x91", "%92": "\x92", "%93": "\x93", "%94": "\x94", "%95": "\x95", "%96": "\x96", "%97": "\x97", "%98": "\x98", "%99": "\x99", "%9a": "\x9A", "%9A": "\x9A", "%9b": "\x9B", "%9B": "\x9B", "%9c": "\x9C", "%9C": "\x9C", "%9d": "\x9D", "%9D": "\x9D", "%9e": "\x9E", "%9E": "\x9E", "%9f": "\x9F", "%9F": "\x9F", "%a0": "\xA0", "%A0": "\xA0", "%a1": "\xA1", "%A1": "\xA1", "%a2": "\xA2", "%A2": "\xA2", "%a3": "\xA3", "%A3": "\xA3", "%a4": "\xA4", "%A4": "\xA4", "%a5": "\xA5", "%A5": "\xA5", "%a6": "\xA6", "%A6": "\xA6", "%a7": "\xA7", "%A7": "\xA7", "%a8": "\xA8", "%A8": "\xA8", "%a9": "\xA9", "%A9": "\xA9", "%aa": "\xAA", "%Aa": "\xAA", "%aA": "\xAA", "%AA": "\xAA", "%ab": "\xAB", "%Ab": "\xAB", "%aB": "\xAB", "%AB": "\xAB", "%ac": "\xAC", "%Ac": "\xAC", "%aC": "\xAC", "%AC": "\xAC", "%ad": "\xAD", "%Ad": "\xAD", "%aD": "\xAD", "%AD": "\xAD", "%ae": "\xAE", "%Ae": "\xAE", "%aE": "\xAE", "%AE": "\xAE", "%af": "\xAF", "%Af": "\xAF", "%aF": "\xAF", "%AF": "\xAF", "%b0": "\xB0", "%B0": "\xB0", "%b1": "\xB1", "%B1": "\xB1", "%b2": "\xB2", "%B2": "\xB2", "%b3": "\xB3", "%B3": "\xB3", "%b4": "\xB4", "%B4": "\xB4", "%b5": "\xB5", "%B5": "\xB5", "%b6": "\xB6", "%B6": "\xB6", "%b7": "\xB7", "%B7": "\xB7", "%b8": "\xB8", "%B8": "\xB8", "%b9": "\xB9", "%B9": "\xB9", "%ba": "\xBA", "%Ba": "\xBA", "%bA": "\xBA", "%BA": "\xBA", "%bb": "\xBB", "%Bb": "\xBB", "%bB": "\xBB", "%BB": "\xBB", "%bc": "\xBC", "%Bc": "\xBC", "%bC": "\xBC", "%BC": "\xBC", "%bd": "\xBD", "%Bd": "\xBD", "%bD": "\xBD", "%BD": "\xBD", "%be": "\xBE", "%Be": "\xBE", "%bE": "\xBE", "%BE": "\xBE", "%bf": "\xBF", "%Bf": "\xBF", "%bF": "\xBF", "%BF": "\xBF", "%c0": "\xC0", "%C0": "\xC0", "%c1": "\xC1", "%C1": "\xC1", "%c2": "\xC2", "%C2": "\xC2", "%c3": "\xC3", "%C3": "\xC3", "%c4": "\xC4", "%C4": "\xC4", "%c5": "\xC5", "%C5": "\xC5", "%c6": "\xC6", "%C6": "\xC6", "%c7": "\xC7", "%C7": "\xC7", "%c8": "\xC8", "%C8": "\xC8", "%c9": "\xC9", "%C9": "\xC9", "%ca": "\xCA", "%Ca": "\xCA", "%cA": "\xCA", "%CA": "\xCA", "%cb": "\xCB", "%Cb": "\xCB", "%cB": "\xCB", "%CB": "\xCB", "%cc": "\xCC", "%Cc": "\xCC", "%cC": "\xCC", "%CC": "\xCC", "%cd": "\xCD", "%Cd": "\xCD", "%cD": "\xCD", "%CD": "\xCD", "%ce": "\xCE", "%Ce": "\xCE", "%cE": "\xCE", "%CE": "\xCE", "%cf": "\xCF", "%Cf": "\xCF", "%cF": "\xCF", "%CF": "\xCF", "%d0": "\xD0", "%D0": "\xD0", "%d1": "\xD1", "%D1": "\xD1", "%d2": "\xD2", "%D2": "\xD2", "%d3": "\xD3", "%D3": "\xD3", "%d4": "\xD4", "%D4": "\xD4", "%d5": "\xD5", "%D5": "\xD5", "%d6": "\xD6", "%D6": "\xD6", "%d7": "\xD7", "%D7": "\xD7", "%d8": "\xD8", "%D8": "\xD8", "%d9": "\xD9", "%D9": "\xD9", "%da": "\xDA", "%Da": "\xDA", "%dA": "\xDA", "%DA": "\xDA", "%db": "\xDB", "%Db": "\xDB", "%dB": "\xDB", "%DB": "\xDB", "%dc": "\xDC", "%Dc": "\xDC", "%dC": "\xDC", "%DC": "\xDC", "%dd": "\xDD", "%Dd": "\xDD", "%dD": "\xDD", "%DD": "\xDD", "%de": "\xDE", "%De": "\xDE", "%dE": "\xDE", "%DE": "\xDE", "%df": "\xDF", "%Df": "\xDF", "%dF": "\xDF", "%DF": "\xDF", "%e0": "\xE0", "%E0": "\xE0", "%e1": "\xE1", "%E1": "\xE1", "%e2": "\xE2", "%E2": "\xE2", "%e3": "\xE3", "%E3": "\xE3", "%e4": "\xE4", "%E4": "\xE4", "%e5": "\xE5", "%E5": "\xE5", "%e6": "\xE6", "%E6": "\xE6", "%e7": "\xE7", "%E7": "\xE7", "%e8": "\xE8", "%E8": "\xE8", "%e9": "\xE9", "%E9": "\xE9", "%ea": "\xEA", "%Ea": "\xEA", "%eA": "\xEA", "%EA": "\xEA", "%eb": "\xEB", "%Eb": "\xEB", "%eB": "\xEB", "%EB": "\xEB", "%ec": "\xEC", "%Ec": "\xEC", "%eC": "\xEC", "%EC": "\xEC", "%ed": "\xED", "%Ed": "\xED", "%eD": "\xED", "%ED": "\xED", "%ee": "\xEE", "%Ee": "\xEE", "%eE": "\xEE", "%EE": "\xEE", "%ef": "\xEF", "%Ef": "\xEF", "%eF": "\xEF", "%EF": "\xEF", "%f0": "\xF0", "%F0": "\xF0", "%f1": "\xF1", "%F1": "\xF1", "%f2": "\xF2", "%F2": "\xF2", "%f3": "\xF3", "%F3": "\xF3", "%f4": "\xF4", "%F4": "\xF4", "%f5": "\xF5", "%F5": "\xF5", "%f6": "\xF6", "%F6": "\xF6", "%f7": "\xF7", "%F7": "\xF7", "%f8": "\xF8", "%F8": "\xF8", "%f9": "\xF9", "%F9": "\xF9", "%fa": "\xFA", "%Fa": "\xFA", "%fA": "\xFA", "%FA": "\xFA", "%fb": "\xFB", "%Fb": "\xFB", "%fB": "\xFB", "%FB": "\xFB", "%fc": "\xFC", "%Fc": "\xFC", "%fC": "\xFC", "%FC": "\xFC", "%fd": "\xFD", "%Fd": "\xFD", "%fD": "\xFD", "%FD": "\xFD", "%fe": "\xFE", "%Fe": "\xFE", "%fE": "\xFE", "%FE": "\xFE", "%ff": "\xFF", "%Ff": "\xFF", "%fF": "\xFF", "%FF": "\xFF" }; function encodedReplacer(match) { return EncodedLookup[match]; } __name(encodedReplacer, "encodedReplacer"); var STATE_KEY = 0; var STATE_VALUE = 1; var STATE_CHARSET = 2; var STATE_LANG = 3; function parseParams(str) { const res = []; let state = STATE_KEY; let charset = ""; let inquote = false; let escaping = false; let p = 0; let tmp = ""; const len = str.length; for (var i = 0; i < len; ++i) { const char = str[i]; if (char === "\\" && inquote) { if (escaping) { escaping = false; } else { escaping = true; continue; } } else if (char === '"') { if (!escaping) { if (inquote) { inquote = false; state = STATE_KEY; } else { inquote = true; } continue; } else { escaping = false; } } else { if (escaping && inquote) { tmp += "\\"; } escaping = false; if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { if (state === STATE_CHARSET) { state = STATE_LANG; charset = tmp.substring(1); } else { state = STATE_VALUE; } tmp = ""; continue; } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { state = char === "*" ? STATE_CHARSET : STATE_VALUE; res[p] = [tmp, void 0]; tmp = ""; continue; } else if (!inquote && char === ";") { state = STATE_KEY; if (charset) { if (tmp.length) { tmp = decodeText( tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset ); } charset = ""; } else if (tmp.length) { tmp = decodeText(tmp, "binary", "utf8"); } if (res[p] === void 0) { res[p] = tmp; } else { res[p][1] = tmp; } tmp = ""; ++p; continue; } else if (!inquote && (char === " " || char === " ")) { continue; } } tmp += char; } if (charset && tmp.length) { tmp = decodeText( tmp.replace(RE_ENCODED, encodedReplacer), "binary", charset ); } else if (tmp) { tmp = decodeText(tmp, "binary", "utf8"); } if (res[p] === void 0) { if (tmp) { res[p] = tmp; } } else { res[p][1] = tmp; } return res; } __name(parseParams, "parseParams"); module2.exports = parseParams; } }); // node_modules/@fastify/busboy/lib/utils/basename.js var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; module2.exports = /* @__PURE__ */ __name(function basename(path2) { if (typeof path2 !== "string") { return ""; } for (var i = path2.length - 1; i >= 0; --i) { switch (path2.charCodeAt(i)) { case 47: case 92: path2 = path2.slice(i + 1); return path2 === ".." || path2 === "." ? "" : path2; } } return path2 === ".." || path2 === "." ? "" : path2; }, "basename"); } }); // node_modules/@fastify/busboy/lib/types/multipart.js var require_multipart = __commonJS({ "node_modules/@fastify/busboy/lib/types/multipart.js"(exports2, module2) { "use strict"; var { Readable } = require("node:stream"); var { inherits } = require("node:util"); var Dicer = require_Dicer(); var parseParams = require_parseParams(); var decodeText = require_decodeText(); var basename = require_basename(); var getLimit = require_getLimit(); var RE_BOUNDARY = /^boundary$/i; var RE_FIELD = /^form-data$/i; var RE_CHARSET = /^charset$/i; var RE_FILENAME = /^filename$/i; var RE_NAME = /^name$/i; Multipart.detect = /^multipart\/form-data/i; function Multipart(boy, cfg) { let i; let len; const self2 = this; let boundary; const limits = cfg.limits; const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); const parsedConType = cfg.parsedConType || []; const defCharset = cfg.defCharset || "utf8"; const preservePath = cfg.preservePath; const fileOpts = { highWaterMark: cfg.fileHwm }; for (i = 0, len = parsedConType.length; i < len; ++i) { if (Array.isArray(parsedConType[i]) && RE_BOUNDARY.test(parsedConType[i][0])) { boundary = parsedConType[i][1]; break; } } function checkFinished() { if (nends === 0 && finished && !boy._done) { finished = false; self2.end(); } } __name(checkFinished, "checkFinished"); if (typeof boundary !== "string") { throw new Error("Multipart: Boundary not found"); } const fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); const fileSizeLimit = getLimit(limits, "fileSize", Infinity); const filesLimit = getLimit(limits, "files", Infinity); const fieldsLimit = getLimit(limits, "fields", Infinity); const partsLimit = getLimit(limits, "parts", Infinity); const headerPairsLimit = getLimit(limits, "headerPairs", 2e3); const headerSizeLimit = getLimit(limits, "headerSize", 80 * 1024); let nfiles = 0; let nfields = 0; let nends = 0; let curFile; let curField; let finished = false; this._needDrain = false; this._pause = false; this._cb = void 0; this._nparts = 0; this._boy = boy; const parserCfg = { boundary, maxHeaderPairs: headerPairsLimit, maxHeaderSize: headerSizeLimit, partHwm: fileOpts.highWaterMark, highWaterMark: cfg.highWaterMark }; this.parser = new Dicer(parserCfg); this.parser.on("drain", function() { self2._needDrain = false; if (self2._cb && !self2._pause) { const cb = self2._cb; self2._cb = void 0; cb(); } }).on("part", /* @__PURE__ */ __name(function onPart(part) { if (++self2._nparts > partsLimit) { self2.parser.removeListener("part", onPart); self2.parser.on("part", skipPart); boy.hitPartsLimit = true; boy.emit("partsLimit"); return skipPart(part); } if (curField) { const field = curField; field.emit("end"); field.removeAllListeners("end"); } part.on("header", function(header) { let contype; let fieldname; let parsed; let charset; let encoding; let filename; let nsize = 0; if (header["content-type"]) { parsed = parseParams(header["content-type"][0]); if (parsed[0]) { contype = parsed[0].toLowerCase(); for (i = 0, len = parsed.length; i < len; ++i) { if (RE_CHARSET.test(parsed[i][0])) { charset = parsed[i][1].toLowerCase(); break; } } } } if (contype === void 0) { contype = "text/plain"; } if (charset === void 0) { charset = defCharset; } if (header["content-disposition"]) { parsed = parseParams(header["content-disposition"][0]); if (!RE_FIELD.test(parsed[0])) { return skipPart(part); } for (i = 0, len = parsed.length; i < len; ++i) { if (RE_NAME.test(parsed[i][0])) { fieldname = parsed[i][1]; } else if (RE_FILENAME.test(parsed[i][0])) { filename = parsed[i][1]; if (!preservePath) { filename = basename(filename); } } } } else { return skipPart(part); } if (header["content-transfer-encoding"]) { encoding = header["content-transfer-encoding"][0].toLowerCase(); } else { encoding = "7bit"; } let onData, onEnd; if (isPartAFile(fieldname, contype, filename)) { if (nfiles === filesLimit) { if (!boy.hitFilesLimit) { boy.hitFilesLimit = true; boy.emit("filesLimit"); } return skipPart(part); } ++nfiles; if (boy.listenerCount("file") === 0) { self2.parser._ignore(); return; } ++nends; const file = new FileStream(fileOpts); curFile = file; file.on("end", function() { --nends; self2._pause = false; checkFinished(); if (self2._cb && !self2._needDrain) { const cb = self2._cb; self2._cb = void 0; cb(); } }); file._read = function(n) { if (!self2._pause) { return; } self2._pause = false; if (self2._cb && !self2._needDrain) { const cb = self2._cb; self2._cb = void 0; cb(); } }; boy.emit("file", fieldname, file, filename, encoding, contype); onData = /* @__PURE__ */ __name(function(data) { if ((nsize += data.length) > fileSizeLimit) { const extralen = fileSizeLimit - nsize + data.length; if (extralen > 0) { file.push(data.slice(0, extralen)); } file.truncated = true; file.bytesRead = fileSizeLimit; part.removeAllListeners("data"); file.emit("limit"); return; } else if (!file.push(data)) { self2._pause = true; } file.bytesRead = nsize; }, "onData"); onEnd = /* @__PURE__ */ __name(function() { curFile = void 0; file.push(null); }, "onEnd"); } else { if (nfields === fieldsLimit) { if (!boy.hitFieldsLimit) { boy.hitFieldsLimit = true; boy.emit("fieldsLimit"); } return skipPart(part); } ++nfields; ++nends; let buffer = ""; let truncated = false; curField = part; onData = /* @__PURE__ */ __name(function(data) { if ((nsize += data.length) > fieldSizeLimit) { const extralen = fieldSizeLimit - (nsize - data.length); buffer += data.toString("binary", 0, extralen); truncated = true; part.removeAllListeners("data"); } else { buffer += data.toString("binary"); } }, "onData"); onEnd = /* @__PURE__ */ __name(function() { curField = void 0; if (buffer.length) { buffer = decodeText(buffer, "binary", charset); } boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); --nends; checkFinished(); }, "onEnd"); } part._readableState.sync = false; part.on("data", onData); part.on("end", onEnd); }).on("error", function(err) { if (curFile) { curFile.emit("error", err); } }); }, "onPart")).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { finished = true; checkFinished(); }); } __name(Multipart, "Multipart"); Multipart.prototype.write = function(chunk, cb) { const r = this.parser.write(chunk); if (r && !this._pause) { cb(); } else { this._needDrain = !r; this._cb = cb; } }; Multipart.prototype.end = function() { const self2 = this; if (self2.parser.writable) { self2.parser.end(); } else if (!self2._boy._done) { process.nextTick(function() { self2._boy._done = true; self2._boy.emit("finish"); }); } }; function skipPart(part) { part.resume(); } __name(skipPart, "skipPart"); function FileStream(opts) { Readable.call(this, opts); this.bytesRead = 0; this.truncated = false; } __name(FileStream, "FileStream"); inherits(FileStream, Readable); FileStream.prototype._read = function(n) { }; module2.exports = Multipart; } }); // node_modules/@fastify/busboy/lib/utils/Decoder.js var require_Decoder = __commonJS({ "node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports2, module2) { "use strict"; var RE_PLUS = /\+/g; var HEX = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; function Decoder() { this.buffer = void 0; } __name(Decoder, "Decoder"); Decoder.prototype.write = function(str) { str = str.replace(RE_PLUS, " "); let res = ""; let i = 0; let p = 0; const len = str.length; for (; i < len; ++i) { if (this.buffer !== void 0) { if (!HEX[str.charCodeAt(i)]) { res += "%" + this.buffer; this.buffer = void 0; --i; } else { this.buffer += str[i]; ++p; if (this.buffer.length === 2) { res += String.fromCharCode(parseInt(this.buffer, 16)); this.buffer = void 0; } } } else if (str[i] === "%") { if (i > p) { res += str.substring(p, i); p = i; } this.buffer = ""; ++p; } } if (p < len && this.buffer === void 0) { res += str.substring(p); } return res; }; Decoder.prototype.reset = function() { this.buffer = void 0; }; module2.exports = Decoder; } }); // node_modules/@fastify/busboy/lib/types/urlencoded.js var require_urlencoded = __commonJS({ "node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports2, module2) { "use strict"; var Decoder = require_Decoder(); var decodeText = require_decodeText(); var getLimit = require_getLimit(); var RE_CHARSET = /^charset$/i; UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; function UrlEncoded(boy, cfg) { const limits = cfg.limits; const parsedConType = cfg.parsedConType; this.boy = boy; this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); this.fieldsLimit = getLimit(limits, "fields", Infinity); let charset; for (var i = 0, len = parsedConType.length; i < len; ++i) { if (Array.isArray(parsedConType[i]) && RE_CHARSET.test(parsedConType[i][0])) { charset = parsedConType[i][1].toLowerCase(); break; } } if (charset === void 0) { charset = cfg.defCharset || "utf8"; } this.decoder = new Decoder(); this.charset = charset; this._fields = 0; this._state = "key"; this._checkingBytes = true; this._bytesKey = 0; this._bytesVal = 0; this._key = ""; this._val = ""; this._keyTrunc = false; this._valTrunc = false; this._hitLimit = false; } __name(UrlEncoded, "UrlEncoded"); UrlEncoded.prototype.write = function(data, cb) { if (this._fields === this.fieldsLimit) { if (!this.boy.hitFieldsLimit) { this.boy.hitFieldsLimit = true; this.boy.emit("fieldsLimit"); } return cb(); } let idxeq; let idxamp; let i; let p = 0; const len = data.length; while (p < len) { if (this._state === "key") { idxeq = idxamp = void 0; for (i = p; i < len; ++i) { if (!this._checkingBytes) { ++p; } if (data[i] === 61) { idxeq = i; break; } else if (data[i] === 38) { idxamp = i; break; } if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { this._hitLimit = true; break; } else if (this._checkingBytes) { ++this._bytesKey; } } if (idxeq !== void 0) { if (idxeq > p) { this._key += this.decoder.write(data.toString("binary", p, idxeq)); } this._state = "val"; this._hitLimit = false; this._checkingBytes = true; this._val = ""; this._bytesVal = 0; this._valTrunc = false; this.decoder.reset(); p = idxeq + 1; } else if (idxamp !== void 0) { ++this._fields; let key; const keyTrunc = this._keyTrunc; if (idxamp > p) { key = this._key += this.decoder.write(data.toString("binary", p, idxamp)); } else { key = this._key; } this._hitLimit = false; this._checkingBytes = true; this._key = ""; this._bytesKey = 0; this._keyTrunc = false; this.decoder.reset(); if (key.length) { this.boy.emit( "field", decodeText(key, "binary", this.charset), "", keyTrunc, false ); } p = idxamp + 1; if (this._fields === this.fieldsLimit) { return cb(); } } else if (this._hitLimit) { if (i > p) { this._key += this.decoder.write(data.toString("binary", p, i)); } p = i; if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { this._checkingBytes = false; this._keyTrunc = true; } } else { if (p < len) { this._key += this.decoder.write(data.toString("binary", p)); } p = len; } } else { idxamp = void 0; for (i = p; i < len; ++i) { if (!this._checkingBytes) { ++p; } if (data[i] === 38) { idxamp = i; break; } if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { this._hitLimit = true; break; } else if (this._checkingBytes) { ++this._bytesVal; } } if (idxamp !== void 0) { ++this._fields; if (idxamp > p) { this._val += this.decoder.write(data.toString("binary", p, idxamp)); } this.boy.emit( "field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc ); this._state = "key"; this._hitLimit = false; this._checkingBytes = true; this._key = ""; this._bytesKey = 0; this._keyTrunc = false; this.decoder.reset(); p = idxamp + 1; if (this._fields === this.fieldsLimit) { return cb(); } } else if (this._hitLimit) { if (i > p) { this._val += this.decoder.write(data.toString("binary", p, i)); } p = i; if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { this._checkingBytes = false; this._valTrunc = true; } } else { if (p < len) { this._val += this.decoder.write(data.toString("binary", p)); } p = len; } } } cb(); }; UrlEncoded.prototype.end = function() { if (this.boy._done) { return; } if (this._state === "key" && this._key.length > 0) { this.boy.emit( "field", decodeText(this._key, "binary", this.charset), "", this._keyTrunc, false ); } else if (this._state === "val") { this.boy.emit( "field", decodeText(this._key, "binary", this.charset), decodeText(this._val, "binary", this.charset), this._keyTrunc, this._valTrunc ); } this.boy._done = true; this.boy.emit("finish"); }; module2.exports = UrlEncoded; } }); // node_modules/@fastify/busboy/lib/main.js var require_main = __commonJS({ "node_modules/@fastify/busboy/lib/main.js"(exports2, module2) { "use strict"; var WritableStream = require("node:stream").Writable; var { inherits } = require("node:util"); var Dicer = require_Dicer(); var MultipartParser = require_multipart(); var UrlencodedParser = require_urlencoded(); var parseParams = require_parseParams(); function Busboy(opts) { if (!(this instanceof Busboy)) { return new Busboy(opts); } if (typeof opts !== "object") { throw new TypeError("Busboy expected an options-Object."); } if (typeof opts.headers !== "object") { throw new TypeError("Busboy expected an options-Object with headers-attribute."); } if (typeof opts.headers["content-type"] !== "string") { throw new TypeError("Missing Content-Type-header."); } const { headers, ...streamOptions } = opts; this.opts = { autoDestroy: false, ...streamOptions }; WritableStream.call(this, this.opts); this._done = false; this._parser = this.getParserByHeaders(headers); this._finished = false; } __name(Busboy, "Busboy"); inherits(Busboy, WritableStream); Busboy.prototype.emit = function(ev) { if (ev === "finish") { if (!this._done) { this._parser?.end(); return; } else if (this._finished) { return; } this._finished = true; } WritableStream.prototype.emit.apply(this, arguments); }; Busboy.prototype.getParserByHeaders = function(headers) { const parsed = parseParams(headers["content-type"]); const cfg = { defCharset: this.opts.defCharset, fileHwm: this.opts.fileHwm, headers, highWaterMark: this.opts.highWaterMark, isPartAFile: this.opts.isPartAFile, limits: this.opts.limits, parsedConType: parsed, preservePath: this.opts.preservePath }; if (MultipartParser.detect.test(parsed[0])) { return new MultipartParser(this, cfg); } if (UrlencodedParser.detect.test(parsed[0])) { return new UrlencodedParser(this, cfg); } throw new Error("Unsupported Content-Type."); }; Busboy.prototype._write = function(chunk, encoding, cb) { this._parser.write(chunk, cb); }; module2.exports = Busboy; module2.exports.default = Busboy; module2.exports.Busboy = Busboy; module2.exports.Dicer = Dicer; } }); // node_modules/undici/lib/fetch/constants.js var require_constants3 = __commonJS({ "node_modules/undici/lib/fetch/constants.js"(exports2, module2) { "use strict"; var { MessageChannel, receiveMessageOnPort } = require("worker_threads"); var corsSafeListedMethods = ["GET", "HEAD", "POST"]; var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); var nullBodyStatus = [101, 204, 205, 304]; var redirectStatus = [301, 302, 303, 307, 308]; var redirectStatusSet = new Set(redirectStatus); var badPorts = [ "1", "7", "9", "11", "13", "15", "17", "19", "20", "21", "22", "23", "25", "37", "42", "43", "53", "69", "77", "79", "87", "95", "101", "102", "103", "104", "109", "110", "111", "113", "115", "117", "119", "123", "135", "137", "139", "143", "161", "179", "389", "427", "465", "512", "513", "514", "515", "526", "530", "531", "532", "540", "548", "554", "556", "563", "587", "601", "636", "989", "990", "993", "995", "1719", "1720", "1723", "2049", "3659", "4045", "5060", "5061", "6000", "6566", "6665", "6666", "6667", "6668", "6669", "6697", "10080" ]; var badPortsSet = new Set(badPorts); var referrerPolicy = [ "", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url" ]; var referrerPolicySet = new Set(referrerPolicy); var requestRedirect = ["follow", "manual", "error"]; var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"]; var safeMethodsSet = new Set(safeMethods); var requestMode = ["navigate", "same-origin", "no-cors", "cors"]; var requestCredentials = ["omit", "same-origin", "include"]; var requestCache = [ "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" ]; var requestBodyHeader = [ "content-encoding", "content-language", "content-location", "content-type", // See https://github.com/nodejs/undici/issues/2021 // 'Content-Length' is a forbidden header name, which is typically // removed in the Headers implementation. However, undici doesn't // filter out headers, so we add it here. "content-length" ]; var requestDuplex = [ "half" ]; var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"]; var forbiddenMethodsSet = new Set(forbiddenMethods); var subresource = [ "audio", "audioworklet", "font", "image", "manifest", "paintworklet", "script", "style", "track", "video", "xslt", "" ]; var subresourceSet = new Set(subresource); var DOMException2 = globalThis.DOMException ?? (() => { try { atob("~"); } catch (err) { return Object.getPrototypeOf(err).constructor; } })(); var channel; var structuredClone = globalThis.structuredClone ?? // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js // structuredClone was added in v17.0.0, but fetch supports v16.8 /* @__PURE__ */ __name(function structuredClone2(value, options = void 0) { if (arguments.length === 0) { throw new TypeError("missing argument"); } if (!channel) { channel = new MessageChannel(); } channel.port1.unref(); channel.port2.unref(); channel.port1.postMessage(value, options?.transfer); return receiveMessageOnPort(channel.port2).message; }, "structuredClone"); module2.exports = { DOMException: DOMException2, structuredClone, subresource, forbiddenMethods, requestBodyHeader, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, redirectStatus, corsSafeListedMethods, nullBodyStatus, safeMethods, badPorts, requestDuplex, subresourceSet, badPortsSet, redirectStatusSet, corsSafeListedMethodsSet, safeMethodsSet, forbiddenMethodsSet, referrerPolicySet }; } }); // node_modules/undici/lib/fetch/global.js var require_global = __commonJS({ "node_modules/undici/lib/fetch/global.js"(exports2, module2) { "use strict"; var globalOrigin = Symbol.for("undici.globalOrigin.1"); function getGlobalOrigin() { return globalThis[globalOrigin]; } __name(getGlobalOrigin, "getGlobalOrigin"); function setGlobalOrigin(newOrigin) { if (newOrigin === void 0) { Object.defineProperty(globalThis, globalOrigin, { value: void 0, writable: true, enumerable: false, configurable: false }); return; } const parsedURL = new URL(newOrigin); if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); } Object.defineProperty(globalThis, globalOrigin, { value: parsedURL, writable: true, enumerable: false, configurable: false }); } __name(setGlobalOrigin, "setGlobalOrigin"); module2.exports = { getGlobalOrigin, setGlobalOrigin }; } }); // node_modules/undici/lib/fetch/util.js var require_util2 = __commonJS({ "node_modules/undici/lib/fetch/util.js"(exports2, module2) { "use strict"; var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants3(); var { getGlobalOrigin } = require_global(); var { performance: performance2 } = require("perf_hooks"); var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util(); var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; var crypto2; try { crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { const urlList = response.urlList; const length = urlList.length; return length === 0 ? null : urlList[length - 1].toString(); } __name(responseURL, "responseURL"); function responseLocationURL(response, requestFragment) { if (!redirectStatusSet.has(response.status)) { return null; } let location = response.headersList.get("location"); if (location !== null && isValidHeaderValue(location)) { location = new URL(location, responseURL(response)); } if (location && !location.hash) { location.hash = requestFragment; } return location; } __name(responseLocationURL, "responseLocationURL"); function requestCurrentURL(request) { return request.urlList[request.urlList.length - 1]; } __name(requestCurrentURL, "requestCurrentURL"); function requestBadPort(request) { const url = requestCurrentURL(request); if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { return "blocked"; } return "allowed"; } __name(requestBadPort, "requestBadPort"); function isErrorLike(object) { return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); } __name(isErrorLike, "isErrorLike"); function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { const c = statusText.charCodeAt(i); if (!(c === 9 || // HTAB c >= 32 && c <= 126 || // SP / VCHAR c >= 128 && c <= 255)) { return false; } } return true; } __name(isValidReasonPhrase, "isValidReasonPhrase"); function isTokenCharCode(c) { switch (c) { case 34: case 40: case 41: case 44: case 47: case 58: case 59: case 60: case 61: case 62: case 63: case 64: case 91: case 92: case 93: case 123: case 125: return false; default: return c >= 33 && c <= 126; } } __name(isTokenCharCode, "isTokenCharCode"); function isValidHTTPToken(characters) { if (characters.length === 0) { return false; } for (let i = 0; i < characters.length; ++i) { if (!isTokenCharCode(characters.charCodeAt(i))) { return false; } } return true; } __name(isValidHTTPToken, "isValidHTTPToken"); function isValidHeaderName(potentialValue) { return isValidHTTPToken(potentialValue); } __name(isValidHeaderName, "isValidHeaderName"); function isValidHeaderValue(potentialValue) { if (potentialValue.startsWith(" ") || potentialValue.startsWith(" ") || potentialValue.endsWith(" ") || potentialValue.endsWith(" ")) { return false; } if (potentialValue.includes("\0") || potentialValue.includes("\r") || potentialValue.includes("\n")) { return false; } return true; } __name(isValidHeaderValue, "isValidHeaderValue"); function setRequestReferrerPolicyOnRedirect(request, actualResponse) { const { headersList } = actualResponse; const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); let policy = ""; if (policyHeader.length > 0) { for (let i = policyHeader.length; i !== 0; i--) { const token = policyHeader[i - 1].trim(); if (referrerPolicyTokens.has(token)) { policy = token; break; } } } if (policy !== "") { request.referrerPolicy = policy; } } __name(setRequestReferrerPolicyOnRedirect, "setRequestReferrerPolicyOnRedirect"); function crossOriginResourcePolicyCheck() { return "allowed"; } __name(crossOriginResourcePolicyCheck, "crossOriginResourcePolicyCheck"); function corsCheck() { return "success"; } __name(corsCheck, "corsCheck"); function TAOCheck() { return "success"; } __name(TAOCheck, "TAOCheck"); function appendFetchMetadata(httpRequest) { let header = null; header = httpRequest.mode; httpRequest.headersList.set("sec-fetch-mode", header); } __name(appendFetchMetadata, "appendFetchMetadata"); function appendRequestOriginHeader(request) { let serializedOrigin = request.origin; if (request.responseTainting === "cors" || request.mode === "websocket") { if (serializedOrigin) { request.headersList.append("origin", serializedOrigin); } } else if (request.method !== "GET" && request.method !== "HEAD") { switch (request.referrerPolicy) { case "no-referrer": serializedOrigin = null; break; case "no-referrer-when-downgrade": case "strict-origin": case "strict-origin-when-cross-origin": if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { serializedOrigin = null; } break; case "same-origin": if (!sameOrigin(request, requestCurrentURL(request))) { serializedOrigin = null; } break; default: } if (serializedOrigin) { request.headersList.append("origin", serializedOrigin); } } } __name(appendRequestOriginHeader, "appendRequestOriginHeader"); function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { return performance2.now(); } __name(coarsenedSharedCurrentTime, "coarsenedSharedCurrentTime"); function createOpaqueTimingInfo(timingInfo) { return { startTime: timingInfo.startTime ?? 0, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: timingInfo.startTime ?? 0, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 0, finalNetworkRequestStartTime: 0, endTime: 0, encodedBodySize: 0, decodedBodySize: 0, finalConnectionTimingInfo: null }; } __name(createOpaqueTimingInfo, "createOpaqueTimingInfo"); function makePolicyContainer() { return { referrerPolicy: "strict-origin-when-cross-origin" }; } __name(makePolicyContainer, "makePolicyContainer"); function clonePolicyContainer(policyContainer) { return { referrerPolicy: policyContainer.referrerPolicy }; } __name(clonePolicyContainer, "clonePolicyContainer"); function determineRequestsReferrer(request) { const policy = request.referrerPolicy; assert(policy); let referrerSource = null; if (request.referrer === "client") { const globalOrigin = getGlobalOrigin(); if (!globalOrigin || globalOrigin.origin === "null") { return "no-referrer"; } referrerSource = new URL(globalOrigin); } else if (request.referrer instanceof URL) { referrerSource = request.referrer; } let referrerURL = stripURLForReferrer(referrerSource); const referrerOrigin = stripURLForReferrer(referrerSource, true); if (referrerURL.toString().length > 4096) { referrerURL = referrerOrigin; } const areSameOrigin = sameOrigin(request, referrerURL); const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); switch (policy) { case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); case "unsafe-url": return referrerURL; case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; case "strict-origin-when-cross-origin": { const currentURL = requestCurrentURL(request); if (sameOrigin(referrerURL, currentURL)) { return referrerURL; } if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { return "no-referrer"; } return referrerOrigin; } case "strict-origin": case "no-referrer-when-downgrade": default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } __name(determineRequestsReferrer, "determineRequestsReferrer"); function stripURLForReferrer(url, originOnly) { assert(url instanceof URL); if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { return "no-referrer"; } url.username = ""; url.password = ""; url.hash = ""; if (originOnly) { url.pathname = ""; url.search = ""; } return url; } __name(stripURLForReferrer, "stripURLForReferrer"); function isURLPotentiallyTrustworthy(url) { if (!(url instanceof URL)) { return false; } if (url.href === "about:blank" || url.href === "about:srcdoc") { return true; } if (url.protocol === "data:") return true; if (url.protocol === "file:") return true; return isOriginPotentiallyTrustworthy(url.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { return true; } if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { return true; } return false; } __name(isOriginPotentiallyTrustworthy, "isOriginPotentiallyTrustworthy"); } __name(isURLPotentiallyTrustworthy, "isURLPotentiallyTrustworthy"); function bytesMatch(bytes, metadataList) { if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); if (parsedMetadata === "no metadata") { return true; } if (parsedMetadata.length === 0) { return true; } const strongest = getStrongestMetadata(parsedMetadata); const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); } else { actualValue = actualValue.slice(0, -1); } } if (compareBase64Mixed(actualValue, expectedValue)) { return true; } } return false; } __name(bytesMatch, "bytesMatch"); var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; function parseMetadata(metadata) { const result = []; let empty = true; for (const token of metadata.split(" ")) { empty = false; const parsedToken = parseHashWithOptions.exec(token); if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { continue; } const algorithm = parsedToken.groups.algo.toLowerCase(); if (supportedHashes.includes(algorithm)) { result.push(parsedToken.groups); } } if (empty === true) { return "no metadata"; } return result; } __name(parseMetadata, "parseMetadata"); function getStrongestMetadata(metadataList) { let algorithm = metadataList[0].algo; if (algorithm[3] === "5") { return algorithm; } for (let i = 1; i < metadataList.length; ++i) { const metadata = metadataList[i]; if (metadata.algo[3] === "5") { algorithm = "sha512"; break; } else if (algorithm[3] === "3") { continue; } else if (metadata.algo[3] === "3") { algorithm = "sha384"; } } return algorithm; } __name(getStrongestMetadata, "getStrongestMetadata"); function filterMetadataListByAlgorithm(metadataList, algorithm) { if (metadataList.length === 1) { return metadataList; } let pos = 0; for (let i = 0; i < metadataList.length; ++i) { if (metadataList[i].algo === algorithm) { metadataList[pos++] = metadataList[i]; } } metadataList.length = pos; return metadataList; } __name(filterMetadataListByAlgorithm, "filterMetadataListByAlgorithm"); function compareBase64Mixed(actualValue, expectedValue) { if (actualValue.length !== expectedValue.length) { return false; } for (let i = 0; i < actualValue.length; ++i) { if (actualValue[i] !== expectedValue[i]) { if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { continue; } return false; } } return true; } __name(compareBase64Mixed, "compareBase64Mixed"); function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { } __name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL"); function sameOrigin(A, B) { if (A.origin === B.origin && A.origin === "null") { return true; } if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { return true; } return false; } __name(sameOrigin, "sameOrigin"); function createDeferredPromise() { let res; let rej; const promise = new Promise((resolve, reject) => { res = resolve; rej = reject; }); return { promise, resolve: res, reject: rej }; } __name(createDeferredPromise, "createDeferredPromise"); function isAborted(fetchParams) { return fetchParams.controller.state === "aborted"; } __name(isAborted, "isAborted"); function isCancelled(fetchParams) { return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } __name(isCancelled, "isCancelled"); var normalizeMethodRecord = { delete: "DELETE", DELETE: "DELETE", get: "GET", GET: "GET", head: "HEAD", HEAD: "HEAD", options: "OPTIONS", OPTIONS: "OPTIONS", post: "POST", POST: "POST", put: "PUT", PUT: "PUT" }; Object.setPrototypeOf(normalizeMethodRecord, null); function normalizeMethod(method) { return normalizeMethodRecord[method.toLowerCase()] ?? method; } __name(normalizeMethod, "normalizeMethod"); function serializeJavascriptValueToJSONString(value) { const result = JSON.stringify(value); if (result === void 0) { throw new TypeError("Value is not JSON serializable"); } assert(typeof result === "string"); return result; } __name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString"); var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function makeIterator(iterator, name, kind) { const object = { index: 0, kind, target: iterator }; const i = { next() { if (Object.getPrototypeOf(this) !== i) { throw new TypeError( `'next' called on an object that does not implement interface ${name} Iterator.` ); } const { index, kind: kind2, target } = object; const values = target(); const len = values.length; if (index >= len) { return { value: void 0, done: true }; } const pair = values[index]; object.index = index + 1; return iteratorResult(pair, kind2); }, // The class string of an iterator prototype object for a given interface is the // result of concatenating the identifier of the interface and the string " Iterator". [Symbol.toStringTag]: `${name} Iterator` }; Object.setPrototypeOf(i, esIteratorPrototype); return Object.setPrototypeOf({}, i); } __name(makeIterator, "makeIterator"); function iteratorResult(pair, kind) { let result; switch (kind) { case "key": { result = pair[0]; break; } case "value": { result = pair[1]; break; } case "key+value": { result = pair; break; } } return { value: result, done: false }; } __name(iteratorResult, "iteratorResult"); async function fullyReadBody(body, processBody, processBodyError) { const successSteps = processBody; const errorSteps = processBodyError; let reader; try { reader = body.stream.getReader(); } catch (e) { errorSteps(e); return; } try { const result = await readAllBytes(reader); successSteps(result); } catch (e) { errorSteps(e); } } __name(fullyReadBody, "fullyReadBody"); var ReadableStream2 = globalThis.ReadableStream; function isReadableStreamLike(stream) { if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } return stream instanceof ReadableStream2 || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; } __name(isReadableStreamLike, "isReadableStreamLike"); var MAXIMUM_ARGUMENT_LENGTH = 65535; function isomorphicDecode(input) { if (input.length < MAXIMUM_ARGUMENT_LENGTH) { return String.fromCharCode(...input); } return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); } __name(isomorphicDecode, "isomorphicDecode"); function readableStreamClose(controller) { try { controller.close(); } catch (err) { if (!err.message.includes("Controller is already closed")) { throw err; } } } __name(readableStreamClose, "readableStreamClose"); function isomorphicEncode(input) { for (let i = 0; i < input.length; i++) { assert(input.charCodeAt(i) <= 255); } return input; } __name(isomorphicEncode, "isomorphicEncode"); async function readAllBytes(reader) { const bytes = []; let byteLength = 0; while (true) { const { done, value: chunk } = await reader.read(); if (done) { return Buffer.concat(bytes, byteLength); } if (!isUint8Array(chunk)) { throw new TypeError("Received non-Uint8Array chunk"); } bytes.push(chunk); byteLength += chunk.length; } } __name(readAllBytes, "readAllBytes"); function urlIsLocal(url) { assert("protocol" in url); const protocol = url.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } __name(urlIsLocal, "urlIsLocal"); function urlHasHttpsScheme(url) { if (typeof url === "string") { return url.startsWith("https:"); } return url.protocol === "https:"; } __name(urlHasHttpsScheme, "urlHasHttpsScheme"); function urlIsHttpHttpsScheme(url) { assert("protocol" in url); const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } __name(urlIsHttpHttpsScheme, "urlIsHttpHttpsScheme"); var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); module2.exports = { isAborted, isCancelled, createDeferredPromise, ReadableStreamFrom, toUSVString, tryUpgradeRequestToAPotentiallyTrustworthyURL, coarsenedSharedCurrentTime, determineRequestsReferrer, makePolicyContainer, clonePolicyContainer, appendFetchMetadata, appendRequestOriginHeader, TAOCheck, corsCheck, crossOriginResourcePolicyCheck, createOpaqueTimingInfo, setRequestReferrerPolicyOnRedirect, isValidHTTPToken, requestBadPort, requestCurrentURL, responseURL, responseLocationURL, isBlobLike, isURLPotentiallyTrustworthy, isValidReasonPhrase, sameOrigin, normalizeMethod, serializeJavascriptValueToJSONString, makeIterator, isValidHeaderName, isValidHeaderValue, hasOwn, isErrorLike, fullyReadBody, bytesMatch, isReadableStreamLike, readableStreamClose, isomorphicEncode, isomorphicDecode, urlIsLocal, urlHasHttpsScheme, urlIsHttpHttpsScheme, readAllBytes, normalizeMethodRecord, parseMetadata }; } }); // node_modules/undici/lib/fetch/symbols.js var require_symbols2 = __commonJS({ "node_modules/undici/lib/fetch/symbols.js"(exports2, module2) { "use strict"; module2.exports = { kUrl: Symbol("url"), kHeaders: Symbol("headers"), kSignal: Symbol("signal"), kState: Symbol("state"), kGuard: Symbol("guard"), kRealm: Symbol("realm") }; } }); // node_modules/undici/lib/fetch/webidl.js var require_webidl = __commonJS({ "node_modules/undici/lib/fetch/webidl.js"(exports2, module2) { "use strict"; var { types } = require("util"); var { hasOwn, toUSVString } = require_util2(); var webidl = {}; webidl.converters = {}; webidl.util = {}; webidl.errors = {}; webidl.errors.exception = function(message) { return new TypeError(`${message.header}: ${message.message}`); }; webidl.errors.conversionFailed = function(context) { const plural = context.types.length === 1 ? "" : " one of"; const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; return webidl.errors.exception({ header: context.prefix, message }); }; webidl.errors.invalidArgument = function(context) { return webidl.errors.exception({ header: context.prefix, message: `"${context.value}" is an invalid ${context.type}.` }); }; webidl.brandCheck = function(V, I, opts = void 0) { if (opts?.strict !== false && !(V instanceof I)) { throw new TypeError("Illegal invocation"); } else { return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]; } }; webidl.argumentLengthCheck = function({ length }, min, ctx) { if (length < min) { throw webidl.errors.exception({ message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, ...ctx }); } }; webidl.illegalConstructor = function() { throw webidl.errors.exception({ header: "TypeError", message: "Illegal constructor" }); }; webidl.util.Type = function(V) { switch (typeof V) { case "undefined": return "Undefined"; case "boolean": return "Boolean"; case "string": return "String"; case "symbol": return "Symbol"; case "number": return "Number"; case "bigint": return "BigInt"; case "function": case "object": { if (V === null) { return "Null"; } return "Object"; } } }; webidl.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { let upperBound; let lowerBound; if (bitLength === 64) { upperBound = Math.pow(2, 53) - 1; if (signedness === "unsigned") { lowerBound = 0; } else { lowerBound = Math.pow(-2, 53) + 1; } } else if (signedness === "unsigned") { lowerBound = 0; upperBound = Math.pow(2, bitLength) - 1; } else { lowerBound = Math.pow(-2, bitLength) - 1; upperBound = Math.pow(2, bitLength - 1) - 1; } let x = Number(V); if (x === 0) { x = 0; } if (opts.enforceRange === true) { if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { throw webidl.errors.exception({ header: "Integer conversion", message: `Could not convert ${V} to an integer.` }); } x = webidl.util.IntegerPart(x); if (x < lowerBound || x > upperBound) { throw webidl.errors.exception({ header: "Integer conversion", message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` }); } return x; } if (!Number.isNaN(x) && opts.clamp === true) { x = Math.min(Math.max(x, lowerBound), upperBound); if (Math.floor(x) % 2 === 0) { x = Math.floor(x); } else { x = Math.ceil(x); } return x; } if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { return 0; } x = webidl.util.IntegerPart(x); x = x % Math.pow(2, bitLength); if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { return x - Math.pow(2, bitLength); } return x; }; webidl.util.IntegerPart = function(n) { const r = Math.floor(Math.abs(n)); if (n < 0) { return -1 * r; } return r; }; webidl.sequenceConverter = function(converter) { return (V) => { if (webidl.util.Type(V) !== "Object") { throw webidl.errors.exception({ header: "Sequence", message: `Value of type ${webidl.util.Type(V)} is not an Object.` }); } const method = V?.[Symbol.iterator]?.(); const seq = []; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ header: "Sequence", message: "Object is not an iterator." }); } while (true) { const { done, value } = method.next(); if (done) { break; } seq.push(converter(value)); } return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { return (O) => { if (webidl.util.Type(O) !== "Object") { throw webidl.errors.exception({ header: "Record", message: `Value of type ${webidl.util.Type(O)} is not an Object.` }); } const result = {}; if (!types.isProxy(O)) { const keys2 = Object.keys(O); for (const key of keys2) { const typedKey = keyConverter(key); const typedValue = valueConverter(O[key]); result[typedKey] = typedValue; } return result; } const keys = Reflect.ownKeys(O); for (const key of keys) { const desc = Reflect.getOwnPropertyDescriptor(O, key); if (desc?.enumerable) { const typedKey = keyConverter(key); const typedValue = valueConverter(O[key]); result[typedKey] = typedValue; } } return result; }; }; webidl.interfaceConverter = function(i) { return (V, opts = {}) => { if (opts.strict !== false && !(V instanceof i)) { throw webidl.errors.exception({ header: i.name, message: `Expected ${V} to be an instance of ${i.name}.` }); } return V; }; }; webidl.dictionaryConverter = function(converters) { return (dictionary) => { const type = webidl.util.Type(dictionary); const dict = {}; if (type === "Null" || type === "Undefined") { return dict; } else if (type !== "Object") { throw webidl.errors.exception({ header: "Dictionary", message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` }); } for (const options of converters) { const { key, defaultValue, required, converter } = options; if (required === true) { if (!hasOwn(dictionary, key)) { throw webidl.errors.exception({ header: "Dictionary", message: `Missing required key "${key}".` }); } } let value = dictionary[key]; const hasDefault = hasOwn(options, "defaultValue"); if (hasDefault && value !== null) { value = value ?? defaultValue; } if (required || hasDefault || value !== void 0) { value = converter(value); if (options.allowedValues && !options.allowedValues.includes(value)) { throw webidl.errors.exception({ header: "Dictionary", message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` }); } dict[key] = value; } } return dict; }; }; webidl.nullableConverter = function(converter) { return (V) => { if (V === null) { return V; } return converter(V); }; }; webidl.converters.DOMString = function(V, opts = {}) { if (V === null && opts.legacyNullToEmptyString) { return ""; } if (typeof V === "symbol") { throw new TypeError("Could not convert argument of type symbol to string."); } return String(V); }; webidl.converters.ByteString = function(V) { const x = webidl.converters.DOMString(V); for (let index = 0; index < x.length; index++) { if (x.charCodeAt(index) > 255) { throw new TypeError( `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` ); } } return x; }; webidl.converters.USVString = toUSVString; webidl.converters.boolean = function(V) { const x = Boolean(V); return x; }; webidl.converters.any = function(V) { return V; }; webidl.converters["long long"] = function(V) { const x = webidl.util.ConvertToInt(V, 64, "signed"); return x; }; webidl.converters["unsigned long long"] = function(V) { const x = webidl.util.ConvertToInt(V, 64, "unsigned"); return x; }; webidl.converters["unsigned long"] = function(V) { const x = webidl.util.ConvertToInt(V, 32, "unsigned"); return x; }; webidl.converters["unsigned short"] = function(V, opts) { const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts); return x; }; webidl.converters.ArrayBuffer = function(V, opts = {}) { if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { throw webidl.errors.conversionFailed({ prefix: `${V}`, argument: `${V}`, types: ["ArrayBuffer"] }); } if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." }); } return V; }; webidl.converters.TypedArray = function(V, T, opts = {}) { if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { throw webidl.errors.conversionFailed({ prefix: `${T.name}`, argument: `${V}`, types: [T.name] }); } if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." }); } return V; }; webidl.converters.DataView = function(V, opts = {}) { if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { throw webidl.errors.exception({ header: "DataView", message: "Object is not a DataView." }); } if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." }); } return V; }; webidl.converters.BufferSource = function(V, opts = {}) { if (types.isAnyArrayBuffer(V)) { return webidl.converters.ArrayBuffer(V, opts); } if (types.isTypedArray(V)) { return webidl.converters.TypedArray(V, V.constructor); } if (types.isDataView(V)) { return webidl.converters.DataView(V, opts); } throw new TypeError(`Could not convert ${V} to a BufferSource.`); }; webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.ByteString ); webidl.converters["sequence>"] = webidl.sequenceConverter( webidl.converters["sequence"] ); webidl.converters["record"] = webidl.recordConverter( webidl.converters.ByteString, webidl.converters.ByteString ); module2.exports = { webidl }; } }); // node_modules/undici/lib/fetch/dataURL.js var require_dataURL = __commonJS({ "node_modules/undici/lib/fetch/dataURL.js"(exports2, module2) { var assert = require("assert"); var { atob: atob2 } = require("buffer"); var { isomorphicDecode } = require_util2(); var encoder = new TextEncoder(); var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; var HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; var HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; function dataURLProcessor(dataURL) { assert(dataURL.protocol === "data:"); let input = URLSerializer(dataURL, true); input = input.slice(5); const position = { position: 0 }; let mimeType = collectASequenceOfCodePointsFast( ",", input, position ); const mimeTypeLength = mimeType.length; mimeType = removeASCIIWhitespace(mimeType, true, true); if (position.position >= input.length) { return "failure"; } position.position++; const encodedBody = input.slice(mimeTypeLength + 1); let body = stringPercentDecode(encodedBody); if (/;(\u0020){0,}base64$/i.test(mimeType)) { const stringBody = isomorphicDecode(body); body = forgivingBase64(stringBody); if (body === "failure") { return "failure"; } mimeType = mimeType.slice(0, -6); mimeType = mimeType.replace(/(\u0020)+$/, ""); mimeType = mimeType.slice(0, -1); } if (mimeType.startsWith(";")) { mimeType = "text/plain" + mimeType; } let mimeTypeRecord = parseMIMEType(mimeType); if (mimeTypeRecord === "failure") { mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); } return { mimeType: mimeTypeRecord, body }; } __name(dataURLProcessor, "dataURLProcessor"); function URLSerializer(url, excludeFragment = false) { if (!excludeFragment) { return url.href; } const href = url.href; const hashLength = url.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } __name(URLSerializer, "URLSerializer"); function collectASequenceOfCodePoints(condition, input, position) { let result = ""; while (position.position < input.length && condition(input[position.position])) { result += input[position.position]; position.position++; } return result; } __name(collectASequenceOfCodePoints, "collectASequenceOfCodePoints"); function collectASequenceOfCodePointsFast(char, input, position) { const idx = input.indexOf(char, position.position); const start = position.position; if (idx === -1) { position.position = input.length; return input.slice(start); } position.position = idx; return input.slice(start, position.position); } __name(collectASequenceOfCodePointsFast, "collectASequenceOfCodePointsFast"); function stringPercentDecode(input) { const bytes = encoder.encode(input); return percentDecode(bytes); } __name(stringPercentDecode, "stringPercentDecode"); function percentDecode(input) { const output = []; for (let i = 0; i < input.length; i++) { const byte = input[i]; if (byte !== 37) { output.push(byte); } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))) { output.push(37); } else { const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]); const bytePoint = Number.parseInt(nextTwoBytes, 16); output.push(bytePoint); i += 2; } } return Uint8Array.from(output); } __name(percentDecode, "percentDecode"); function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; const type = collectASequenceOfCodePointsFast( "/", input, position ); if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { return "failure"; } position.position++; let subtype = collectASequenceOfCodePointsFast( ";", input, position ); subtype = removeHTTPWhitespace(subtype, false, true); if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, subtype: subtypeLowercase, /** @type {Map} */ parameters: /* @__PURE__ */ new Map(), // https://mimesniff.spec.whatwg.org/#mime-type-essence essence: `${typeLowercase}/${subtypeLowercase}` }; while (position.position < input.length) { position.position++; collectASequenceOfCodePoints( // https://fetch.spec.whatwg.org/#http-whitespace (char) => HTTP_WHITESPACE_REGEX.test(char), input, position ); let parameterName = collectASequenceOfCodePoints( (char) => char !== ";" && char !== "=", input, position ); parameterName = parameterName.toLowerCase(); if (position.position < input.length) { if (input[position.position] === ";") { continue; } position.position++; } if (position.position > input.length) { break; } let parameterValue = null; if (input[position.position] === '"') { parameterValue = collectAnHTTPQuotedString(input, position, true); collectASequenceOfCodePointsFast( ";", input, position ); } else { parameterValue = collectASequenceOfCodePointsFast( ";", input, position ); parameterValue = removeHTTPWhitespace(parameterValue, false, true); if (parameterValue.length === 0) { continue; } } if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { mimeType.parameters.set(parameterName, parameterValue); } } return mimeType; } __name(parseMIMEType, "parseMIMEType"); function forgivingBase64(data) { data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); if (data.length % 4 === 0) { data = data.replace(/=?=$/, ""); } if (data.length % 4 === 1) { return "failure"; } if (/[^+/0-9A-Za-z]/.test(data)) { return "failure"; } const binary = atob2(data); const bytes = new Uint8Array(binary.length); for (let byte = 0; byte < binary.length; byte++) { bytes[byte] = binary.charCodeAt(byte); } return bytes; } __name(forgivingBase64, "forgivingBase64"); function collectAnHTTPQuotedString(input, position, extractValue) { const positionStart = position.position; let value = ""; assert(input[position.position] === '"'); position.position++; while (true) { value += collectASequenceOfCodePoints( (char) => char !== '"' && char !== "\\", input, position ); if (position.position >= input.length) { break; } const quoteOrBackslash = input[position.position]; position.position++; if (quoteOrBackslash === "\\") { if (position.position >= input.length) { value += "\\"; break; } value += input[position.position]; position.position++; } else { assert(quoteOrBackslash === '"'); break; } } if (extractValue) { return value; } return input.slice(positionStart, position.position); } __name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString"); function serializeAMimeType(mimeType) { assert(mimeType !== "failure"); const { parameters, essence } = mimeType; let serialization = essence; for (let [name, value] of parameters.entries()) { serialization += ";"; serialization += name; serialization += "="; if (!HTTP_TOKEN_CODEPOINTS.test(value)) { value = value.replace(/(\\|")/g, "\\$1"); value = '"' + value; value += '"'; } serialization += value; } return serialization; } __name(serializeAMimeType, "serializeAMimeType"); function isHTTPWhiteSpace(char) { return char === "\r" || char === "\n" || char === " " || char === " "; } __name(isHTTPWhiteSpace, "isHTTPWhiteSpace"); function removeHTTPWhitespace(str, leading = true, trailing = true) { let lead = 0; let trail = str.length - 1; if (leading) { for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++) ; } if (trailing) { for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--) ; } return str.slice(lead, trail + 1); } __name(removeHTTPWhitespace, "removeHTTPWhitespace"); function isASCIIWhitespace(char) { return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; } __name(isASCIIWhitespace, "isASCIIWhitespace"); function removeASCIIWhitespace(str, leading = true, trailing = true) { let lead = 0; let trail = str.length - 1; if (leading) { for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++) ; } if (trailing) { for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--) ; } return str.slice(lead, trail + 1); } __name(removeASCIIWhitespace, "removeASCIIWhitespace"); module2.exports = { dataURLProcessor, URLSerializer, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, stringPercentDecode, parseMIMEType, collectAnHTTPQuotedString, serializeAMimeType }; } }); // node_modules/undici/lib/fetch/file.js var require_file = __commonJS({ "node_modules/undici/lib/fetch/file.js"(exports2, module2) { "use strict"; var { Blob: Blob2, File: NativeFile } = require("buffer"); var { types } = require("util"); var { kState } = require_symbols2(); var { isBlobLike } = require_util2(); var { webidl } = require_webidl(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); var { kEnumerableProperty } = require_util(); var encoder = new TextEncoder(); var File2 = class _File extends Blob2 { static { __name(this, "File"); } constructor(fileBits, fileName, options = {}) { webidl.argumentLengthCheck(arguments, 2, { header: "File constructor" }); fileBits = webidl.converters["sequence"](fileBits); fileName = webidl.converters.USVString(fileName); options = webidl.converters.FilePropertyBag(options); const n = fileName; let t = options.type; let d; substep: { if (t) { t = parseMIMEType(t); if (t === "failure") { t = ""; break substep; } t = serializeAMimeType(t).toLowerCase(); } d = options.lastModified; } super(processBlobParts(fileBits, options), { type: t }); this[kState] = { name: n, lastModified: d, type: t }; } get name() { webidl.brandCheck(this, _File); return this[kState].name; } get lastModified() { webidl.brandCheck(this, _File); return this[kState].lastModified; } get type() { webidl.brandCheck(this, _File); return this[kState].type; } }; var FileLike = class _FileLike { static { __name(this, "FileLike"); } constructor(blobLike, fileName, options = {}) { const n = fileName; const t = options.type; const d = options.lastModified ?? Date.now(); this[kState] = { blobLike, name: n, type: t, lastModified: d }; } stream(...args) { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.stream(...args); } arrayBuffer(...args) { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.arrayBuffer(...args); } slice(...args) { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.slice(...args); } text(...args) { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.text(...args); } get size() { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.size; } get type() { webidl.brandCheck(this, _FileLike); return this[kState].blobLike.type; } get name() { webidl.brandCheck(this, _FileLike); return this[kState].name; } get lastModified() { webidl.brandCheck(this, _FileLike); return this[kState].lastModified; } get [Symbol.toStringTag]() { return "File"; } }; Object.defineProperties(File2.prototype, { [Symbol.toStringTag]: { value: "File", configurable: true }, name: kEnumerableProperty, lastModified: kEnumerableProperty }); webidl.converters.Blob = webidl.interfaceConverter(Blob2); webidl.converters.BlobPart = function(V, opts) { if (webidl.util.Type(V) === "Object") { if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { return webidl.converters.BufferSource(V, opts); } } return webidl.converters.USVString(V, opts); }; webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.BlobPart ); webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ { key: "lastModified", converter: webidl.converters["long long"], get defaultValue() { return Date.now(); } }, { key: "type", converter: webidl.converters.DOMString, defaultValue: "" }, { key: "endings", converter: (value) => { value = webidl.converters.DOMString(value); value = value.toLowerCase(); if (value !== "native") { value = "transparent"; } return value; }, defaultValue: "transparent" } ]); function processBlobParts(parts, options) { const bytes = []; for (const element of parts) { if (typeof element === "string") { let s = element; if (options.endings === "native") { s = convertLineEndingsNative(s); } bytes.push(encoder.encode(s)); } else if (types.isAnyArrayBuffer(element) || types.isTypedArray(element)) { if (!element.buffer) { bytes.push(new Uint8Array(element)); } else { bytes.push( new Uint8Array(element.buffer, element.byteOffset, element.byteLength) ); } } else if (isBlobLike(element)) { bytes.push(element); } } return bytes; } __name(processBlobParts, "processBlobParts"); function convertLineEndingsNative(s) { let nativeLineEnding = "\n"; if (process.platform === "win32") { nativeLineEnding = "\r\n"; } return s.replace(/\r?\n/g, nativeLineEnding); } __name(convertLineEndingsNative, "convertLineEndingsNative"); function isFileLike(object) { return NativeFile && object instanceof NativeFile || object instanceof File2 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; } __name(isFileLike, "isFileLike"); module2.exports = { File: File2, FileLike, isFileLike }; } }); // node_modules/undici/lib/fetch/formdata.js var require_formdata = __commonJS({ "node_modules/undici/lib/fetch/formdata.js"(exports2, module2) { "use strict"; var { isBlobLike, toUSVString, makeIterator } = require_util2(); var { kState } = require_symbols2(); var { File: UndiciFile, FileLike, isFileLike } = require_file(); var { webidl } = require_webidl(); var { Blob: Blob2, File: NativeFile } = require("buffer"); var File2 = NativeFile ?? UndiciFile; var FormData2 = class _FormData { static { __name(this, "FormData"); } constructor(form) { if (form !== void 0) { throw webidl.errors.conversionFailed({ prefix: "FormData constructor", argument: "Argument 1", types: ["undefined"] }); } this[kState] = []; } append(name, value, filename = void 0) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 2, { header: "FormData.append" }); if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" ); } name = webidl.converters.USVString(name); value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); filename = arguments.length === 3 ? webidl.converters.USVString(filename) : void 0; const entry = makeEntry(name, value, filename); this[kState].push(entry); } delete(name) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 1, { header: "FormData.delete" }); name = webidl.converters.USVString(name); this[kState] = this[kState].filter((entry) => entry.name !== name); } get(name) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 1, { header: "FormData.get" }); name = webidl.converters.USVString(name); const idx = this[kState].findIndex((entry) => entry.name === name); if (idx === -1) { return null; } return this[kState][idx].value; } getAll(name) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 1, { header: "FormData.getAll" }); name = webidl.converters.USVString(name); return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); } has(name) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); name = webidl.converters.USVString(name); return this[kState].findIndex((entry) => entry.name === name) !== -1; } set(name, value, filename = void 0) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); if (arguments.length === 3 && !isBlobLike(value)) { throw new TypeError( "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" ); } name = webidl.converters.USVString(name); value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); filename = arguments.length === 3 ? toUSVString(filename) : void 0; const entry = makeEntry(name, value, filename); const idx = this[kState].findIndex((entry2) => entry2.name === name); if (idx !== -1) { this[kState] = [ ...this[kState].slice(0, idx), entry, ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) ]; } else { this[kState].push(entry); } } entries() { webidl.brandCheck(this, _FormData); return makeIterator( () => this[kState].map((pair) => [pair.name, pair.value]), "FormData", "key+value" ); } keys() { webidl.brandCheck(this, _FormData); return makeIterator( () => this[kState].map((pair) => [pair.name, pair.value]), "FormData", "key" ); } values() { webidl.brandCheck(this, _FormData); return makeIterator( () => this[kState].map((pair) => [pair.name, pair.value]), "FormData", "value" ); } /** * @param {(value: string, key: string, self: FormData) => void} callbackFn * @param {unknown} thisArg */ forEach(callbackFn, thisArg = globalThis) { webidl.brandCheck(this, _FormData); webidl.argumentLengthCheck(arguments, 1, { header: "FormData.forEach" }); if (typeof callbackFn !== "function") { throw new TypeError( "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." ); } for (const [key, value] of this) { callbackFn.apply(thisArg, [value, key, this]); } } }; FormData2.prototype[Symbol.iterator] = FormData2.prototype.entries; Object.defineProperties(FormData2.prototype, { [Symbol.toStringTag]: { value: "FormData", configurable: true } }); function makeEntry(name, value, filename) { name = Buffer.from(name).toString("utf8"); if (typeof value === "string") { value = Buffer.from(value).toString("utf8"); } else { if (!isFileLike(value)) { value = value instanceof Blob2 ? new File2([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); } if (filename !== void 0) { const options = { type: value.type, lastModified: value.lastModified }; value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File2([value], filename, options) : new FileLike(value, filename, options); } } return { name, value }; } __name(makeEntry, "makeEntry"); module2.exports = { FormData: FormData2 }; } }); // node_modules/undici/lib/fetch/body.js var require_body = __commonJS({ "node_modules/undici/lib/fetch/body.js"(exports2, module2) { "use strict"; var Busboy = require_main(); var util = require_util(); var { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody } = require_util2(); var { FormData: FormData2 } = require_formdata(); var { kState } = require_symbols2(); var { webidl } = require_webidl(); var { DOMException: DOMException2, structuredClone } = require_constants3(); var { Blob: Blob2, File: NativeFile } = require("buffer"); var { kBodyUsed } = require_symbols(); var assert = require("assert"); var { isErrored } = require_util(); var { isUint8Array, isArrayBuffer } = require("util/types"); var { File: UndiciFile } = require_file(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { const crypto2 = require("node:crypto"); random = /* @__PURE__ */ __name((max) => crypto2.randomInt(0, max), "random"); } catch { random = /* @__PURE__ */ __name((max) => Math.floor(Math.random(max)), "random"); } var ReadableStream2 = globalThis.ReadableStream; var File2 = NativeFile ?? UndiciFile; var textEncoder = new TextEncoder(); var textDecoder = new TextDecoder(); function extractBody(object, keepalive = false) { if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } let stream = null; if (object instanceof ReadableStream2) { stream = object; } else if (isBlobLike(object)) { stream = object.stream(); } else { stream = new ReadableStream2({ async pull(controller) { controller.enqueue( typeof source === "string" ? textEncoder.encode(source) : source ); queueMicrotask(() => readableStreamClose(controller)); }, start() { }, type: void 0 }); } assert(isReadableStreamLike(stream)); let action = null; let source = null; let length = null; let type = null; if (typeof object === "string") { source = object; type = "text/plain;charset=UTF-8"; } else if (object instanceof URLSearchParams) { source = object.toString(); type = "application/x-www-form-urlencoded;charset=UTF-8"; } else if (isArrayBuffer(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); } else if (util.isFormDataLike(object)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; const escape = /* @__PURE__ */ __name((str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), "escape"); const normalizeLinefeeds = /* @__PURE__ */ __name((value) => value.replace(/\r?\n|\r/g, "\r\n"), "normalizeLinefeeds"); const blobParts = []; const rn = new Uint8Array([13, 10]); length = 0; let hasUnknownSizeValue = false; for (const [name, value] of object) { if (typeof value === "string") { const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); blobParts.push(chunk2, value, rn); if (typeof value.size === "number") { length += chunk2.byteLength + value.size + rn.byteLength; } else { hasUnknownSizeValue = true; } } } const chunk = textEncoder.encode(`--${boundary}--`); blobParts.push(chunk); length += chunk.byteLength; if (hasUnknownSizeValue) { length = null; } source = object; action = /* @__PURE__ */ __name(async function* () { for (const part of blobParts) { if (part.stream) { yield* part.stream(); } else { yield part; } } }, "action"); type = "multipart/form-data; boundary=" + boundary; } else if (isBlobLike(object)) { source = object; length = object.size; if (object.type) { type = object.type; } } else if (typeof object[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } if (util.isDisturbed(object) || object.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } stream = object instanceof ReadableStream2 ? object : ReadableStreamFrom(object); } if (typeof source === "string" || util.isBuffer(source)) { length = Buffer.byteLength(source); } if (action != null) { let iterator; stream = new ReadableStream2({ async start() { iterator = action(object)[Symbol.asyncIterator](); }, async pull(controller) { const { value, done } = await iterator.next(); if (done) { queueMicrotask(() => { controller.close(); }); } else { if (!isErrored(stream)) { controller.enqueue(new Uint8Array(value)); } } return controller.desiredSize > 0; }, async cancel(reason) { await iterator.return(); }, type: void 0 }); } const body = { stream, source, length }; return [body, type]; } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } if (object instanceof ReadableStream2) { assert(!util.isDisturbed(object), "The body has already been consumed."); assert(!object.locked, "The stream is locked."); } return extractBody(object, keepalive); } __name(safelyExtractBody, "safelyExtractBody"); function cloneBody(body) { const [out1, out2] = body.stream.tee(); const out2Clone = structuredClone(out2, { transfer: [out2] }); const [, finalClone] = out2Clone.tee(); body.stream = out1; return { stream: finalClone, length: body.length, source: body.source }; } __name(cloneBody, "cloneBody"); async function* consumeBody(body) { if (body) { if (isUint8Array(body)) { yield body; } else { const stream = body.stream; if (util.isDisturbed(stream)) { throw new TypeError("The body has already been consumed."); } if (stream.locked) { throw new TypeError("The stream is locked."); } stream[kBodyUsed] = true; yield* stream; } } } __name(consumeBody, "consumeBody"); function throwIfAborted(state) { if (state.aborted) { throw new DOMException2("The operation was aborted.", "AbortError"); } } __name(throwIfAborted, "throwIfAborted"); function bodyMixinMethods(instance) { const methods = { blob() { return specConsumeBody(this, (bytes) => { let mimeType = bodyMimeType(this); if (mimeType === "failure") { mimeType = ""; } else if (mimeType) { mimeType = serializeAMimeType(mimeType); } return new Blob2([bytes], { type: mimeType }); }, instance); }, arrayBuffer() { return specConsumeBody(this, (bytes) => { return new Uint8Array(bytes).buffer; }, instance); }, text() { return specConsumeBody(this, utf8DecodeBytes, instance); }, json() { return specConsumeBody(this, parseJSONFromBytes, instance); }, async formData() { webidl.brandCheck(this, instance); throwIfAborted(this[kState]); const contentType = this.headers.get("Content-Type"); if (/multipart\/form-data/.test(contentType)) { const headers = {}; for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; const responseFormData = new FormData2(); let busboy; try { busboy = new Busboy({ headers, preservePath: true }); } catch (err) { throw new DOMException2(`${err}`, "AbortError"); } busboy.on("field", (name, value) => { responseFormData.append(name, value); }); busboy.on("file", (name, value, filename, encoding, mimeType) => { const chunks = []; if (encoding === "base64" || encoding.toLowerCase() === "base64") { let base64chunk = ""; value.on("data", (chunk) => { base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); const end = base64chunk.length - base64chunk.length % 4; chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); base64chunk = base64chunk.slice(end); }); value.on("end", () => { chunks.push(Buffer.from(base64chunk, "base64")); responseFormData.append(name, new File2(chunks, filename, { type: mimeType })); }); } else { value.on("data", (chunk) => { chunks.push(chunk); }); value.on("end", () => { responseFormData.append(name, new File2(chunks, filename, { type: mimeType })); }); } }); const busboyResolve = new Promise((resolve, reject) => { busboy.on("finish", resolve); busboy.on("error", (err) => reject(new TypeError(err))); }); if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); busboy.end(); await busboyResolve; return responseFormData; } else if (/application\/x-www-form-urlencoded/.test(contentType)) { let entries; try { let text = ""; const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); for await (const chunk of consumeBody(this[kState].body)) { if (!isUint8Array(chunk)) { throw new TypeError("Expected Uint8Array chunk"); } text += streamingDecoder.decode(chunk, { stream: true }); } text += streamingDecoder.decode(); entries = new URLSearchParams(text); } catch (err) { throw Object.assign(new TypeError(), { cause: err }); } const formData = new FormData2(); for (const [name, value] of entries) { formData.append(name, value); } return formData; } else { await Promise.resolve(); throwIfAborted(this[kState]); throw webidl.errors.exception({ header: `${instance.name}.formData`, message: "Could not parse content as FormData." }); } } }; return methods; } __name(bodyMixinMethods, "bodyMixinMethods"); function mixinBody(prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } __name(mixinBody, "mixinBody"); async function specConsumeBody(object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance); throwIfAborted(object[kState]); if (bodyUnusable(object[kState].body)) { throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); const errorSteps = /* @__PURE__ */ __name((error) => promise.reject(error), "errorSteps"); const successSteps = /* @__PURE__ */ __name((data) => { try { promise.resolve(convertBytesToJSValue(data)); } catch (e) { errorSteps(e); } }, "successSteps"); if (object[kState].body == null) { successSteps(new Uint8Array()); return promise.promise; } await fullyReadBody(object[kState].body, successSteps, errorSteps); return promise.promise; } __name(specConsumeBody, "specConsumeBody"); function bodyUnusable(body) { return body != null && (body.stream.locked || util.isDisturbed(body.stream)); } __name(bodyUnusable, "bodyUnusable"); function utf8DecodeBytes(buffer) { if (buffer.length === 0) { return ""; } if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { buffer = buffer.subarray(3); } const output = textDecoder.decode(buffer); return output; } __name(utf8DecodeBytes, "utf8DecodeBytes"); function parseJSONFromBytes(bytes) { return JSON.parse(utf8DecodeBytes(bytes)); } __name(parseJSONFromBytes, "parseJSONFromBytes"); function bodyMimeType(object) { const { headersList } = object[kState]; const contentType = headersList.get("content-type"); if (contentType === null) { return "failure"; } return parseMIMEType(contentType); } __name(bodyMimeType, "bodyMimeType"); module2.exports = { extractBody, safelyExtractBody, cloneBody, mixinBody }; } }); // node_modules/undici/lib/core/request.js var require_request = __commonJS({ "node_modules/undici/lib/core/request.js"(exports2, module2) { "use strict"; var { InvalidArgumentError, NotSupportedError } = require_errors(); var assert = require("assert"); var { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols(); var util = require_util(); var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; var invalidPathRegex = /[^\u0021-\u00ff]/; var kHandler = Symbol("handler"); var channels = {}; var extractBody; try { const diagnosticsChannel = require("diagnostics_channel"); channels.create = diagnosticsChannel.channel("undici:request:create"); channels.bodySent = diagnosticsChannel.channel("undici:request:bodySent"); channels.headers = diagnosticsChannel.channel("undici:request:headers"); channels.trailers = diagnosticsChannel.channel("undici:request:trailers"); channels.error = diagnosticsChannel.channel("undici:request:error"); } catch { channels.create = { hasSubscribers: false }; channels.bodySent = { hasSubscribers: false }; channels.headers = { hasSubscribers: false }; channels.trailers = { hasSubscribers: false }; channels.error = { hasSubscribers: false }; } var Request = class _Request { static { __name(this, "Request"); } constructor(origin, { path: path2, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue }, handler) { if (typeof path2 !== "string") { throw new InvalidArgumentError("path must be a string"); } else if (path2[0] !== "/" && !(path2.startsWith("http://") || path2.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); } else if (invalidPathRegex.exec(path2) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { throw new InvalidArgumentError("method must be a string"); } else if (tokenRegExp.exec(method) === null) { throw new InvalidArgumentError("invalid request method"); } if (upgrade && typeof upgrade !== "string") { throw new InvalidArgumentError("upgrade must be a string"); } if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { throw new InvalidArgumentError("invalid headersTimeout"); } if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { throw new InvalidArgumentError("invalid bodyTimeout"); } if (reset != null && typeof reset !== "boolean") { throw new InvalidArgumentError("invalid reset"); } if (expectContinue != null && typeof expectContinue !== "boolean") { throw new InvalidArgumentError("invalid expectContinue"); } this.headersTimeout = headersTimeout; this.bodyTimeout = bodyTimeout; this.throwOnError = throwOnError === true; this.method = method; this.abort = null; if (body == null) { this.body = null; } else if (util.isStream(body)) { this.body = body; const rState = this.body._readableState; if (!rState || !rState.autoDestroy) { this.endHandler = /* @__PURE__ */ __name(function autoDestroy() { util.destroy(this); }, "autoDestroy"); this.body.on("end", this.endHandler); } this.errorHandler = (err) => { if (this.abort) { this.abort(err); } else { this.error = err; } }; this.body.on("error", this.errorHandler); } else if (util.isBuffer(body)) { this.body = body.byteLength ? body : null; } else if (ArrayBuffer.isView(body)) { this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; } else if (body instanceof ArrayBuffer) { this.body = body.byteLength ? Buffer.from(body) : null; } else if (typeof body === "string") { this.body = body.length ? Buffer.from(body) : null; } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { this.body = body; } else { throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); } this.completed = false; this.aborted = false; this.upgrade = upgrade || null; this.path = query ? util.buildURL(path2, query) : path2; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; this.reset = reset == null ? null : reset; this.host = null; this.contentLength = null; this.contentType = null; this.headers = ""; this.expectContinue = expectContinue != null ? expectContinue : false; if (Array.isArray(headers)) { if (headers.length % 2 !== 0) { throw new InvalidArgumentError("headers array must be even"); } for (let i = 0; i < headers.length; i += 2) { processHeader(this, headers[i], headers[i + 1]); } } else if (headers && typeof headers === "object") { const keys = Object.keys(headers); for (let i = 0; i < keys.length; i++) { const key = keys[i]; processHeader(this, key, headers[key]); } } else if (headers != null) { throw new InvalidArgumentError("headers must be an object or an array"); } if (util.isFormDataLike(this.body)) { if (util.nodeMajor < 16 || util.nodeMajor === 16 && util.nodeMinor < 8) { throw new InvalidArgumentError("Form-Data bodies are only supported in node v16.8 and newer."); } if (!extractBody) { extractBody = require_body().extractBody; } const [bodyStream, contentType] = extractBody(body); if (this.contentType == null) { this.contentType = contentType; this.headers += `content-type: ${contentType}\r `; } this.body = bodyStream.stream; this.contentLength = bodyStream.length; } else if (util.isBlobLike(body) && this.contentType == null && body.type) { this.contentType = body.type; this.headers += `content-type: ${body.type}\r `; } util.validateHandler(handler, method, upgrade); this.servername = util.getServerName(this.host); this[kHandler] = handler; if (channels.create.hasSubscribers) { channels.create.publish({ request: this }); } } onBodySent(chunk) { if (this[kHandler].onBodySent) { try { return this[kHandler].onBodySent(chunk); } catch (err) { this.abort(err); } } } onRequestSent() { if (channels.bodySent.hasSubscribers) { channels.bodySent.publish({ request: this }); } if (this[kHandler].onRequestSent) { try { return this[kHandler].onRequestSent(); } catch (err) { this.abort(err); } } } onConnect(abort) { assert(!this.aborted); assert(!this.completed); if (this.error) { abort(this.error); } else { this.abort = abort; return this[kHandler].onConnect(abort); } } onHeaders(statusCode, headers, resume, statusText) { assert(!this.aborted); assert(!this.completed); if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } try { return this[kHandler].onHeaders(statusCode, headers, resume, statusText); } catch (err) { this.abort(err); } } onData(chunk) { assert(!this.aborted); assert(!this.completed); try { return this[kHandler].onData(chunk); } catch (err) { this.abort(err); return false; } } onUpgrade(statusCode, headers, socket) { assert(!this.aborted); assert(!this.completed); return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { this.onFinally(); assert(!this.aborted); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); } try { return this[kHandler].onComplete(trailers); } catch (err) { this.onError(err); } } onError(error) { this.onFinally(); if (channels.error.hasSubscribers) { channels.error.publish({ request: this, error }); } if (this.aborted) { return; } this.aborted = true; return this[kHandler].onError(error); } onFinally() { if (this.errorHandler) { this.body.off("error", this.errorHandler); this.errorHandler = null; } if (this.endHandler) { this.body.off("end", this.endHandler); this.endHandler = null; } } // TODO: adjust to support H2 addHeader(key, value) { processHeader(this, key, value); return this; } static [kHTTP1BuildRequest](origin, opts, handler) { return new _Request(origin, opts, handler); } static [kHTTP2BuildRequest](origin, opts, handler) { const headers = opts.headers; opts = { ...opts, headers: null }; const request = new _Request(origin, opts, handler); request.headers = {}; if (Array.isArray(headers)) { if (headers.length % 2 !== 0) { throw new InvalidArgumentError("headers array must be even"); } for (let i = 0; i < headers.length; i += 2) { processHeader(request, headers[i], headers[i + 1], true); } } else if (headers && typeof headers === "object") { const keys = Object.keys(headers); for (let i = 0; i < keys.length; i++) { const key = keys[i]; processHeader(request, key, headers[key], true); } } else if (headers != null) { throw new InvalidArgumentError("headers must be an object or an array"); } return request; } static [kHTTP2CopyHeaders](raw) { const rawHeaders = raw.split("\r\n"); const headers = {}; for (const header of rawHeaders) { const [key, value] = header.split(": "); if (value == null || value.length === 0) continue; if (headers[key]) headers[key] += `,${value}`; else headers[key] = value; } return headers; } }; function processHeaderValue(key, val, skipAppend) { if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } val = val != null ? `${val}` : ""; if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } return skipAppend ? val : `${key}: ${val}\r `; } __name(processHeaderValue, "processHeaderValue"); function processHeader(request, key, val, skipAppend = false) { if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { request.contentType = val; if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { request.reset = true; } } else if (key.length === 10 && key.toLowerCase() === "keep-alive") { throw new InvalidArgumentError("invalid keep-alive header"); } else if (key.length === 7 && key.toLowerCase() === "upgrade") { throw new InvalidArgumentError("invalid upgrade header"); } else if (key.length === 6 && key.toLowerCase() === "expect") { throw new NotSupportedError("expect header not supported"); } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { if (Array.isArray(val)) { for (let i = 0; i < val.length; i++) { if (skipAppend) { if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { request.headers += processHeaderValue(key, val[i]); } } } else { if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); else request.headers += processHeaderValue(key, val); } } } __name(processHeader, "processHeader"); module2.exports = Request; } }); // node_modules/undici/lib/dispatcher.js var require_dispatcher = __commonJS({ "node_modules/undici/lib/dispatcher.js"(exports2, module2) { "use strict"; var EventEmitter = require("events"); var Dispatcher = class extends EventEmitter { static { __name(this, "Dispatcher"); } dispatch() { throw new Error("not implemented"); } close() { throw new Error("not implemented"); } destroy() { throw new Error("not implemented"); } }; module2.exports = Dispatcher; } }); // node_modules/undici/lib/dispatcher-base.js var require_dispatcher_base = __commonJS({ "node_modules/undici/lib/dispatcher-base.js"(exports2, module2) { "use strict"; var Dispatcher = require_dispatcher(); var { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); var { kDestroy, kClose, kDispatch, kInterceptors } = require_symbols(); var kDestroyed = Symbol("destroyed"); var kClosed = Symbol("closed"); var kOnDestroyed = Symbol("onDestroyed"); var kOnClosed = Symbol("onClosed"); var kInterceptedDispatch = Symbol("Intercepted Dispatch"); var DispatcherBase = class extends Dispatcher { static { __name(this, "DispatcherBase"); } constructor() { super(); this[kDestroyed] = false; this[kOnDestroyed] = null; this[kClosed] = false; this[kOnClosed] = []; } get destroyed() { return this[kDestroyed]; } get closed() { return this[kClosed]; } get interceptors() { return this[kInterceptors]; } set interceptors(newInterceptors) { if (newInterceptors) { for (let i = newInterceptors.length - 1; i >= 0; i--) { const interceptor = this[kInterceptors][i]; if (typeof interceptor !== "function") { throw new InvalidArgumentError("interceptor must be an function"); } } } this[kInterceptors] = newInterceptors; } close(callback) { if (callback === void 0) { return new Promise((resolve, reject) => { this.close((err, data) => { return err ? reject(err) : resolve(data); }); }); } if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } if (this[kDestroyed]) { queueMicrotask(() => callback(new ClientDestroyedError(), null)); return; } if (this[kClosed]) { if (this[kOnClosed]) { this[kOnClosed].push(callback); } else { queueMicrotask(() => callback(null, null)); } return; } this[kClosed] = true; this[kOnClosed].push(callback); const onClosed = /* @__PURE__ */ __name(() => { const callbacks = this[kOnClosed]; this[kOnClosed] = null; for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null); } }, "onClosed"); this[kClose]().then(() => this.destroy()).then(() => { queueMicrotask(onClosed); }); } destroy(err, callback) { if (typeof err === "function") { callback = err; err = null; } if (callback === void 0) { return new Promise((resolve, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) ) : resolve(data); }); }); } if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } if (this[kDestroyed]) { if (this[kOnDestroyed]) { this[kOnDestroyed].push(callback); } else { queueMicrotask(() => callback(null, null)); } return; } if (!err) { err = new ClientDestroyedError(); } this[kDestroyed] = true; this[kOnDestroyed] = this[kOnDestroyed] || []; this[kOnDestroyed].push(callback); const onDestroyed = /* @__PURE__ */ __name(() => { const callbacks = this[kOnDestroyed]; this[kOnDestroyed] = null; for (let i = 0; i < callbacks.length; i++) { callbacks[i](null, null); } }, "onDestroyed"); this[kDestroy](err).then(() => { queueMicrotask(onDestroyed); }); } [kInterceptedDispatch](opts, handler) { if (!this[kInterceptors] || this[kInterceptors].length === 0) { this[kInterceptedDispatch] = this[kDispatch]; return this[kDispatch](opts, handler); } let dispatch = this[kDispatch].bind(this); for (let i = this[kInterceptors].length - 1; i >= 0; i--) { dispatch = this[kInterceptors][i](dispatch); } this[kInterceptedDispatch] = dispatch; return dispatch(opts, handler); } dispatch(opts, handler) { if (!handler || typeof handler !== "object") { throw new InvalidArgumentError("handler must be an object"); } try { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("opts must be an object."); } if (this[kDestroyed] || this[kOnDestroyed]) { throw new ClientDestroyedError(); } if (this[kClosed]) { throw new ClientClosedError(); } return this[kInterceptedDispatch](opts, handler); } catch (err) { if (typeof handler.onError !== "function") { throw new InvalidArgumentError("invalid onError method"); } handler.onError(err); return false; } } }; module2.exports = DispatcherBase; } }); // node_modules/undici/lib/core/connect.js var require_connect = __commonJS({ "node_modules/undici/lib/core/connect.js"(exports2, module2) { "use strict"; var net = require("net"); var assert = require("assert"); var util = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var tls; var SessionCache; if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { SessionCache = class WeakSessionCache { static { __name(this, "WeakSessionCache"); } constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; this._sessionCache = /* @__PURE__ */ new Map(); this._sessionRegistry = new global.FinalizationRegistry((key) => { if (this._sessionCache.size < this._maxCachedSessions) { return; } const ref = this._sessionCache.get(key); if (ref !== void 0 && ref.deref() === void 0) { this._sessionCache.delete(key); } }); } get(sessionKey) { const ref = this._sessionCache.get(sessionKey); return ref ? ref.deref() : null; } set(sessionKey, session) { if (this._maxCachedSessions === 0) { return; } this._sessionCache.set(sessionKey, new WeakRef(session)); this._sessionRegistry.register(session, sessionKey); } }; } else { SessionCache = class SimpleSessionCache { static { __name(this, "SimpleSessionCache"); } constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; this._sessionCache = /* @__PURE__ */ new Map(); } get(sessionKey) { return this._sessionCache.get(sessionKey); } set(sessionKey, session) { if (this._maxCachedSessions === 0) { return; } if (this._sessionCache.size >= this._maxCachedSessions) { const { value: oldestKey } = this._sessionCache.keys().next(); this._sessionCache.delete(oldestKey); } this._sessionCache.set(sessionKey, session); } }; } function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); } const options = { path: socketPath, ...opts }; const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; return /* @__PURE__ */ __name(function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = require("tls"); } servername = servername || options.servername || util.getServerName(host) || null; const sessionKey = servername || hostname; const session = sessionCache.get(sessionKey) || null; assert(sessionKey); socket = tls.connect({ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... ...options, servername, session, localAddress, // TODO(HTTP/2): Add support for h2c ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], socket: httpSocket, // upgrade socket connection port: port || 443, host: hostname }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); }); } else { assert(!httpSocket, "httpSocket can only be sent on TLS update"); socket = net.connect({ highWaterMark: 64 * 1024, // Same as nodejs fs streams. ...options, localAddress, port: port || 80, host: hostname }); } if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { cancelTimeout(); if (callback) { const cb = callback; callback = null; cb(null, this); } }).on("error", function(err) { cancelTimeout(); if (callback) { const cb = callback; callback = null; cb(err); } }); return socket; }, "connect"); } __name(buildConnector, "buildConnector"); function setupTimeout(onConnectTimeout2, timeout) { if (!timeout) { return () => { }; } let s1 = null; let s2 = null; const timeoutId = setTimeout(() => { s1 = setImmediate(() => { if (process.platform === "win32") { s2 = setImmediate(() => onConnectTimeout2()); } else { onConnectTimeout2(); } }); }, timeout); return () => { clearTimeout(timeoutId); clearImmediate(s1); clearImmediate(s2); }; } __name(setupTimeout, "setupTimeout"); function onConnectTimeout(socket) { util.destroy(socket, new ConnectTimeoutError()); } __name(onConnectTimeout, "onConnectTimeout"); module2.exports = buildConnector; } }); // node_modules/undici/lib/llhttp/utils.js var require_utils2 = __commonJS({ "node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.enumToMap = void 0; function enumToMap(obj) { const res = {}; Object.keys(obj).forEach((key) => { const value = obj[key]; if (typeof value === "number") { res[key] = value; } }); return res; } __name(enumToMap, "enumToMap"); exports2.enumToMap = enumToMap; } }); // node_modules/undici/lib/llhttp/constants.js var require_constants4 = __commonJS({ "node_modules/undici/lib/llhttp/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; var utils_1 = require_utils2(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; ERROR2[ERROR2["INTERNAL"] = 1] = "INTERNAL"; ERROR2[ERROR2["STRICT"] = 2] = "STRICT"; ERROR2[ERROR2["LF_EXPECTED"] = 3] = "LF_EXPECTED"; ERROR2[ERROR2["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; ERROR2[ERROR2["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; ERROR2[ERROR2["INVALID_METHOD"] = 6] = "INVALID_METHOD"; ERROR2[ERROR2["INVALID_URL"] = 7] = "INVALID_URL"; ERROR2[ERROR2["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; ERROR2[ERROR2["INVALID_VERSION"] = 9] = "INVALID_VERSION"; ERROR2[ERROR2["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; ERROR2[ERROR2["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; ERROR2[ERROR2["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; ERROR2[ERROR2["INVALID_STATUS"] = 13] = "INVALID_STATUS"; ERROR2[ERROR2["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; ERROR2[ERROR2["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; ERROR2[ERROR2["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; ERROR2[ERROR2["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; ERROR2[ERROR2["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; ERROR2[ERROR2["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; ERROR2[ERROR2["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; ERROR2[ERROR2["PAUSED"] = 21] = "PAUSED"; ERROR2[ERROR2["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; ERROR2[ERROR2["USER"] = 24] = "USER"; })(ERROR = exports2.ERROR || (exports2.ERROR = {})); var TYPE; (function(TYPE2) { TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; })(TYPE = exports2.TYPE || (exports2.TYPE = {})); var FLAGS; (function(FLAGS2) { FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); var LENIENT_FLAGS; (function(LENIENT_FLAGS2) { LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); var METHODS; (function(METHODS2) { METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; METHODS2[METHODS2["GET"] = 1] = "GET"; METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; METHODS2[METHODS2["POST"] = 3] = "POST"; METHODS2[METHODS2["PUT"] = 4] = "PUT"; METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; METHODS2[METHODS2["COPY"] = 8] = "COPY"; METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; METHODS2[METHODS2["BIND"] = 16] = "BIND"; METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; METHODS2[METHODS2["ACL"] = 19] = "ACL"; METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; METHODS2[METHODS2["LINK"] = 31] = "LINK"; METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; METHODS2[METHODS2["PRI"] = 34] = "PRI"; METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; })(METHODS = exports2.METHODS || (exports2.METHODS = {})); exports2.METHODS_HTTP = [ METHODS.DELETE, METHODS.GET, METHODS.HEAD, METHODS.POST, METHODS.PUT, METHODS.CONNECT, METHODS.OPTIONS, METHODS.TRACE, METHODS.COPY, METHODS.LOCK, METHODS.MKCOL, METHODS.MOVE, METHODS.PROPFIND, METHODS.PROPPATCH, METHODS.SEARCH, METHODS.UNLOCK, METHODS.BIND, METHODS.REBIND, METHODS.UNBIND, METHODS.ACL, METHODS.REPORT, METHODS.MKACTIVITY, METHODS.CHECKOUT, METHODS.MERGE, METHODS["M-SEARCH"], METHODS.NOTIFY, METHODS.SUBSCRIBE, METHODS.UNSUBSCRIBE, METHODS.PATCH, METHODS.PURGE, METHODS.MKCALENDAR, METHODS.LINK, METHODS.UNLINK, METHODS.PRI, // TODO(indutny): should we allow it with HTTP? METHODS.SOURCE ]; exports2.METHODS_ICE = [ METHODS.SOURCE ]; exports2.METHODS_RTSP = [ METHODS.OPTIONS, METHODS.DESCRIBE, METHODS.ANNOUNCE, METHODS.SETUP, METHODS.PLAY, METHODS.PAUSE, METHODS.TEARDOWN, METHODS.GET_PARAMETER, METHODS.SET_PARAMETER, METHODS.REDIRECT, METHODS.RECORD, METHODS.FLUSH, // For AirPlay METHODS.GET, METHODS.POST ]; exports2.METHOD_MAP = utils_1.enumToMap(METHODS); exports2.H_METHOD_MAP = {}; Object.keys(exports2.METHOD_MAP).forEach((key) => { if (/^H/.test(key)) { exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; } }); var FINISH; (function(FINISH2) { FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; })(FINISH = exports2.FINISH || (exports2.FINISH = {})); exports2.ALPHA = []; for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { exports2.ALPHA.push(String.fromCharCode(i)); exports2.ALPHA.push(String.fromCharCode(i + 32)); } exports2.NUM_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9 }; exports2.HEX_MAP = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }; exports2.NUM = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ]; exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); exports2.STRICT_URL_CHAR = [ "!", '"', "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "@", "[", "\\", "]", "^", "_", "`", "{", "|", "}", "~" ].concat(exports2.ALPHANUM); exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); for (let i = 128; i <= 255; i++) { exports2.URL_CHAR.push(i); } exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); exports2.STRICT_TOKEN = [ "!", "#", "$", "%", "&", "'", "*", "+", "-", ".", "^", "_", "`", "|", "~" ].concat(exports2.ALPHANUM); exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); exports2.HEADER_CHARS = [" "]; for (let i = 32; i <= 255; i++) { if (i !== 127) { exports2.HEADER_CHARS.push(i); } } exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); exports2.MAJOR = exports2.NUM_MAP; exports2.MINOR = exports2.MAJOR; var HEADER_STATE; (function(HEADER_STATE2) { HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); exports2.SPECIAL_HEADERS = { "connection": HEADER_STATE.CONNECTION, "content-length": HEADER_STATE.CONTENT_LENGTH, "proxy-connection": HEADER_STATE.CONNECTION, "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, "upgrade": HEADER_STATE.UPGRADE }; } }); // node_modules/undici/lib/handler/RedirectHandler.js var require_RedirectHandler = __commonJS({ "node_modules/undici/lib/handler/RedirectHandler.js"(exports2, module2) { "use strict"; var util = require_util(); var { kBodyUsed } = require_symbols(); var assert = require("assert"); var { InvalidArgumentError } = require_errors(); var EE = require("events"); var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; var kBody = Symbol("body"); var BodyAsyncIterable = class { static { __name(this, "BodyAsyncIterable"); } constructor(body) { this[kBody] = body; this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { assert(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } }; var RedirectHandler = class { static { __name(this, "RedirectHandler"); } constructor(dispatch, maxRedirections, opts, handler) { if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } util.validateHandler(handler, opts.method, opts.upgrade); this.dispatch = dispatch; this.location = null; this.abort = null; this.opts = { ...opts, maxRedirections: 0 }; this.maxRedirections = maxRedirections; this.handler = handler; this.history = []; if (util.isStream(this.opts.body)) { if (util.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { assert(false); }); } if (typeof this.opts.body.readableDidRead !== "boolean") { this.opts.body[kBodyUsed] = false; EE.prototype.on.call(this.opts.body, "data", function() { this[kBodyUsed] = true; }); } } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { this.opts.body = new BodyAsyncIterable(this.opts.body); } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { this.opts.body = new BodyAsyncIterable(this.opts.body); } } onConnect(abort) { this.abort = abort; this.handler.onConnect(abort, { history: this.history }); } onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } onError(error) { this.handler.onError(error); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); if (this.opts.origin) { this.history.push(new URL(this.opts.path, this.opts.origin)); } if (!this.location) { return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); const path2 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); this.opts.path = path2; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; if (statusCode === 303 && this.opts.method !== "HEAD") { this.opts.method = "GET"; this.opts.body = null; } } onData(chunk) { if (this.location) { } else { return this.handler.onData(chunk); } } onComplete(trailers) { if (this.location) { this.location = null; this.abort = null; this.dispatch(this.opts, this); } else { this.handler.onComplete(trailers); } } onBodySent(chunk) { if (this.handler.onBodySent) { this.handler.onBodySent(chunk); } } }; function parseLocation(statusCode, headers) { if (redirectableStatusCodes.indexOf(statusCode) === -1) { return null; } for (let i = 0; i < headers.length; i += 2) { if (headers[i].toString().toLowerCase() === "location") { return headers[i + 1]; } } } __name(parseLocation, "parseLocation"); function shouldRemoveHeader(header, removeContent, unknownOrigin) { if (header.length === 4) { return util.headerNameToString(header) === "host"; } if (removeContent && util.headerNameToString(header).startsWith("content-")) { return true; } if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { const name = util.headerNameToString(header); return name === "authorization" || name === "cookie" || name === "proxy-authorization"; } return false; } __name(shouldRemoveHeader, "shouldRemoveHeader"); function cleanRequestHeaders(headers, removeContent, unknownOrigin) { const ret = []; if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { ret.push(headers[i], headers[i + 1]); } } } else if (headers && typeof headers === "object") { for (const key of Object.keys(headers)) { if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { ret.push(key, headers[key]); } } } else { assert(headers == null, "headers must be an object or an array"); } return ret; } __name(cleanRequestHeaders, "cleanRequestHeaders"); module2.exports = RedirectHandler; } }); // node_modules/undici/lib/interceptor/redirectInterceptor.js var require_redirectInterceptor = __commonJS({ "node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports2, module2) { "use strict"; var RedirectHandler = require_RedirectHandler(); function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { return (dispatch) => { return /* @__PURE__ */ __name(function Intercept(opts, handler) { const { maxRedirections = defaultMaxRedirections } = opts; if (!maxRedirections) { return dispatch(opts, handler); } const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); opts = { ...opts, maxRedirections: 0 }; return dispatch(opts, redirectHandler); }, "Intercept"); }; } __name(createRedirectInterceptor, "createRedirectInterceptor"); module2.exports = createRedirectInterceptor; } }); // node_modules/undici/lib/llhttp/llhttp-wasm.js var require_llhttp_wasm = __commonJS({ "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9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Q0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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kACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGn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xNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIU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AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; } }); // node_modules/undici/lib/llhttp/llhttp_simd-wasm.js var require_llhttp_simd_wasm = __commonJS({ "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWx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BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ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JAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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egAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMY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A2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCA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VDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; } }); // node_modules/undici/lib/client.js var require_client = __commonJS({ "node_modules/undici/lib/client.js"(exports2, module2) { "use strict"; var assert = require("assert"); var net = require("net"); var http = require("http"); var { pipeline } = require("stream"); var util = require_util(); var timers = require_timers(); var Request = require_request(); var DispatcherBase = require_dispatcher_base(); var { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, InvalidArgumentError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError, ClientDestroyedError } = require_errors(); var buildConnector = require_connect(); var { kUrl, kReset, kServerName, kClient, kBusy, kParser, kConnect, kBlocking, kResuming, kRunning, kPending, kSize, kWriting, kQueue, kConnected, kConnecting, kNeedDrain, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kHTTPConnVersion, // HTTP2 kHost, kHTTP2Session, kHTTP2SessionState, kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols(); var http2; try { http2 = require("http2"); } catch { http2 = { constants: {} }; } var { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; var h2ExperimentalWarned = false; var FastBuffer = Buffer[Symbol.species]; var kClosedResolve = Symbol("kClosedResolve"); var channels = {}; try { const diagnosticsChannel = require("diagnostics_channel"); channels.sendHeaders = diagnosticsChannel.channel("undici:client:sendHeaders"); channels.beforeConnect = diagnosticsChannel.channel("undici:client:beforeConnect"); channels.connectError = diagnosticsChannel.channel("undici:client:connectError"); channels.connected = diagnosticsChannel.channel("undici:client:connected"); } catch { channels.sendHeaders = { hasSubscribers: false }; channels.beforeConnect = { hasSubscribers: false }; channels.connectError = { hasSubscribers: false }; channels.connected = { hasSubscribers: false }; } var Client = class extends DispatcherBase { static { __name(this, "Client"); } /** * * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect: connect2, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, // h2 allowH2, maxConcurrentStreams } = {}) { super(); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } if (socketTimeout !== void 0) { throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); } if (requestTimeout !== void 0) { throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); } if (idleTimeout !== void 0) { throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); } if (maxKeepAliveTimeout !== void 0) { throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); } if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { throw new InvalidArgumentError("invalid maxHeaderSize"); } if (socketPath != null && typeof socketPath !== "string") { throw new InvalidArgumentError("invalid socketPath"); } if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { throw new InvalidArgumentError("invalid connectTimeout"); } if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { throw new InvalidArgumentError("invalid keepAliveTimeout"); } if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); } if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); } if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); } if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); } if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { throw new InvalidArgumentError("connect must be a function or an object"); } if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); } if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { throw new InvalidArgumentError("localAddress must be valid string IP address"); } if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { throw new InvalidArgumentError("maxResponseSize must be a positive number"); } if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); } if (allowH2 != null && typeof allowH2 !== "boolean") { throw new InvalidArgumentError("allowH2 must be a valid boolean value"); } if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { throw new InvalidArgumentError("maxConcurrentStreams must be a possitive integer, greater than 0"); } if (typeof connect2 !== "function") { connect2 = buildConnector({ ...tls, maxCachedSessions, allowH2, socketPath, timeout: connectTimeout, ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, ...connect2 }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; this[kUrl] = util.parseOrigin(url); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; this[kServerName] = null; this[kLocalAddress] = localAddress != null ? localAddress : null; this[kResuming] = 0; this[kNeedDrain] = 0; this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r `; this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; this[kMaxRedirections] = maxRedirections; this[kMaxRequests] = maxRequestsPerClient; this[kClosedResolve] = null; this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; this[kHTTPConnVersion] = "h1"; this[kHTTP2Session] = null; this[kHTTP2SessionState] = !allowH2 ? null : { // streams: null, // Fixed queue of streams - For future support of `push` openStreams: 0, // Keep track of them to decide wether or not unref the session maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server }; this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}`; this[kQueue] = []; this[kRunningIdx] = 0; this[kPendingIdx] = 0; } get pipelining() { return this[kPipelining]; } set pipelining(value) { this[kPipelining] = value; resume(this, true); } get [kPending]() { return this[kQueue].length - this[kPendingIdx]; } get [kRunning]() { return this[kPendingIdx] - this[kRunningIdx]; } get [kSize]() { return this[kQueue].length - this[kRunningIdx]; } get [kConnected]() { return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed; } get [kBusy]() { const socket = this[kSocket]; return socket && (socket[kReset] || socket[kWriting] || socket[kBlocking]) || this[kSize] >= (this[kPipelining] || 1) || this[kPending] > 0; } /* istanbul ignore: only used for test */ [kConnect](cb) { connect(this); this.once("connect", cb); } [kDispatch](opts, handler) { const origin = opts.origin || this[kUrl].origin; const request = this[kHTTPConnVersion] === "h2" ? Request[kHTTP2BuildRequest](origin, opts, handler) : Request[kHTTP1BuildRequest](origin, opts, handler); this[kQueue].push(request); if (this[kResuming]) { } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { this[kResuming] = 1; process.nextTick(resume, this); } else { resume(this, true); } if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { this[kNeedDrain] = 2; } return this[kNeedDrain] < 2; } async [kClose]() { return new Promise((resolve) => { if (!this[kSize]) { resolve(null); } else { this[kClosedResolve] = resolve; } }); } async [kDestroy](err) { return new Promise((resolve) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; errorRequest(this, request, err); } const callback = /* @__PURE__ */ __name(() => { if (this[kClosedResolve]) { this[kClosedResolve](); this[kClosedResolve] = null; } resolve(); }, "callback"); if (this[kHTTP2Session] != null) { util.destroy(this[kHTTP2Session], err); this[kHTTP2Session] = null; this[kHTTP2SessionState] = null; } if (!this[kSocket]) { queueMicrotask(callback); } else { util.destroy(this[kSocket].on("close", callback), err); } resume(this); }); } }; function onHttp2SessionError(err) { assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kSocket][kError] = err; onError(this[kClient], err); } __name(onHttp2SessionError, "onHttp2SessionError"); function onHttp2FrameError(type, code, id) { const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); if (id === 0) { this[kSocket][kError] = err; onError(this[kClient], err); } } __name(onHttp2FrameError, "onHttp2FrameError"); function onHttp2SessionEnd() { util.destroy(this, new SocketError("other side closed")); util.destroy(this[kSocket], new SocketError("other side closed")); } __name(onHttp2SessionEnd, "onHttp2SessionEnd"); function onHTTP2GoAway(code) { const client = this[kClient]; const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); client[kSocket] = null; client[kHTTP2Session] = null; if (client.destroyed) { assert(this[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; errorRequest(this, request, err); } } else if (client[kRunning] > 0) { const request = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; errorRequest(client, request, err); } client[kPendingIdx] = client[kRunningIdx]; assert(client[kRunning] === 0); client.emit( "disconnect", client[kUrl], [client], err ); resume(client); } __name(onHTTP2GoAway, "onHTTP2GoAway"); var constants = require_constants4(); var createRedirectInterceptor = require_redirectInterceptor(); var EMPTY_BUF = Buffer.alloc(0); async function lazyllhttp() { const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; let mod; try { mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); } catch (e) { mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); } return await WebAssembly.instantiate(mod, { env: { /* eslint-disable camelcase */ wasm_on_url: (p, at, len) => { return 0; }, wasm_on_status: (p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_begin: (p) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onMessageBegin() || 0; }, wasm_on_header_field: (p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_header_value: (p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; }, wasm_on_body: (p, at, len) => { assert.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_complete: (p) => { assert.strictEqual(currentParser.ptr, p); return currentParser.onMessageComplete() || 0; } /* eslint-enable camelcase */ } }); } __name(lazyllhttp, "lazyllhttp"); var llhttpInstance = null; var llhttpPromise = lazyllhttp(); llhttpPromise.catch(); var currentParser = null; var currentBufferRef = null; var currentBufferSize = 0; var currentBufferPtr = null; var TIMEOUT_HEADERS = 1; var TIMEOUT_BODY = 2; var TIMEOUT_IDLE = 3; var Parser = class { static { __name(this, "Parser"); } constructor(client, socket, { exports: exports3 }) { assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; this.timeoutValue = null; this.timeoutType = null; this.statusCode = null; this.statusText = ""; this.upgrade = false; this.headers = []; this.headersSize = 0; this.headersMaxSize = client[kMaxHeadersSize]; this.shouldKeepAlive = false; this.paused = false; this.resume = this.resume.bind(this); this.bytesRead = 0; this.keepAlive = ""; this.contentLength = ""; this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } setTimeout(value, type) { this.timeoutType = type; if (value !== this.timeoutValue) { timers.clearTimeout(this.timeout); if (value) { this.timeout = timers.setTimeout(onParserTimeout, value, this); if (this.timeout.unref) { this.timeout.unref(); } } else { this.timeout = null; } this.timeoutValue = value; } else if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } } resume() { if (this.socket.destroyed || !this.paused) { return; } assert(this.ptr != null); assert(currentParser == null); this.llhttp.llhttp_resume(this.ptr); assert(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } this.paused = false; this.execute(this.socket.read() || EMPTY_BUF); this.readMore(); } readMore() { while (!this.paused && this.ptr) { const chunk = this.socket.read(); if (chunk === null) { break; } this.execute(chunk); } } execute(data) { assert(this.ptr != null); assert(currentParser == null); assert(!this.paused); const { socket, llhttp } = this; if (data.length > currentBufferSize) { if (currentBufferPtr) { llhttp.free(currentBufferPtr); } currentBufferSize = Math.ceil(data.length / 4096) * 4096; currentBufferPtr = llhttp.malloc(currentBufferSize); } new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); try { let ret; try { currentBufferRef = data; currentParser = this; ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); } catch (err) { throw err; } finally { currentParser = null; currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; if (ret === constants.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data.slice(offset)); } else if (ret === constants.ERROR.PAUSED) { this.paused = true; socket.unshift(data.slice(offset)); } else if (ret !== constants.ERROR.OK) { const ptr = llhttp.llhttp_get_error_reason(this.ptr); let message = ""; if (ptr) { const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; } throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); } } catch (err) { util.destroy(socket, err); } } destroy() { assert(this.ptr != null); assert(currentParser == null); this.llhttp.llhttp_free(this.ptr); this.ptr = null; timers.clearTimeout(this.timeout); this.timeout = null; this.timeoutValue = null; this.timeoutType = null; this.paused = false; } onStatus(buf) { this.statusText = buf.toString(); } onMessageBegin() { const { socket, client } = this; if (socket.destroyed) { return -1; } const request = client[kQueue][client[kRunningIdx]]; if (!request) { return -1; } } onHeaderField(buf) { const len = this.headers.length; if ((len & 1) === 0) { this.headers.push(buf); } else { this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); } this.trackHeader(buf.length); } onHeaderValue(buf) { let len = this.headers.length; if ((len & 1) === 1) { this.headers.push(buf); len += 1; } else { this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); } const key = this.headers[len - 2]; if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") { this.keepAlive += buf.toString(); } else if (key.length === 10 && key.toString().toLowerCase() === "connection") { this.connection += buf.toString(); } else if (key.length === 14 && key.toString().toLowerCase() === "content-length") { this.contentLength += buf.toString(); } this.trackHeader(buf.length); } trackHeader(len) { this.headersSize += len; if (this.headersSize >= this.headersMaxSize) { util.destroy(this.socket, new HeadersOverflowError()); } } onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; assert(upgrade); const request = client[kQueue][client[kRunningIdx]]; assert(request); assert(!socket.destroyed); assert(socket === client[kSocket]); assert(!this.paused); assert(request.upgrade || request.method === "CONNECT"); this.statusCode = null; this.statusText = ""; this.shouldKeepAlive = null; assert(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; socket.unshift(head); socket[kParser].destroy(); socket[kParser] = null; socket[kClient] = null; socket[kError] = null; socket.removeListener("error", onSocketError).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose); client[kSocket] = null; client[kQueue][client[kRunningIdx]++] = null; client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); try { request.onUpgrade(statusCode, headers, socket); } catch (err) { util.destroy(socket, err); } resume(client); } onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { const { client, socket, headers, statusText } = this; if (socket.destroyed) { return -1; } const request = client[kQueue][client[kRunningIdx]]; if (!request) { return -1; } assert(!this.upgrade); assert(this.statusCode < 200); if (statusCode === 100) { util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); return -1; } if (upgrade && !request.upgrade) { util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); return -1; } assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; if (this.statusCode >= 200) { const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; this.setTimeout(bodyTimeout, TIMEOUT_BODY); } else if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } if (request.method === "CONNECT") { assert(client[kRunning] === 1); this.upgrade = true; return 2; } if (upgrade) { assert(client[kRunning] === 1); this.upgrade = true; return 2; } assert(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; if (keepAliveTimeout != null) { const timeout = Math.min( keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout] ); if (timeout <= 0) { socket[kReset] = true; } else { client[kKeepAliveTimeoutValue] = timeout; } } else { client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; } } else { socket[kReset] = true; } const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; if (request.aborted) { return -1; } if (request.method === "HEAD") { return 1; } if (statusCode < 200) { return 1; } if (socket[kBlocking]) { socket[kBlocking] = false; resume(client); } return pause ? constants.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; if (socket.destroyed) { return -1; } const request = client[kQueue][client[kRunningIdx]]; assert(request); assert.strictEqual(this.timeoutType, TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } assert(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util.destroy(socket, new ResponseExceededMaxSizeError()); return -1; } this.bytesRead += buf.length; if (request.onData(buf) === false) { return constants.ERROR.PAUSED; } } onMessageComplete() { const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; if (socket.destroyed && (!statusCode || shouldKeepAlive)) { return -1; } if (upgrade) { return; } const request = client[kQueue][client[kRunningIdx]]; assert(request); assert(statusCode >= 100); this.statusCode = null; this.statusText = ""; this.bytesRead = 0; this.contentLength = ""; this.keepAlive = ""; this.connection = ""; assert(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; if (statusCode < 200) { return; } if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { util.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } request.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { assert.strictEqual(client[kRunning], 0); util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (client[kPipelining] === 1) { setImmediate(resume, client); } else { resume(client); } } }; function onParserTimeout(parser) { const { socket, timeoutType, client } = parser; if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { assert(!parser.paused, "cannot be paused while waiting for headers"); util.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { if (!parser.paused) { util.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_IDLE) { assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util.destroy(socket, new InformationalError("socket idle timeout")); } } __name(onParserTimeout, "onParserTimeout"); function onSocketReadable() { const { [kParser]: parser } = this; if (parser) { parser.readMore(); } } __name(onSocketReadable, "onSocketReadable"); function onSocketError(err) { const { [kClient]: client, [kParser]: parser } = this; assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); if (client[kHTTPConnVersion] !== "h2") { if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); return; } } this[kError] = err; onError(this[kClient], err); } __name(onSocketError, "onSocketError"); function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { assert(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; errorRequest(client, request, err); } assert(client[kSize] === 0); } } __name(onError, "onError"); function onSocketEnd() { const { [kParser]: parser, [kClient]: client } = this; if (client[kHTTPConnVersion] !== "h2") { if (parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); return; } } util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); } __name(onSocketEnd, "onSocketEnd"); function onSocketClose() { const { [kClient]: client, [kParser]: parser } = this; if (client[kHTTPConnVersion] === "h1" && parser) { if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); } this[kParser].destroy(); this[kParser] = null; } const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); client[kSocket] = null; if (client.destroyed) { assert(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; errorRequest(client, request, err); } } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { const request = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; errorRequest(client, request, err); } client[kPendingIdx] = client[kRunningIdx]; assert(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); resume(client); } __name(onSocketClose, "onSocketClose"); async function connect(client) { assert(!client[kConnecting]); assert(!client[kSocket]); let { host, hostname, protocol, port } = client[kUrl]; if (hostname[0] === "[") { const idx = hostname.indexOf("]"); assert(idx !== -1); const ip = hostname.substring(1, idx); assert(net.isIP(ip)); hostname = ip; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, hostname, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector] }); } try { const socket = await new Promise((resolve, reject) => { client[kConnector]({ host, hostname, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, (err, socket2) => { if (err) { reject(err); } else { resolve(socket2); } }); }); if (client.destroyed) { util.destroy(socket.on("error", () => { }), new ClientDestroyedError()); return; } client[kConnecting] = false; assert(socket); const isH2 = socket.alpnProtocol === "h2"; if (isH2) { if (!h2ExperimentalWarned) { h2ExperimentalWarned = true; process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); } const session = http2.connect(client[kUrl], { createConnection: () => socket, peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams }); client[kHTTPConnVersion] = "h2"; session[kClient] = client; session[kSocket] = socket; session.on("error", onHttp2SessionError); session.on("frameError", onHttp2FrameError); session.on("end", onHttp2SessionEnd); session.on("goaway", onHTTP2GoAway); session.on("close", onSocketClose); session.unref(); client[kHTTP2Session] = session; socket[kHTTP2Session] = session; } else { if (!llhttpInstance) { llhttpInstance = await llhttpPromise; llhttpPromise = null; } socket[kNoRef] = false; socket[kWriting] = false; socket[kReset] = false; socket[kBlocking] = false; socket[kParser] = new Parser(client, socket, llhttpInstance); } socket[kCounter] = 0; socket[kMaxRequests] = client[kMaxRequests]; socket[kClient] = client; socket[kError] = null; socket.on("error", onSocketError).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose); client[kSocket] = socket; if (channels.connected.hasSubscribers) { channels.connected.publish({ connectParams: { host, hostname, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector], socket }); } client.emit("connect", client[kUrl], [client]); } catch (err) { if (client.destroyed) { return; } client[kConnecting] = false; if (channels.connectError.hasSubscribers) { channels.connectError.publish({ connectParams: { host, hostname, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, connector: client[kConnector], error: err }); } if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { assert(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request = client[kQueue][client[kPendingIdx]++]; errorRequest(client, request, err); } } else { onError(client, err); } client.emit("connectionError", client[kUrl], [client], err); } resume(client); } __name(connect, "connect"); function emitDrain(client) { client[kNeedDrain] = 0; client.emit("drain", client[kUrl], [client]); } __name(emitDrain, "emitDrain"); function resume(client, sync) { if (client[kResuming] === 2) { return; } client[kResuming] = 2; _resume(client, sync); client[kResuming] = 0; if (client[kRunningIdx] > 256) { client[kQueue].splice(0, client[kRunningIdx]); client[kPendingIdx] -= client[kRunningIdx]; client[kRunningIdx] = 0; } } __name(resume, "resume"); function _resume(client, sync) { while (true) { if (client.destroyed) { assert(client[kPending] === 0); return; } if (client[kClosedResolve] && !client[kSize]) { client[kClosedResolve](); client[kClosedResolve] = null; return; } const socket = client[kSocket]; if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { if (client[kSize] === 0) { if (!socket[kNoRef] && socket.unref) { socket.unref(); socket[kNoRef] = true; } } else if (socket[kNoRef] && socket.ref) { socket.ref(); socket[kNoRef] = false; } if (client[kSize] === 0) { if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); } } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { const request2 = client[kQueue][client[kRunningIdx]]; const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout]; socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); } } } if (client[kBusy]) { client[kNeedDrain] = 2; } else if (client[kNeedDrain] === 2) { if (sync) { client[kNeedDrain] = 1; process.nextTick(emitDrain, client); } else { emitDrain(client); } continue; } if (client[kPending] === 0) { return; } if (client[kRunning] >= (client[kPipelining] || 1)) { return; } const request = client[kQueue][client[kPendingIdx]]; if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { if (client[kRunning] > 0) { return; } client[kServerName] = request.servername; if (socket && socket.servername !== request.servername) { util.destroy(socket, new InformationalError("servername changed")); return; } } if (client[kConnecting]) { return; } if (!socket && !client[kHTTP2Session]) { connect(client); return; } if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { return; } if (client[kRunning] > 0 && !request.idempotent) { return; } if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { return; } if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { return; } if (!request.aborted && write(client, request)) { client[kPendingIdx]++; } else { client[kQueue].splice(client[kPendingIdx], 1); } } } __name(_resume, "_resume"); function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } __name(shouldSendContentLength, "shouldSendContentLength"); function write(client, request) { if (client[kHTTPConnVersion] === "h2") { writeH2(client, client[kHTTP2Session], request); return; } const { body, method, path: path2, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); } const bodyLength = util.bodyLength(body); let contentLength = bodyLength; if (contentLength === null) { contentLength = request.contentLength; } if (contentLength === 0 && !expectsPayload) { contentLength = null; } if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } const socket = client[kSocket]; try { request.onConnect((err) => { if (request.aborted || request.completed) { return; } errorRequest(client, request, err || new RequestAbortedError()); util.destroy(socket, new InformationalError("aborted")); }); } catch (err) { errorRequest(client, request, err); } if (request.aborted) { return false; } if (method === "HEAD") { socket[kReset] = true; } if (upgrade || method === "CONNECT") { socket[kReset] = true; } if (reset != null) { socket[kReset] = reset; } if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { socket[kReset] = true; } if (blocking) { socket[kBlocking] = true; } let header = `${method} ${path2} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r `; } else { header += client[kHostHeader]; } if (upgrade) { header += `connection: upgrade\r upgrade: ${upgrade}\r `; } else if (client[kPipelining] && !socket[kReset]) { header += "connection: keep-alive\r\n"; } else { header += "connection: close\r\n"; } if (headers) { header += headers; } if (channels.sendHeaders.hasSubscribers) { channels.sendHeaders.publish({ request, headers: header, socket }); } if (!body || bodyLength === 0) { if (contentLength === 0) { socket.write(`${header}content-length: 0\r \r `, "latin1"); } else { assert(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } request.onRequestSent(); } else if (util.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); socket.write(body); socket.uncork(); request.onBodySent(body); request.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }); } else { writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }); } } else if (util.isStream(body)) { writeStream({ body, client, request, socket, contentLength, header, expectsPayload }); } else if (util.isIterable(body)) { writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }); } else { assert(false); } return true; } __name(write, "write"); function writeH2(client, session, request) { const { body, method, path: path2, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; if (upgrade) { errorRequest(client, request, new Error("Upgrade not supported for H2")); return false; } try { request.onConnect((err) => { if (request.aborted || request.completed) { return; } errorRequest(client, request, err || new RequestAbortedError()); }); } catch (err) { errorRequest(client, request, err); } if (request.aborted) { return false; } let stream; const h2State = client[kHTTP2SessionState]; headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]; headers[HTTP2_HEADER_METHOD] = method; if (method === "CONNECT") { session.ref(); stream = session.request(headers, { endStream: false, signal }); if (stream.id && !stream.pending) { request.onUpgrade(null, null, stream); ++h2State.openStreams; } else { stream.once("ready", () => { request.onUpgrade(null, null, stream); ++h2State.openStreams; }); } stream.once("close", () => { h2State.openStreams -= 1; if (h2State.openStreams === 0) session.unref(); }); return true; } headers[HTTP2_HEADER_PATH] = path2; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); } let contentLength = util.bodyLength(body); if (contentLength == null) { contentLength = request.contentLength; } if (contentLength === 0 || !expectsPayload) { contentLength = null; } if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } if (contentLength != null) { assert(body, "no body must not have content length"); headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); const shouldEndStream = method === "GET" || method === "HEAD"; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; stream = session.request(headers, { endStream: shouldEndStream, signal }); stream.once("continue", writeBodyH2); } else { stream = session.request(headers, { endStream: shouldEndStream, signal }); writeBodyH2(); } ++h2State.openStreams; stream.once("response", (headers2) => { const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) { stream.pause(); } }); stream.once("end", () => { request.onComplete([]); }); stream.on("data", (chunk) => { if (request.onData(chunk) === false) { stream.pause(); } }); stream.once("close", () => { h2State.openStreams -= 1; if (h2State.openStreams === 0) { session.unref(); } }); stream.once("error", function(err) { if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { h2State.streams -= 1; util.destroy(stream, err); } }); stream.once("frameError", (type, code) => { const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); errorRequest(client, request, err); if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { h2State.streams -= 1; util.destroy(stream, err); } }); return true; function writeBodyH2() { if (!body) { request.onRequestSent(); } else if (util.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); stream.cork(); stream.write(body); stream.uncork(); stream.end(); request.onBodySent(body); request.onRequestSent(); } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { writeIterable({ client, request, contentLength, h2stream: stream, expectsPayload, body: body.stream(), socket: client[kSocket], header: "" }); } else { writeBlob({ body, client, request, contentLength, expectsPayload, h2stream: stream, header: "", socket: client[kSocket] }); } } else if (util.isStream(body)) { writeStream({ body, client, request, contentLength, expectsPayload, socket: client[kSocket], h2stream: stream, header: "" }); } else if (util.isIterable(body)) { writeIterable({ body, client, request, contentLength, expectsPayload, header: "", h2stream: stream, socket: client[kSocket] }); } else { assert(false); } } __name(writeBodyH2, "writeBodyH2"); } __name(writeH2, "writeH2"); function writeStream({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); if (client[kHTTPConnVersion] === "h2") { let onPipeData = function(chunk) { request.onBodySent(chunk); }; __name(onPipeData, "onPipeData"); const pipe = pipeline( body, h2stream, (err) => { if (err) { util.destroy(body, err); util.destroy(h2stream, err); } else { request.onRequestSent(); } } ); pipe.on("data", onPipeData); pipe.once("end", () => { pipe.removeListener("data", onPipeData); util.destroy(pipe); }); return; } let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = /* @__PURE__ */ __name(function(chunk) { if (finished) { return; } try { if (!writer.write(chunk) && this.pause) { this.pause(); } } catch (err) { util.destroy(this, err); } }, "onData"); const onDrain = /* @__PURE__ */ __name(function() { if (finished) { return; } if (body.resume) { body.resume(); } }, "onDrain"); const onAbort = /* @__PURE__ */ __name(function() { if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }, "onAbort"); const onFinished = /* @__PURE__ */ __name(function(err) { if (finished) { return; } finished = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); if (!err) { try { writer.end(); } catch (er) { err = er; } } writer.destroy(err); if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { util.destroy(body, err); } else { util.destroy(body); } }, "onFinished"); body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onAbort); if (body.resume) { body.resume(); } socket.on("drain", onDrain).on("error", onFinished); } __name(writeStream, "writeStream"); async function writeBlob({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength === body.size, "blob body must have content length"); const isH2 = client[kHTTPConnVersion] === "h2"; try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); } const buffer = Buffer.from(await body.arrayBuffer()); if (isH2) { h2stream.cork(); h2stream.write(buffer); h2stream.uncork(); } else { socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); socket.write(buffer); socket.uncork(); } request.onBodySent(buffer); request.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } resume(client); } catch (err) { util.destroy(isH2 ? h2stream : socket, err); } } __name(writeBlob, "writeBlob"); async function writeIterable({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { const cb = callback; callback = null; cb(); } } __name(onDrain, "onDrain"); const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { callback = resolve; } }), "waitForDrain"); if (client[kHTTPConnVersion] === "h2") { h2stream.on("close", onDrain).on("drain", onDrain); try { for await (const chunk of body) { if (socket[kError]) { throw socket[kError]; } const res = h2stream.write(chunk); request.onBodySent(chunk); if (!res) { await waitForDrain(); } } } catch (err) { h2stream.destroy(err); } finally { request.onRequestSent(); h2stream.end(); h2stream.off("close", onDrain).off("drain", onDrain); } return; } socket.on("close", onDrain).on("drain", onDrain); const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); try { for await (const chunk of body) { if (socket[kError]) { throw socket[kError]; } if (!writer.write(chunk)) { await waitForDrain(); } } writer.end(); } catch (err) { writer.destroy(err); } finally { socket.off("close", onDrain).off("drain", onDrain); } } __name(writeIterable, "writeIterable"); var AsyncWriter = class { static { __name(this, "AsyncWriter"); } constructor({ socket, request, contentLength, client, expectsPayload, header }) { this.socket = socket; this.request = request; this.contentLength = contentLength; this.client = client; this.bytesWritten = 0; this.expectsPayload = expectsPayload; this.header = header; socket[kWriting] = true; } write(chunk) { const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; if (socket[kError]) { throw socket[kError]; } if (socket.destroyed) { return false; } const len = Buffer.byteLength(chunk); if (!len) { return true; } if (contentLength !== null && bytesWritten + len > contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError(); } process.emitWarning(new RequestContentLengthMismatchError()); } socket.cork(); if (bytesWritten === 0) { if (!expectsPayload) { socket[kReset] = true; } if (contentLength === null) { socket.write(`${header}transfer-encoding: chunked\r `, "latin1"); } else { socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); } } if (contentLength === null) { socket.write(`\r ${len.toString(16)}\r `, "latin1"); } this.bytesWritten += len; const ret = socket.write(chunk); socket.uncork(); request.onBodySent(chunk); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { if (socket[kParser].timeout.refresh) { socket[kParser].timeout.refresh(); } } } return ret; } end() { const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; request.onRequestSent(); socket[kWriting] = false; if (socket[kError]) { throw socket[kError]; } if (socket.destroyed) { return; } if (bytesWritten === 0) { if (expectsPayload) { socket.write(`${header}content-length: 0\r \r `, "latin1"); } else { socket.write(`${header}\r `, "latin1"); } } else if (contentLength === null) { socket.write("\r\n0\r\n\r\n", "latin1"); } if (contentLength !== null && bytesWritten !== contentLength) { if (client[kStrictContentLength]) { throw new RequestContentLengthMismatchError(); } else { process.emitWarning(new RequestContentLengthMismatchError()); } } if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { if (socket[kParser].timeout.refresh) { socket[kParser].timeout.refresh(); } } resume(client); } destroy(err) { const { socket, client } = this; socket[kWriting] = false; if (err) { assert(client[kRunning] <= 1, "pipeline should only contain this request"); util.destroy(socket, err); } } }; function errorRequest(client, request, err) { try { request.onError(err); assert(request.aborted); } catch (err2) { client.emit("error", err2); } } __name(errorRequest, "errorRequest"); module2.exports = Client; } }); // node_modules/undici/lib/node/fixed-queue.js var require_fixed_queue = __commonJS({ "node_modules/undici/lib/node/fixed-queue.js"(exports2, module2) { "use strict"; var kSize = 2048; var kMask = kSize - 1; var FixedCircularBuffer = class { static { __name(this, "FixedCircularBuffer"); } constructor() { this.bottom = 0; this.top = 0; this.list = new Array(kSize); this.next = null; } isEmpty() { return this.top === this.bottom; } isFull() { return (this.top + 1 & kMask) === this.bottom; } push(data) { this.list[this.top] = data; this.top = this.top + 1 & kMask; } shift() { const nextItem = this.list[this.bottom]; if (nextItem === void 0) return null; this.list[this.bottom] = void 0; this.bottom = this.bottom + 1 & kMask; return nextItem; } }; module2.exports = class FixedQueue { static { __name(this, "FixedQueue"); } constructor() { this.head = this.tail = new FixedCircularBuffer(); } isEmpty() { return this.head.isEmpty(); } push(data) { if (this.head.isFull()) { this.head = this.head.next = new FixedCircularBuffer(); } this.head.push(data); } shift() { const tail = this.tail; const next = tail.shift(); if (tail.isEmpty() && tail.next !== null) { this.tail = tail.next; } return next; } }; } }); // node_modules/undici/lib/pool-stats.js var require_pool_stats = __commonJS({ "node_modules/undici/lib/pool-stats.js"(exports2, module2) { var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); var kPool = Symbol("pool"); var PoolStats = class { static { __name(this, "PoolStats"); } constructor(pool) { this[kPool] = pool; } get connected() { return this[kPool][kConnected]; } get free() { return this[kPool][kFree]; } get pending() { return this[kPool][kPending]; } get queued() { return this[kPool][kQueued]; } get running() { return this[kPool][kRunning]; } get size() { return this[kPool][kSize]; } }; module2.exports = PoolStats; } }); // node_modules/undici/lib/pool-base.js var require_pool_base = __commonJS({ "node_modules/undici/lib/pool-base.js"(exports2, module2) { "use strict"; var DispatcherBase = require_dispatcher_base(); var FixedQueue = require_fixed_queue(); var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols(); var PoolStats = require_pool_stats(); var kClients = Symbol("clients"); var kNeedDrain = Symbol("needDrain"); var kQueue = Symbol("queue"); var kClosedResolve = Symbol("closed resolve"); var kOnDrain = Symbol("onDrain"); var kOnConnect = Symbol("onConnect"); var kOnDisconnect = Symbol("onDisconnect"); var kOnConnectionError = Symbol("onConnectionError"); var kGetDispatcher = Symbol("get dispatcher"); var kAddClient = Symbol("add client"); var kRemoveClient = Symbol("remove client"); var kStats = Symbol("stats"); var PoolBase = class extends DispatcherBase { static { __name(this, "PoolBase"); } constructor() { super(); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; const pool = this; this[kOnDrain] = /* @__PURE__ */ __name(function onDrain(origin, targets) { const queue = pool[kQueue]; let needDrain = false; while (!needDrain) { const item = queue.shift(); if (!item) { break; } pool[kQueued]--; needDrain = !this.dispatch(item.opts, item.handler); } this[kNeedDrain] = needDrain; if (!this[kNeedDrain] && pool[kNeedDrain]) { pool[kNeedDrain] = false; pool.emit("drain", origin, [pool, ...targets]); } if (pool[kClosedResolve] && queue.isEmpty()) { Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); } }, "onDrain"); this[kOnConnect] = (origin, targets) => { pool.emit("connect", origin, [pool, ...targets]); }; this[kOnDisconnect] = (origin, targets, err) => { pool.emit("disconnect", origin, [pool, ...targets], err); }; this[kOnConnectionError] = (origin, targets, err) => { pool.emit("connectionError", origin, [pool, ...targets], err); }; this[kStats] = new PoolStats(this); } get [kBusy]() { return this[kNeedDrain]; } get [kConnected]() { return this[kClients].filter((client) => client[kConnected]).length; } get [kFree]() { return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; } get [kPending]() { let ret = this[kQueued]; for (const { [kPending]: pending } of this[kClients]) { ret += pending; } return ret; } get [kRunning]() { let ret = 0; for (const { [kRunning]: running } of this[kClients]) { ret += running; } return ret; } get [kSize]() { let ret = this[kQueued]; for (const { [kSize]: size } of this[kClients]) { ret += size; } return ret; } get stats() { return this[kStats]; } async [kClose]() { if (this[kQueue].isEmpty()) { return Promise.all(this[kClients].map((c) => c.close())); } else { return new Promise((resolve) => { this[kClosedResolve] = resolve; }); } } async [kDestroy](err) { while (true) { const item = this[kQueue].shift(); if (!item) { break; } item.handler.onError(err); } return Promise.all(this[kClients].map((c) => c.destroy(err))); } [kDispatch](opts, handler) { const dispatcher = this[kGetDispatcher](); if (!dispatcher) { this[kNeedDrain] = true; this[kQueue].push({ opts, handler }); this[kQueued]++; } else if (!dispatcher.dispatch(opts, handler)) { dispatcher[kNeedDrain] = true; this[kNeedDrain] = !this[kGetDispatcher](); } return !this[kNeedDrain]; } [kAddClient](client) { client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); this[kClients].push(client); if (this[kNeedDrain]) { process.nextTick(() => { if (this[kNeedDrain]) { this[kOnDrain](client[kUrl], [this, client]); } }); } return this; } [kRemoveClient](client) { client.close(() => { const idx = this[kClients].indexOf(client); if (idx !== -1) { this[kClients].splice(idx, 1); } }); this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); } }; module2.exports = { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher }; } }); // node_modules/undici/lib/pool.js var require_pool = __commonJS({ "node_modules/undici/lib/pool.js"(exports2, module2) { "use strict"; var { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); var Client = require_client(); var { InvalidArgumentError } = require_errors(); var util = require_util(); var { kUrl, kInterceptors } = require_symbols(); var buildConnector = require_connect(); var kOptions = Symbol("options"); var kConnections = Symbol("connections"); var kFactory = Symbol("factory"); function defaultFactory(origin, opts) { return new Client(origin, opts); } __name(defaultFactory, "defaultFactory"); var Pool = class extends PoolBase { static { __name(this, "Pool"); } constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } if (connect != null && typeof connect !== "function" && typeof connect !== "object") { throw new InvalidArgumentError("connect must be a function or an object"); } if (typeof connect !== "function") { connect = buildConnector({ ...tls, maxCachedSessions, allowH2, socketPath, timeout: connectTimeout, ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, ...connect }); } this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; this.on("connectionError", (origin2, targets, error) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { this[kClients].splice(idx, 1); } } }); } [kGetDispatcher]() { let dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain]); if (dispatcher) { return dispatcher; } if (!this[kConnections] || this[kClients].length < this[kConnections]) { dispatcher = this[kFactory](this[kUrl], this[kOptions]); this[kAddClient](dispatcher); } return dispatcher; } }; module2.exports = Pool; } }); // node_modules/undici/lib/balanced-pool.js var require_balanced_pool = __commonJS({ "node_modules/undici/lib/balanced-pool.js"(exports2, module2) { "use strict"; var { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); var { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); var Pool = require_pool(); var { kUrl, kInterceptors } = require_symbols(); var { parseOrigin } = require_util(); var kFactory = Symbol("factory"); var kOptions = Symbol("options"); var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); var kCurrentWeight = Symbol("kCurrentWeight"); var kIndex = Symbol("kIndex"); var kWeight = Symbol("kWeight"); var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); var kErrorPenalty = Symbol("kErrorPenalty"); function getGreatestCommonDivisor(a, b) { if (b === 0) return a; return getGreatestCommonDivisor(b, a % b); } __name(getGreatestCommonDivisor, "getGreatestCommonDivisor"); function defaultFactory(origin, opts) { return new Pool(origin, opts); } __name(defaultFactory, "defaultFactory"); var BalancedPool = class extends PoolBase { static { __name(this, "BalancedPool"); } constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { super(); this[kOptions] = opts; this[kIndex] = -1; this[kCurrentWeight] = 0; this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; this[kErrorPenalty] = this[kOptions].errorPenalty || 15; if (!Array.isArray(upstreams)) { upstreams = [upstreams]; } if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; this[kFactory] = factory; for (const upstream of upstreams) { this.addUpstream(upstream); } this._updateBalancedPoolStats(); } addUpstream(upstream) { const upstreamOrigin = parseOrigin(upstream).origin; if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { return this; } const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); this[kAddClient](pool); pool.on("connect", () => { pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); }); pool.on("connectionError", () => { pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); this._updateBalancedPoolStats(); }); pool.on("disconnect", (...args) => { const err = args[2]; if (err && err.code === "UND_ERR_SOCKET") { pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); this._updateBalancedPoolStats(); } }); for (const client of this[kClients]) { client[kWeight] = this[kMaxWeightPerServer]; } this._updateBalancedPoolStats(); return this; } _updateBalancedPoolStats() { this[kGreatestCommonDivisor] = this[kClients].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); } removeUpstream(upstream) { const upstreamOrigin = parseOrigin(upstream).origin; const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); if (pool) { this[kRemoveClient](pool); } return this; } get upstreams() { return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); } [kGetDispatcher]() { if (this[kClients].length === 0) { throw new BalancedPoolMissingUpstreamError(); } const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); if (!dispatcher) { return; } const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); if (allClientsBusy) { return; } let counter = 0; let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); while (counter++ < this[kClients].length) { this[kIndex] = (this[kIndex] + 1) % this[kClients].length; const pool = this[kClients][this[kIndex]]; if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { maxWeightIndex = this[kIndex]; } if (this[kIndex] === 0) { this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; if (this[kCurrentWeight] <= 0) { this[kCurrentWeight] = this[kMaxWeightPerServer]; } } if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { return pool; } } this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; this[kIndex] = maxWeightIndex; return this[kClients][maxWeightIndex]; } }; module2.exports = BalancedPool; } }); // node_modules/undici/lib/compat/dispatcher-weakref.js var require_dispatcher_weakref = __commonJS({ "node_modules/undici/lib/compat/dispatcher-weakref.js"(exports2, module2) { "use strict"; var { kConnected, kSize } = require_symbols(); var CompatWeakRef = class { static { __name(this, "CompatWeakRef"); } constructor(value) { this.value = value; } deref() { return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; } }; var CompatFinalizer = class { static { __name(this, "CompatFinalizer"); } constructor(finalizer) { this.finalizer = finalizer; } register(dispatcher, key) { if (dispatcher.on) { dispatcher.on("disconnect", () => { if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { this.finalizer(key); } }); } } }; module2.exports = function() { if (process.env.NODE_V8_COVERAGE) { return { WeakRef: CompatWeakRef, FinalizationRegistry: CompatFinalizer }; } return { WeakRef: global.WeakRef || CompatWeakRef, FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer }; }; } }); // node_modules/undici/lib/agent.js var require_agent = __commonJS({ "node_modules/undici/lib/agent.js"(exports2, module2) { "use strict"; var { InvalidArgumentError } = require_errors(); var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); var DispatcherBase = require_dispatcher_base(); var Pool = require_pool(); var Client = require_client(); var util = require_util(); var createRedirectInterceptor = require_redirectInterceptor(); var { WeakRef: WeakRef2, FinalizationRegistry } = require_dispatcher_weakref()(); var kOnConnect = Symbol("onConnect"); var kOnDisconnect = Symbol("onDisconnect"); var kOnConnectionError = Symbol("onConnectionError"); var kMaxRedirections = Symbol("maxRedirections"); var kOnDrain = Symbol("onDrain"); var kFactory = Symbol("factory"); var kFinalizer = Symbol("finalizer"); var kOptions = Symbol("options"); function defaultFactory(origin, opts) { return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); } __name(defaultFactory, "defaultFactory"); var Agent = class extends DispatcherBase { static { __name(this, "Agent"); } constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { super(); if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } if (connect != null && typeof connect !== "function" && typeof connect !== "object") { throw new InvalidArgumentError("connect must be a function or an object"); } if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } if (connect && typeof connect !== "function") { connect = { ...connect }; } this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; this[kOptions] = { ...util.deepClone(options), connect }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kMaxRedirections] = maxRedirections; this[kFactory] = factory; this[kClients] = /* @__PURE__ */ new Map(); this[kFinalizer] = new FinalizationRegistry( /* istanbul ignore next: gc is undeterministic */ (key) => { const ref = this[kClients].get(key); if (ref !== void 0 && ref.deref() === void 0) { this[kClients].delete(key); } } ); const agent = this; this[kOnDrain] = (origin, targets) => { agent.emit("drain", origin, [agent, ...targets]); }; this[kOnConnect] = (origin, targets) => { agent.emit("connect", origin, [agent, ...targets]); }; this[kOnDisconnect] = (origin, targets, err) => { agent.emit("disconnect", origin, [agent, ...targets], err); }; this[kOnConnectionError] = (origin, targets, err) => { agent.emit("connectionError", origin, [agent, ...targets], err); }; } get [kRunning]() { let ret = 0; for (const ref of this[kClients].values()) { const client = ref.deref(); if (client) { ret += client[kRunning]; } } return ret; } [kDispatch](opts, handler) { let key; if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { key = String(opts.origin); } else { throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); } const ref = this[kClients].get(key); let dispatcher = ref ? ref.deref() : null; if (!dispatcher) { dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); this[kClients].set(key, new WeakRef2(dispatcher)); this[kFinalizer].register(dispatcher, key); } return dispatcher.dispatch(opts, handler); } async [kClose]() { const closePromises = []; for (const ref of this[kClients].values()) { const client = ref.deref(); if (client) { closePromises.push(client.close()); } } await Promise.all(closePromises); } async [kDestroy](err) { const destroyPromises = []; for (const ref of this[kClients].values()) { const client = ref.deref(); if (client) { destroyPromises.push(client.destroy(err)); } } await Promise.all(destroyPromises); } }; module2.exports = Agent; } }); // node_modules/undici/lib/api/readable.js var require_readable = __commonJS({ "node_modules/undici/lib/api/readable.js"(exports2, module2) { "use strict"; var assert = require("assert"); var { Readable } = require("stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require_errors(); var util = require_util(); var { ReadableStreamFrom, toUSVString } = require_util(); var Blob2; var kConsume = Symbol("kConsume"); var kReading = Symbol("kReading"); var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); var noop = /* @__PURE__ */ __name(() => { }, "noop"); module2.exports = class BodyReadable extends Readable { static { __name(this, "BodyReadable"); } constructor({ resume, abort, contentType = "", highWaterMark = 64 * 1024 // Same as nodejs fs streams. }) { super({ autoDestroy: true, read: resume, highWaterMark }); this._readableState.dataEmitted = false; this[kAbort] = abort; this[kConsume] = null; this[kBody] = null; this[kContentType] = contentType; this[kReading] = false; } destroy(err) { if (this.destroyed) { return this; } if (!err && !this._readableState.endEmitted) { err = new RequestAbortedError(); } if (err) { this[kAbort](); } return super.destroy(err); } emit(ev, ...args) { if (ev === "data") { this._readableState.dataEmitted = true; } else if (ev === "error") { this._readableState.errorEmitted = true; } return super.emit(ev, ...args); } on(ev, ...args) { if (ev === "data" || ev === "readable") { this[kReading] = true; } return super.on(ev, ...args); } addListener(ev, ...args) { return this.on(ev, ...args); } off(ev, ...args) { const ret = super.off(ev, ...args); if (ev === "data" || ev === "readable") { this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; } return ret; } removeListener(ev, ...args) { return this.off(ev, ...args); } push(chunk) { if (this[kConsume] && chunk !== null && this.readableLength === 0) { consumePush(this[kConsume], chunk); return this[kReading] ? super.push(chunk) : true; } return super.push(chunk); } // https://fetch.spec.whatwg.org/#dom-body-text async text() { return consume(this, "text"); } // https://fetch.spec.whatwg.org/#dom-body-json async json() { return consume(this, "json"); } // https://fetch.spec.whatwg.org/#dom-body-blob async blob() { return consume(this, "blob"); } // https://fetch.spec.whatwg.org/#dom-body-arraybuffer async arrayBuffer() { return consume(this, "arrayBuffer"); } // https://fetch.spec.whatwg.org/#dom-body-formdata async formData() { throw new NotSupportedError(); } // https://fetch.spec.whatwg.org/#dom-body-bodyused get bodyUsed() { return util.isDisturbed(this); } // https://fetch.spec.whatwg.org/#dom-body-body get body() { if (!this[kBody]) { this[kBody] = ReadableStreamFrom(this); if (this[kConsume]) { this[kBody].getReader(); assert(this[kBody].locked); } } return this[kBody]; } dump(opts) { let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144; const signal = opts && opts.signal; if (signal) { try { if (typeof signal !== "object" || !("aborted" in signal)) { throw new InvalidArgumentError("signal must be an AbortSignal"); } util.throwIfAborted(signal); } catch (err) { return Promise.reject(err); } } if (this.closed) { return Promise.resolve(null); } return new Promise((resolve, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); } else { resolve(null); } }).on("error", noop).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); } }).resume(); }); } }; function isLocked(self2) { return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; } __name(isLocked, "isLocked"); function isUnusable(self2) { return util.isDisturbed(self2) || isLocked(self2); } __name(isUnusable, "isUnusable"); async function consume(stream, type) { if (isUnusable(stream)) { throw new TypeError("unusable"); } assert(!stream[kConsume]); return new Promise((resolve, reject) => { stream[kConsume] = { type, stream, resolve, reject, length: 0, body: [] }; stream.on("error", function(err) { consumeFinish(this[kConsume], err); }).on("close", function() { if (this[kConsume].body !== null) { consumeFinish(this[kConsume], new RequestAbortedError()); } }); process.nextTick(consumeStart, stream[kConsume]); }); } __name(consume, "consume"); function consumeStart(consume2) { if (consume2.body === null) { return; } const { _readableState: state } = consume2.stream; for (const chunk of state.buffer) { consumePush(consume2, chunk); } if (state.endEmitted) { consumeEnd(this[kConsume]); } else { consume2.stream.on("end", function() { consumeEnd(this[kConsume]); }); } consume2.stream.resume(); while (consume2.stream.read() != null) { } } __name(consumeStart, "consumeStart"); function consumeEnd(consume2) { const { type, body, resolve, stream, length } = consume2; try { if (type === "text") { resolve(toUSVString(Buffer.concat(body))); } else if (type === "json") { resolve(JSON.parse(Buffer.concat(body))); } else if (type === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; for (const buf of body) { dst.set(buf, pos); pos += buf.byteLength; } resolve(dst.buffer); } else if (type === "blob") { if (!Blob2) { Blob2 = require("buffer").Blob; } resolve(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { stream.destroy(err); } } __name(consumeEnd, "consumeEnd"); function consumePush(consume2, chunk) { consume2.length += chunk.length; consume2.body.push(chunk); } __name(consumePush, "consumePush"); function consumeFinish(consume2, err) { if (consume2.body === null) { return; } if (err) { consume2.reject(err); } else { consume2.resolve(); } consume2.type = null; consume2.stream = null; consume2.resolve = null; consume2.reject = null; consume2.length = 0; consume2.body = null; } __name(consumeFinish, "consumeFinish"); } }); // node_modules/undici/lib/api/util.js var require_util3 = __commonJS({ "node_modules/undici/lib/api/util.js"(exports2, module2) { var assert = require("assert"); var { ResponseStatusCodeError } = require_errors(); var { toUSVString } = require_util(); async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { assert(body); let chunks = []; let limit = 0; for await (const chunk of body) { chunks.push(chunk); limit += chunk.length; if (limit > 128 * 1024) { chunks = null; break; } } if (statusCode === 204 || !contentType || !chunks) { process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); return; } try { if (contentType.startsWith("application/json")) { const payload = JSON.parse(toUSVString(Buffer.concat(chunks))); process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); return; } if (contentType.startsWith("text/")) { const payload = toUSVString(Buffer.concat(chunks)); process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); return; } } catch (err) { } process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); } __name(getResolveErrorBodyCallback, "getResolveErrorBodyCallback"); module2.exports = { getResolveErrorBodyCallback }; } }); // node_modules/undici/lib/api/abort-signal.js var require_abort_signal = __commonJS({ "node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { var { addAbortListener } = require_util(); var { RequestAbortedError } = require_errors(); var kListener = Symbol("kListener"); var kSignal = Symbol("kSignal"); function abort(self2) { if (self2.abort) { self2.abort(); } else { self2.onError(new RequestAbortedError()); } } __name(abort, "abort"); function addSignal(self2, signal) { self2[kSignal] = null; self2[kListener] = null; if (!signal) { return; } if (signal.aborted) { abort(self2); return; } self2[kSignal] = signal; self2[kListener] = () => { abort(self2); }; addAbortListener(self2[kSignal], self2[kListener]); } __name(addSignal, "addSignal"); function removeSignal(self2) { if (!self2[kSignal]) { return; } if ("removeEventListener" in self2[kSignal]) { self2[kSignal].removeEventListener("abort", self2[kListener]); } else { self2[kSignal].removeListener("abort", self2[kListener]); } self2[kSignal] = null; self2[kListener] = null; } __name(removeSignal, "removeSignal"); module2.exports = { addSignal, removeSignal }; } }); // node_modules/undici/lib/api/api-request.js var require_api_request = __commonJS({ "node_modules/undici/lib/api/api-request.js"(exports2, module2) { "use strict"; var Readable = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var RequestHandler = class extends AsyncResource { static { __name(this, "RequestHandler"); } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; try { if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { throw new InvalidArgumentError("invalid highWaterMark"); } if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); } if (method === "CONNECT") { throw new InvalidArgumentError("invalid method"); } if (onInfo && typeof onInfo !== "function") { throw new InvalidArgumentError("invalid onInfo callback"); } super("UNDICI_REQUEST"); } catch (err) { if (util.isStream(body)) { util.destroy(body.on("error", util.nop), err); } throw err; } this.responseHeaders = responseHeaders || null; this.opaque = opaque || null; this.callback = callback; this.res = null; this.abort = null; this.body = body; this.trailers = {}; this.context = null; this.onInfo = onInfo || null; this.throwOnError = throwOnError; this.highWaterMark = highWaterMark; if (util.isStream(body)) { body.on("error", (err) => { this.onError(err); }); } addSignal(this, signal); } onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; this.context = context; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); } return; } const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; const body = new Readable({ resume, abort, contentType, highWaterMark }); this.callback = null; this.res = body; if (callback !== null) { if (this.throwOnError && statusCode >= 400) { this.runInAsyncScope( getResolveErrorBodyCallback, null, { callback, body, contentType, statusCode, statusMessage, headers } ); } else { this.runInAsyncScope(callback, null, null, { statusCode, headers, trailers: this.trailers, opaque, body, context }); } } } onData(chunk) { const { res } = this; return res.push(chunk); } onComplete(trailers) { const { res } = this; removeSignal(this); util.parseHeaders(trailers, this.trailers); res.push(null); } onError(err) { const { res, callback, body, opaque } = this; removeSignal(this); if (callback) { this.callback = null; queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }); }); } if (res) { this.res = null; queueMicrotask(() => { util.destroy(res, err); }); } if (body) { this.body = null; util.destroy(body, err); } } }; function request(opts, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { request.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data); }); }); } try { this.dispatch(opts, new RequestHandler(opts, callback)); } catch (err) { if (typeof callback !== "function") { throw err; } const opaque = opts && opts.opaque; queueMicrotask(() => callback(err, { opaque })); } } __name(request, "request"); module2.exports = request; module2.exports.RequestHandler = RequestHandler; } }); // node_modules/undici/lib/api/api-stream.js var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; var { finished, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var StreamHandler = class extends AsyncResource { static { __name(this, "StreamHandler"); } constructor(opts, factory, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; try { if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } if (typeof factory !== "function") { throw new InvalidArgumentError("invalid factory"); } if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); } if (method === "CONNECT") { throw new InvalidArgumentError("invalid method"); } if (onInfo && typeof onInfo !== "function") { throw new InvalidArgumentError("invalid onInfo callback"); } super("UNDICI_STREAM"); } catch (err) { if (util.isStream(body)) { util.destroy(body.on("error", util.nop), err); } throw err; } this.responseHeaders = responseHeaders || null; this.opaque = opaque || null; this.factory = factory; this.callback = callback; this.res = null; this.abort = null; this.context = null; this.trailers = null; this.body = body; this.onInfo = onInfo || null; this.throwOnError = throwOnError || false; if (util.isStream(body)) { body.on("error", (err) => { this.onError(err); }); } addSignal(this, signal); } onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; this.context = context; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { factory, opaque, context, callback, responseHeaders } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); } return; } this.factory = null; let res; if (this.throwOnError && statusCode >= 400) { const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; res = new PassThrough(); this.callback = null; this.runInAsyncScope( getResolveErrorBodyCallback, null, { callback, body: res, contentType, statusCode, statusMessage, headers } ); } else { if (factory === null) { return; } res = this.runInAsyncScope(factory, null, { statusCode, headers, opaque, context }); if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } finished(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { util.destroy(res2, err); } this.callback = null; this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); if (err) { abort(); } }); } res.on("drain", resume); this.res = res; const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; return needDrain !== true; } onData(chunk) { const { res } = this; return res ? res.write(chunk) : true; } onComplete(trailers) { const { res } = this; removeSignal(this); if (!res) { return; } this.trailers = util.parseHeaders(trailers); res.end(); } onError(err) { const { res, callback, opaque, body } = this; removeSignal(this); this.factory = null; if (res) { this.res = null; util.destroy(res, err); } else if (callback) { this.callback = null; queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }); }); } if (body) { this.body = null; util.destroy(body, err); } } }; function stream(opts, factory, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { stream.call(this, opts, factory, (err, data) => { return err ? reject(err) : resolve(data); }); }); } try { this.dispatch(opts, new StreamHandler(opts, factory, callback)); } catch (err) { if (typeof callback !== "function") { throw err; } const opaque = opts && opts.opaque; queueMicrotask(() => callback(err, { opaque })); } } __name(stream, "stream"); module2.exports = stream; } }); // node_modules/undici/lib/api/api-pipeline.js var require_api_pipeline = __commonJS({ "node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { "use strict"; var { Readable, Duplex, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); var util = require_util(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var assert = require("assert"); var kResume = Symbol("resume"); var PipelineRequest = class extends Readable { static { __name(this, "PipelineRequest"); } constructor() { super({ autoDestroy: true }); this[kResume] = null; } _read() { const { [kResume]: resume } = this; if (resume) { this[kResume] = null; resume(); } } _destroy(err, callback) { this._read(); callback(err); } }; var PipelineResponse = class extends Readable { static { __name(this, "PipelineResponse"); } constructor(resume) { super({ autoDestroy: true }); this[kResume] = resume; } _read() { this[kResume](); } _destroy(err, callback) { if (!err && !this._readableState.endEmitted) { err = new RequestAbortedError(); } callback(err); } }; var PipelineHandler = class extends AsyncResource { static { __name(this, "PipelineHandler"); } constructor(opts, handler) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } if (typeof handler !== "function") { throw new InvalidArgumentError("invalid handler"); } const { signal, method, opaque, onInfo, responseHeaders } = opts; if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); } if (method === "CONNECT") { throw new InvalidArgumentError("invalid method"); } if (onInfo && typeof onInfo !== "function") { throw new InvalidArgumentError("invalid onInfo callback"); } super("UNDICI_PIPELINE"); this.opaque = opaque || null; this.responseHeaders = responseHeaders || null; this.handler = handler; this.abort = null; this.context = null; this.onInfo = onInfo || null; this.req = new PipelineRequest().on("error", util.nop); this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, read: () => { const { body } = this; if (body && body.resume) { body.resume(); } }, write: (chunk, encoding, callback) => { const { req } = this; if (req.push(chunk, encoding) || req._readableState.destroyed) { callback(); } else { req[kResume] = callback; } }, destroy: (err, callback) => { const { body, req, res, ret, abort } = this; if (!err && !ret._readableState.endEmitted) { err = new RequestAbortedError(); } if (abort && err) { abort(); } util.destroy(body, err); util.destroy(req, err); util.destroy(res, err); removeSignal(this); callback(err); } }).on("prefinish", () => { const { req } = this; req.push(null); }); this.res = null; addSignal(this, signal); } onConnect(abort, context) { const { ret, res } = this; assert(!res, "pipeline cannot be retried"); if (ret.destroyed) { throw new RequestAbortedError(); } this.abort = abort; this.context = context; } onHeaders(statusCode, rawHeaders, resume) { const { opaque, handler, context } = this; if (statusCode < 200) { if (this.onInfo) { const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); this.onInfo({ statusCode, headers }); } return; } this.res = new PipelineResponse(resume); let body; try { this.handler = null; const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); body = this.runInAsyncScope(handler, null, { statusCode, headers, opaque, body: this.res, context }); } catch (err) { this.res.on("error", util.nop); throw err; } if (!body || typeof body.on !== "function") { throw new InvalidReturnValueError("expected Readable"); } body.on("data", (chunk) => { const { ret, body: body2 } = this; if (!ret.push(chunk) && body2.pause) { body2.pause(); } }).on("error", (err) => { const { ret } = this; util.destroy(ret, err); }).on("end", () => { const { ret } = this; ret.push(null); }).on("close", () => { const { ret } = this; if (!ret._readableState.ended) { util.destroy(ret, new RequestAbortedError()); } }); this.body = body; } onData(chunk) { const { res } = this; return res.push(chunk); } onComplete(trailers) { const { res } = this; res.push(null); } onError(err) { const { ret } = this; this.handler = null; util.destroy(ret, err); } }; function pipeline(opts, handler) { try { const pipelineHandler = new PipelineHandler(opts, handler); this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); return pipelineHandler.ret; } catch (err) { return new PassThrough().destroy(err); } } __name(pipeline, "pipeline"); module2.exports = pipeline; } }); // node_modules/undici/lib/api/api-upgrade.js var require_api_upgrade = __commonJS({ "node_modules/undici/lib/api/api-upgrade.js"(exports2, module2) { "use strict"; var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); var { AsyncResource } = require("async_hooks"); var util = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var assert = require("assert"); var UpgradeHandler = class extends AsyncResource { static { __name(this, "UpgradeHandler"); } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } const { signal, opaque, responseHeaders } = opts; if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); } super("UNDICI_UPGRADE"); this.responseHeaders = responseHeaders || null; this.opaque = opaque || null; this.callback = callback; this.abort = null; this.context = null; addSignal(this, signal); } onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; this.context = null; } onHeaders() { throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { const { callback, opaque, context } = this; assert.strictEqual(statusCode, 101); removeSignal(this); this.callback = null; const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); this.runInAsyncScope(callback, null, null, { headers, socket, opaque, context }); } onError(err) { const { callback, opaque } = this; removeSignal(this); if (callback) { this.callback = null; queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }); }); } } }; function upgrade(opts, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { upgrade.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data); }); }); } try { const upgradeHandler = new UpgradeHandler(opts, callback); this.dispatch({ ...opts, method: opts.method || "GET", upgrade: opts.protocol || "Websocket" }, upgradeHandler); } catch (err) { if (typeof callback !== "function") { throw err; } const opaque = opts && opts.opaque; queueMicrotask(() => callback(err, { opaque })); } } __name(upgrade, "upgrade"); module2.exports = upgrade; } }); // node_modules/undici/lib/api/api-connect.js var require_api_connect = __commonJS({ "node_modules/undici/lib/api/api-connect.js"(exports2, module2) { "use strict"; var { AsyncResource } = require("async_hooks"); var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); var util = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var ConnectHandler = class extends AsyncResource { static { __name(this, "ConnectHandler"); } constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } if (typeof callback !== "function") { throw new InvalidArgumentError("invalid callback"); } const { signal, opaque, responseHeaders } = opts; if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); } super("UNDICI_CONNECT"); this.opaque = opaque || null; this.responseHeaders = responseHeaders || null; this.callback = callback; this.abort = null; addSignal(this, signal); } onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; this.context = context; } onHeaders() { throw new SocketError("bad connect", null); } onUpgrade(statusCode, rawHeaders, socket) { const { callback, opaque, context } = this; removeSignal(this); this.callback = null; let headers = rawHeaders; if (headers != null) { headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); } this.runInAsyncScope(callback, null, null, { statusCode, headers, socket, opaque, context }); } onError(err) { const { callback, opaque } = this; removeSignal(this); if (callback) { this.callback = null; queueMicrotask(() => { this.runInAsyncScope(callback, null, err, { opaque }); }); } } }; function connect(opts, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { connect.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data); }); }); } try { const connectHandler = new ConnectHandler(opts, callback); this.dispatch({ ...opts, method: "CONNECT" }, connectHandler); } catch (err) { if (typeof callback !== "function") { throw err; } const opaque = opts && opts.opaque; queueMicrotask(() => callback(err, { opaque })); } } __name(connect, "connect"); module2.exports = connect; } }); // node_modules/undici/lib/api/index.js var require_api = __commonJS({ "node_modules/undici/lib/api/index.js"(exports2, module2) { "use strict"; module2.exports.request = require_api_request(); module2.exports.stream = require_api_stream(); module2.exports.pipeline = require_api_pipeline(); module2.exports.upgrade = require_api_upgrade(); module2.exports.connect = require_api_connect(); } }); // node_modules/undici/lib/mock/mock-errors.js var require_mock_errors = __commonJS({ "node_modules/undici/lib/mock/mock-errors.js"(exports2, module2) { "use strict"; var { UndiciError } = require_errors(); var MockNotMatchedError = class _MockNotMatchedError extends UndiciError { static { __name(this, "MockNotMatchedError"); } constructor(message) { super(message); Error.captureStackTrace(this, _MockNotMatchedError); this.name = "MockNotMatchedError"; this.message = message || "The request does not match any registered mock dispatches"; this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; } }; module2.exports = { MockNotMatchedError }; } }); // node_modules/undici/lib/mock/mock-symbols.js var require_mock_symbols = __commonJS({ "node_modules/undici/lib/mock/mock-symbols.js"(exports2, module2) { "use strict"; module2.exports = { kAgent: Symbol("agent"), kOptions: Symbol("options"), kFactory: Symbol("factory"), kDispatches: Symbol("dispatches"), kDispatchKey: Symbol("dispatch key"), kDefaultHeaders: Symbol("default headers"), kDefaultTrailers: Symbol("default trailers"), kContentLength: Symbol("content length"), kMockAgent: Symbol("mock agent"), kMockAgentSet: Symbol("mock agent set"), kMockAgentGet: Symbol("mock agent get"), kMockDispatch: Symbol("mock dispatch"), kClose: Symbol("close"), kOriginalClose: Symbol("original agent close"), kOrigin: Symbol("origin"), kIsMockActive: Symbol("is mock active"), kNetConnect: Symbol("net connect"), kGetNetConnect: Symbol("get net connect"), kConnected: Symbol("connected") }; } }); // node_modules/undici/lib/mock/mock-utils.js var require_mock_utils = __commonJS({ "node_modules/undici/lib/mock/mock-utils.js"(exports2, module2) { "use strict"; var { MockNotMatchedError } = require_mock_errors(); var { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); var { buildURL, nop } = require_util(); var { STATUS_CODES } = require("http"); var { types: { isPromise } } = require("util"); function matchValue(match, value) { if (typeof match === "string") { return match === value; } if (match instanceof RegExp) { return match.test(value); } if (typeof match === "function") { return match(value) === true; } return false; } __name(matchValue, "matchValue"); function lowerCaseEntries(headers) { return Object.fromEntries( Object.entries(headers).map(([headerName, headerValue]) => { return [headerName.toLocaleLowerCase(), headerValue]; }) ); } __name(lowerCaseEntries, "lowerCaseEntries"); function getHeaderByName(headers, key) { if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { return headers[i + 1]; } } return void 0; } else if (typeof headers.get === "function") { return headers.get(key); } else { return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; } } __name(getHeaderByName, "getHeaderByName"); function buildHeadersFromArray(headers) { const clone = headers.slice(); const entries = []; for (let index = 0; index < clone.length; index += 2) { entries.push([clone[index], clone[index + 1]]); } return Object.fromEntries(entries); } __name(buildHeadersFromArray, "buildHeadersFromArray"); function matchHeaders(mockDispatch2, headers) { if (typeof mockDispatch2.headers === "function") { if (Array.isArray(headers)) { headers = buildHeadersFromArray(headers); } return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {}); } if (typeof mockDispatch2.headers === "undefined") { return true; } if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") { return false; } for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) { const headerValue = getHeaderByName(headers, matchHeaderName); if (!matchValue(matchHeaderValue, headerValue)) { return false; } } return true; } __name(matchHeaders, "matchHeaders"); function safeUrl(path2) { if (typeof path2 !== "string") { return path2; } const pathSegments = path2.split("?"); if (pathSegments.length !== 2) { return path2; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } __name(safeUrl, "safeUrl"); function matchKey(mockDispatch2, { path: path2, method, body, headers }) { const pathMatch = matchValue(mockDispatch2.path, path2); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); return pathMatch && methodMatch && bodyMatch && headersMatch; } __name(matchKey, "matchKey"); function getResponseData(data) { if (Buffer.isBuffer(data)) { return data; } else if (typeof data === "object") { return JSON.stringify(data); } else { return data.toString(); } } __name(getResponseData, "getResponseData"); function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path2 }) => matchValue(safeUrl(path2), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); } matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); } return matchedMockDispatches[0]; } __name(getMockDispatch, "getMockDispatch"); function addMockDispatch(mockDispatches, key, data) { const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }; const replyData = typeof data === "function" ? { callback: data } : { ...data }; const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }; mockDispatches.push(newMockDispatch); return newMockDispatch; } __name(addMockDispatch, "addMockDispatch"); function deleteMockDispatch(mockDispatches, key) { const index = mockDispatches.findIndex((dispatch) => { if (!dispatch.consumed) { return false; } return matchKey(dispatch, key); }); if (index !== -1) { mockDispatches.splice(index, 1); } } __name(deleteMockDispatch, "deleteMockDispatch"); function buildKey(opts) { const { path: path2, method, body, headers, query } = opts; return { path: path2, method, body, headers, query }; } __name(buildKey, "buildKey"); function generateKeyValues(data) { return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ ...keyValuePairs, Buffer.from(`${key}`), Array.isArray(value) ? value.map((x) => Buffer.from(`${x}`)) : Buffer.from(`${value}`) ], []); } __name(generateKeyValues, "generateKeyValues"); function getStatusText(statusCode) { return STATUS_CODES[statusCode] || "unknown"; } __name(getStatusText, "getStatusText"); async function getResponse(body) { const buffers = []; for await (const data of body) { buffers.push(data); } return Buffer.concat(buffers).toString("utf8"); } __name(getResponse, "getResponse"); function mockDispatch(opts, handler) { const key = buildKey(opts); const mockDispatch2 = getMockDispatch(this[kDispatches], key); mockDispatch2.timesInvoked++; if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; if (error !== null) { deleteMockDispatch(this[kDispatches], key); handler.onError(error); return true; } if (typeof delay === "number" && delay > 0) { setTimeout(() => { handleReply(this[kDispatches]); }, delay); } else { handleReply(this[kDispatches]); } function handleReply(mockDispatches, _data = data) { const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; if (isPromise(body)) { body.then((newData) => handleReply(mockDispatches, newData)); return; } const responseData = getResponseData(body); const responseHeaders = generateKeyValues(headers); const responseTrailers = generateKeyValues(trailers); handler.abort = nop; handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)); handler.onData(Buffer.from(responseData)); handler.onComplete(responseTrailers); deleteMockDispatch(mockDispatches, key); } __name(handleReply, "handleReply"); function resume() { } __name(resume, "resume"); return true; } __name(mockDispatch, "mockDispatch"); function buildMockDispatch() { const agent = this[kMockAgent]; const origin = this[kOrigin]; const originalDispatch = this[kOriginalDispatch]; return /* @__PURE__ */ __name(function dispatch(opts, handler) { if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); } catch (error) { if (error instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler); } else { throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { throw error; } } } else { originalDispatch.call(this, opts, handler); } }, "dispatch"); } __name(buildMockDispatch, "buildMockDispatch"); function checkNetConnect(netConnect, origin) { const url = new URL(origin); if (netConnect === true) { return true; } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { return true; } return false; } __name(checkNetConnect, "checkNetConnect"); function buildMockOptions(opts) { if (opts) { const { agent, ...mockOptions } = opts; return mockOptions; } } __name(buildMockOptions, "buildMockOptions"); module2.exports = { getResponseData, getMockDispatch, addMockDispatch, deleteMockDispatch, buildKey, generateKeyValues, matchValue, getResponse, getStatusText, mockDispatch, buildMockDispatch, checkNetConnect, buildMockOptions, getHeaderByName }; } }); // node_modules/undici/lib/mock/mock-interceptor.js var require_mock_interceptor = __commonJS({ "node_modules/undici/lib/mock/mock-interceptor.js"(exports2, module2) { "use strict"; var { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); var { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); var { InvalidArgumentError } = require_errors(); var { buildURL } = require_util(); var MockScope = class { static { __name(this, "MockScope"); } constructor(mockDispatch) { this[kMockDispatch] = mockDispatch; } /** * Delay a reply by a set amount in ms. */ delay(waitInMs) { if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) { throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); } this[kMockDispatch].delay = waitInMs; return this; } /** * For a defined reply, never mark as consumed. */ persist() { this[kMockDispatch].persist = true; return this; } /** * Allow one to define a reply for a set amount of matching requests. */ times(repeatTimes) { if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); } this[kMockDispatch].times = repeatTimes; return this; } }; var MockInterceptor = class { static { __name(this, "MockInterceptor"); } constructor(opts, mockDispatches) { if (typeof opts !== "object") { throw new InvalidArgumentError("opts must be an object"); } if (typeof opts.path === "undefined") { throw new InvalidArgumentError("opts.path must be defined"); } if (typeof opts.method === "undefined") { opts.method = "GET"; } if (typeof opts.path === "string") { if (opts.query) { opts.path = buildURL(opts.path, opts.query); } else { const parsedURL = new URL(opts.path, "data://"); opts.path = parsedURL.pathname + parsedURL.search; } } if (typeof opts.method === "string") { opts.method = opts.method.toUpperCase(); } this[kDispatchKey] = buildKey(opts); this[kDispatches] = mockDispatches; this[kDefaultHeaders] = {}; this[kDefaultTrailers] = {}; this[kContentLength] = false; } createMockScopeDispatchData(statusCode, data, responseOptions = {}) { const responseData = getResponseData(data); const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; return { statusCode, data, headers, trailers }; } validateReplyParameters(statusCode, data, responseOptions) { if (typeof statusCode === "undefined") { throw new InvalidArgumentError("statusCode must be defined"); } if (typeof data === "undefined") { throw new InvalidArgumentError("data must be defined"); } if (typeof responseOptions !== "object") { throw new InvalidArgumentError("responseOptions must be an object"); } } /** * Mock an undici request with a defined reply. */ reply(replyData) { if (typeof replyData === "function") { const wrappedDefaultsCallback = /* @__PURE__ */ __name((opts) => { const resolvedData = replyData(opts); if (typeof resolvedData !== "object") { throw new InvalidArgumentError("reply options callback must return an object"); } const { statusCode: statusCode2, data: data2 = "", responseOptions: responseOptions2 = {} } = resolvedData; this.validateReplyParameters(statusCode2, data2, responseOptions2); return { ...this.createMockScopeDispatchData(statusCode2, data2, responseOptions2) }; }, "wrappedDefaultsCallback"); const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback); return new MockScope(newMockDispatch2); } const [statusCode, data = "", responseOptions = {}] = [...arguments]; this.validateReplyParameters(statusCode, data, responseOptions); const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData); return new MockScope(newMockDispatch); } /** * Mock an undici request with a defined error. */ replyWithError(error) { if (typeof error === "undefined") { throw new InvalidArgumentError("error must be defined"); } const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }); return new MockScope(newMockDispatch); } /** * Set default reply headers on the interceptor for subsequent replies */ defaultReplyHeaders(headers) { if (typeof headers === "undefined") { throw new InvalidArgumentError("headers must be defined"); } this[kDefaultHeaders] = headers; return this; } /** * Set default reply trailers on the interceptor for subsequent replies */ defaultReplyTrailers(trailers) { if (typeof trailers === "undefined") { throw new InvalidArgumentError("trailers must be defined"); } this[kDefaultTrailers] = trailers; return this; } /** * Set reply content length header for replies on the interceptor */ replyContentLength() { this[kContentLength] = true; return this; } }; module2.exports.MockInterceptor = MockInterceptor; module2.exports.MockScope = MockScope; } }); // node_modules/undici/lib/mock/mock-client.js var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; var { promisify } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); var { MockInterceptor } = require_mock_interceptor(); var Symbols = require_symbols(); var { InvalidArgumentError } = require_errors(); var MockClient = class extends Client { static { __name(this, "MockClient"); } constructor(origin, opts) { super(origin, opts); if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { throw new InvalidArgumentError("Argument opts.agent must implement Agent"); } this[kMockAgent] = opts.agent; this[kOrigin] = origin; this[kDispatches] = []; this[kConnected] = 1; this[kOriginalDispatch] = this.dispatch; this[kOriginalClose] = this.close.bind(this); this.dispatch = buildMockDispatch.call(this); this.close = this[kClose]; } get [Symbols.kConnected]() { return this[kConnected]; } /** * Sets up the base interceptor for mocking replies from undici. */ intercept(opts) { return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { await promisify(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } }; module2.exports = MockClient; } }); // node_modules/undici/lib/mock/mock-pool.js var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; var { promisify } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); var { MockInterceptor } = require_mock_interceptor(); var Symbols = require_symbols(); var { InvalidArgumentError } = require_errors(); var MockPool = class extends Pool { static { __name(this, "MockPool"); } constructor(origin, opts) { super(origin, opts); if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { throw new InvalidArgumentError("Argument opts.agent must implement Agent"); } this[kMockAgent] = opts.agent; this[kOrigin] = origin; this[kDispatches] = []; this[kConnected] = 1; this[kOriginalDispatch] = this.dispatch; this[kOriginalClose] = this.close.bind(this); this.dispatch = buildMockDispatch.call(this); this.close = this[kClose]; } get [Symbols.kConnected]() { return this[kConnected]; } /** * Sets up the base interceptor for mocking replies from undici. */ intercept(opts) { return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { await promisify(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } }; module2.exports = MockPool; } }); // node_modules/undici/lib/mock/pluralizer.js var require_pluralizer = __commonJS({ "node_modules/undici/lib/mock/pluralizer.js"(exports2, module2) { "use strict"; var singulars = { pronoun: "it", is: "is", was: "was", this: "this" }; var plurals = { pronoun: "they", is: "are", was: "were", this: "these" }; module2.exports = class Pluralizer { static { __name(this, "Pluralizer"); } constructor(singular, plural) { this.singular = singular; this.plural = plural; } pluralize(count) { const one = count === 1; const keys = one ? singulars : plurals; const noun = one ? this.singular : this.plural; return { ...keys, count, noun }; } }; } }); // node_modules/undici/lib/mock/pending-interceptors-formatter.js var require_pending_interceptors_formatter = __commonJS({ "node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports2, module2) { "use strict"; var { Transform } = require("stream"); var { Console } = require("console"); module2.exports = class PendingInterceptorsFormatter { static { __name(this, "PendingInterceptorsFormatter"); } constructor({ disableColors } = {}) { this.transform = new Transform({ transform(chunk, _enc, cb) { cb(null, chunk); } }); this.logger = new Console({ stdout: this.transform, inspectOptions: { colors: !disableColors && !process.env.CI } }); } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( ({ method, path: path2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, Path: path2, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, Remaining: persist ? Infinity : times - timesInvoked }) ); this.logger.table(withPrettyHeaders); return this.transform.read().toString(); } }; } }); // node_modules/undici/lib/mock/mock-agent.js var require_mock_agent = __commonJS({ "node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { "use strict"; var { kClients } = require_symbols(); var Agent = require_agent(); var { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); var MockClient = require_mock_client(); var MockPool = require_mock_pool(); var { matchValue, buildMockOptions } = require_mock_utils(); var { InvalidArgumentError, UndiciError } = require_errors(); var Dispatcher = require_dispatcher(); var Pluralizer = require_pluralizer(); var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); var FakeWeakRef = class { static { __name(this, "FakeWeakRef"); } constructor(value) { this.value = value; } deref() { return this.value; } }; var MockAgent = class extends Dispatcher { static { __name(this, "MockAgent"); } constructor(opts) { super(opts); this[kNetConnect] = true; this[kIsMockActive] = true; if (opts && opts.agent && typeof opts.agent.dispatch !== "function") { throw new InvalidArgumentError("Argument opts.agent must implement Agent"); } const agent = opts && opts.agent ? opts.agent : new Agent(opts); this[kAgent] = agent; this[kClients] = agent[kClients]; this[kOptions] = buildMockOptions(opts); } get(origin) { let dispatcher = this[kMockAgentGet](origin); if (!dispatcher) { dispatcher = this[kFactory](origin); this[kMockAgentSet](origin, dispatcher); } return dispatcher; } dispatch(opts, handler) { this.get(opts.origin); return this[kAgent].dispatch(opts, handler); } async close() { await this[kAgent].close(); this[kClients].clear(); } deactivate() { this[kIsMockActive] = false; } activate() { this[kIsMockActive] = true; } enableNetConnect(matcher) { if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { if (Array.isArray(this[kNetConnect])) { this[kNetConnect].push(matcher); } else { this[kNetConnect] = [matcher]; } } else if (typeof matcher === "undefined") { this[kNetConnect] = true; } else { throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); } } disableNetConnect() { this[kNetConnect] = false; } // This is required to bypass issues caused by using global symbols - see: // https://github.com/nodejs/undici/issues/1447 get isMockActive() { return this[kIsMockActive]; } [kMockAgentSet](origin, dispatcher) { this[kClients].set(origin, new FakeWeakRef(dispatcher)); } [kFactory](origin) { const mockOptions = Object.assign({ agent: this }, this[kOptions]); return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); } [kMockAgentGet](origin) { const ref = this[kClients].get(origin); if (ref) { return ref.deref(); } if (typeof origin !== "string") { const dispatcher = this[kFactory]("http://localhost:9999"); this[kMockAgentSet](origin, dispatcher); return dispatcher; } for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { const nonExplicitDispatcher = nonExplicitRef.deref(); if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { const dispatcher = this[kFactory](origin); this[kMockAgentSet](origin, dispatcher); dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; return dispatcher; } } } [kGetNetConnect]() { return this[kNetConnect]; } pendingInterceptors() { const mockAgentClients = this[kClients]; return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending); } assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { const pending = this.pendingInterceptors(); if (pending.length === 0) { return; } const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); throw new UndiciError(` ${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: ${pendingInterceptorsFormatter.format(pending)} `.trim()); } }; module2.exports = MockAgent; } }); // node_modules/undici/lib/proxy-agent.js var require_proxy_agent = __commonJS({ "node_modules/undici/lib/proxy-agent.js"(exports2, module2) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); var { URL: URL2 } = require("url"); var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var buildConnector = require_connect(); var kAgent = Symbol("proxy agent"); var kClient = Symbol("proxy client"); var kProxyHeaders = Symbol("proxy headers"); var kRequestTls = Symbol("request tls settings"); var kProxyTls = Symbol("proxy tls settings"); var kConnectEndpoint = Symbol("connect endpoint function"); function defaultProtocolPort(protocol) { return protocol === "https:" ? 443 : 80; } __name(defaultProtocolPort, "defaultProtocolPort"); function buildProxyOptions(opts) { if (typeof opts === "string") { opts = { uri: opts }; } if (!opts || !opts.uri) { throw new InvalidArgumentError("Proxy opts.uri is mandatory"); } return { uri: opts.uri, protocol: opts.protocol || "https" }; } __name(buildProxyOptions, "buildProxyOptions"); function defaultFactory(origin, opts) { return new Pool(origin, opts); } __name(defaultFactory, "defaultFactory"); var ProxyAgent = class extends DispatcherBase { static { __name(this, "ProxyAgent"); } constructor(opts) { super(opts); this[kProxy] = buildProxyOptions(opts); this[kAgent] = new Agent(opts); this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; if (typeof opts === "string") { opts = { uri: opts }; } if (!opts || !opts.uri) { throw new InvalidArgumentError("Proxy opts.uri is mandatory"); } const { clientFactory = defaultFactory } = opts; if (typeof clientFactory !== "function") { throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); } this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; const resolvedUrl = new URL2(opts.uri); const { origin, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); } else if (opts.auth) { this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; } else if (opts.token) { this[kProxyHeaders]["proxy-authorization"] = opts.token; } else if (username && password) { this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; } const connect = buildConnector({ ...opts.proxyTls }); this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); this[kClient] = clientFactory(resolvedUrl, { connect }); this[kAgent] = new Agent({ ...opts, connect: async (opts2, callback) => { let requestedHost = opts2.host; if (!opts2.port) { requestedHost += `:${defaultProtocolPort(opts2.protocol)}`; } try { const { socket, statusCode } = await this[kClient].connect({ origin, port, path: requestedHost, signal: opts2.signal, headers: { ...this[kProxyHeaders], host } }); if (statusCode !== 200) { socket.on("error", () => { }).destroy(); callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); } if (opts2.protocol !== "https:") { callback(null, socket); return; } let servername; if (this[kRequestTls]) { servername = this[kRequestTls].servername; } else { servername = opts2.servername; } this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); } catch (err) { callback(err); } } }); } dispatch(opts, handler) { const { host } = new URL2(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( { ...opts, headers: { ...headers, host } }, handler ); } async [kClose]() { await this[kAgent].close(); await this[kClient].close(); } async [kDestroy]() { await this[kAgent].destroy(); await this[kClient].destroy(); } }; function buildHeaders(headers) { if (Array.isArray(headers)) { const headersPair = {}; for (let i = 0; i < headers.length; i += 2) { headersPair[headers[i]] = headers[i + 1]; } return headersPair; } return headers; } __name(buildHeaders, "buildHeaders"); function throwIfProxyAuthIsSent(headers) { const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); if (existProxyAuth) { throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } __name(throwIfProxyAuthIsSent, "throwIfProxyAuthIsSent"); module2.exports = ProxyAgent; } }); // node_modules/undici/lib/handler/RetryHandler.js var require_RetryHandler = __commonJS({ "node_modules/undici/lib/handler/RetryHandler.js"(exports2, module2) { var assert = require("assert"); var { kRetryHandlerDefaultRetry } = require_symbols(); var { RequestRetryError } = require_errors(); var { isDisturbed, parseHeaders, parseRangeHeader } = require_util(); function calculateRetryAfterHeader(retryAfter) { const current = Date.now(); const diff = new Date(retryAfter).getTime() - current; return diff; } __name(calculateRetryAfterHeader, "calculateRetryAfterHeader"); var RetryHandler = class _RetryHandler { static { __name(this, "RetryHandler"); } constructor(opts, handlers) { const { retryOptions, ...dispatchOpts } = opts; const { // Retry scoped retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, // Response scoped methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; this.dispatch = handlers.dispatch; this.handler = handlers.handler; this.opts = dispatchOpts; this.abort = null; this.aborted = false; this.retryOpts = { retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], retryAfter: retryAfter ?? true, maxTimeout: maxTimeout ?? 30 * 1e3, // 30s, timeout: minTimeout ?? 500, // .5s timeoutFactor: timeoutFactor ?? 2, maxRetries: maxRetries ?? 5, // What errors we should retry methods: methods ?? ["GET", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"], // Indicates which errors to retry statusCodes: statusCodes ?? [500, 502, 503, 504, 429], // List of errors to retry errorCodes: errorCodes ?? [ "ECONNRESET", "ECONNREFUSED", "ENOTFOUND", "ENETDOWN", "ENETUNREACH", "EHOSTDOWN", "EHOSTUNREACH", "EPIPE" ] }; this.retryCount = 0; this.start = 0; this.end = null; this.etag = null; this.resume = null; this.handler.onConnect((reason) => { this.aborted = true; if (this.abort) { this.abort(reason); } else { this.reason = reason; } }); } onRequestSent() { if (this.handler.onRequestSent) { this.handler.onRequestSent(); } } onUpgrade(statusCode, headers, socket) { if (this.handler.onUpgrade) { this.handler.onUpgrade(statusCode, headers, socket); } } onConnect(abort) { if (this.aborted) { abort(this.reason); } else { this.abort = abort; } } onBodySent(chunk) { if (this.handler.onBodySent) return this.handler.onBodySent(chunk); } static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { const { statusCode, code, headers } = err; const { method, retryOptions } = opts; const { maxRetries, timeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; let { counter, currentTimeout } = state; currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { cb(err); return; } if (Array.isArray(methods) && !methods.includes(method)) { cb(err); return; } if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { cb(err); return; } if (counter > maxRetries) { cb(err); return; } let retryAfterHeader = headers != null && headers["retry-after"]; if (retryAfterHeader) { retryAfterHeader = Number(retryAfterHeader); retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; } const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); state.currentTimeout = retryTimeout; setTimeout(() => cb(null), retryTimeout); } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const headers = parseHeaders(rawHeaders); this.retryCount += 1; if (statusCode >= 300) { this.abort( new RequestRetryError("Request failed", statusCode, { headers, count: this.retryCount }) ); return false; } if (this.resume != null) { this.resume = null; if (statusCode !== 206) { return true; } const contentRange = parseRangeHeader(headers["content-range"]); if (!contentRange) { this.abort( new RequestRetryError("Content-Range mismatch", statusCode, { headers, count: this.retryCount }) ); return false; } if (this.etag != null && this.etag !== headers.etag) { this.abort( new RequestRetryError("ETag mismatch", statusCode, { headers, count: this.retryCount }) ); return false; } const { start, size, end = size } = contentRange; assert(this.start === start, "content-range mismatch"); assert(this.end == null || this.end === end, "content-range mismatch"); this.resume = resume; return true; } if (this.end == null) { if (statusCode === 206) { const range = parseRangeHeader(headers["content-range"]); if (range == null) { return this.handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ); } const { start, size, end = size } = range; assert( start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch" ); assert(Number.isFinite(start)); assert( end != null && Number.isFinite(end) && this.end !== end, "invalid content-length" ); this.start = start; this.end = end; } if (this.end == null) { const contentLength = headers["content-length"]; this.end = contentLength != null ? Number(contentLength) : null; } assert(Number.isFinite(this.start)); assert( this.end == null || Number.isFinite(this.end), "invalid content-length" ); this.resume = resume; this.etag = headers.etag != null ? headers.etag : null; return this.handler.onHeaders( statusCode, rawHeaders, resume, statusMessage ); } const err = new RequestRetryError("Request failed", statusCode, { headers, count: this.retryCount }); this.abort(err); return false; } onData(chunk) { this.start += chunk.length; return this.handler.onData(chunk); } onComplete(rawTrailers) { this.retryCount = 0; return this.handler.onComplete(rawTrailers); } onError(err) { if (this.aborted || isDisturbed(this.opts.body)) { return this.handler.onError(err); } this.retryOpts.retry( err, { state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, opts: { retryOptions: this.retryOpts, ...this.opts } }, onRetry.bind(this) ); function onRetry(err2) { if (err2 != null || this.aborted || isDisturbed(this.opts.body)) { return this.handler.onError(err2); } if (this.start !== 0) { this.opts = { ...this.opts, headers: { ...this.opts.headers, range: `bytes=${this.start}-${this.end ?? ""}` } }; } try { this.dispatch(this.opts, this); } catch (err3) { this.handler.onError(err3); } } __name(onRetry, "onRetry"); } }; module2.exports = RetryHandler; } }); // node_modules/undici/lib/global.js var require_global2 = __commonJS({ "node_modules/undici/lib/global.js"(exports2, module2) { "use strict"; var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); var { InvalidArgumentError } = require_errors(); var Agent = require_agent(); if (getGlobalDispatcher() === void 0) { setGlobalDispatcher(new Agent()); } function setGlobalDispatcher(agent) { if (!agent || typeof agent.dispatch !== "function") { throw new InvalidArgumentError("Argument agent must implement Agent"); } Object.defineProperty(globalThis, globalDispatcher, { value: agent, writable: true, enumerable: false, configurable: false }); } __name(setGlobalDispatcher, "setGlobalDispatcher"); function getGlobalDispatcher() { return globalThis[globalDispatcher]; } __name(getGlobalDispatcher, "getGlobalDispatcher"); module2.exports = { setGlobalDispatcher, getGlobalDispatcher }; } }); // node_modules/undici/lib/handler/DecoratorHandler.js var require_DecoratorHandler = __commonJS({ "node_modules/undici/lib/handler/DecoratorHandler.js"(exports2, module2) { "use strict"; module2.exports = class DecoratorHandler { static { __name(this, "DecoratorHandler"); } constructor(handler) { this.handler = handler; } onConnect(...args) { return this.handler.onConnect(...args); } onError(...args) { return this.handler.onError(...args); } onUpgrade(...args) { return this.handler.onUpgrade(...args); } onHeaders(...args) { return this.handler.onHeaders(...args); } onData(...args) { return this.handler.onData(...args); } onComplete(...args) { return this.handler.onComplete(...args); } onBodySent(...args) { return this.handler.onBodySent(...args); } }; } }); // node_modules/undici/lib/fetch/headers.js var require_headers = __commonJS({ "node_modules/undici/lib/fetch/headers.js"(exports2, module2) { "use strict"; var { kHeadersList, kConstruct } = require_symbols(); var { kGuard } = require_symbols2(); var { kEnumerableProperty } = require_util(); var { makeIterator, isValidHeaderName, isValidHeaderValue } = require_util2(); var util = require("util"); var { webidl } = require_webidl(); var assert = require("assert"); var kHeadersMap = Symbol("headers map"); var kHeadersSortedMap = Symbol("headers map sorted"); function isHTTPWhiteSpaceCharCode(code) { return code === 10 || code === 13 || code === 9 || code === 32; } __name(isHTTPWhiteSpaceCharCode, "isHTTPWhiteSpaceCharCode"); function headerValueNormalize(potentialValue) { let i = 0; let j = potentialValue.length; while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } __name(headerValueNormalize, "headerValueNormalize"); function fill(headers, object) { if (Array.isArray(object)) { for (let i = 0; i < object.length; ++i) { const header = object[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", message: `expected name/value pair to be length 2, found ${header.length}.` }); } appendHeader(headers, header[0], header[1]); } } else if (typeof object === "object" && object !== null) { const keys = Object.keys(object); for (let i = 0; i < keys.length; ++i) { appendHeader(headers, keys[i], object[keys[i]]); } } else { throw webidl.errors.conversionFailed({ prefix: "Headers constructor", argument: "Argument 1", types: ["sequence>", "record"] }); } } __name(fill, "fill"); function appendHeader(headers, name, value) { value = headerValueNormalize(value); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.append", value: name, type: "header name" }); } else if (!isValidHeaderValue(value)) { throw webidl.errors.invalidArgument({ prefix: "Headers.append", value, type: "header value" }); } if (headers[kGuard] === "immutable") { throw new TypeError("immutable"); } else if (headers[kGuard] === "request-no-cors") { } return headers[kHeadersList].append(name, value); } __name(appendHeader, "appendHeader"); var HeadersList = class _HeadersList { static { __name(this, "HeadersList"); } /** @type {[string, string][]|null} */ cookies = null; constructor(init) { if (init instanceof _HeadersList) { this[kHeadersMap] = new Map(init[kHeadersMap]); this[kHeadersSortedMap] = init[kHeadersSortedMap]; this.cookies = init.cookies === null ? null : [...init.cookies]; } else { this[kHeadersMap] = new Map(init); this[kHeadersSortedMap] = null; } } // https://fetch.spec.whatwg.org/#header-list-contains contains(name) { name = name.toLowerCase(); return this[kHeadersMap].has(name); } clear() { this[kHeadersMap].clear(); this[kHeadersSortedMap] = null; this.cookies = null; } // https://fetch.spec.whatwg.org/#concept-header-list-append append(name, value) { this[kHeadersSortedMap] = null; const lowercaseName = name.toLowerCase(); const exists = this[kHeadersMap].get(lowercaseName); if (exists) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { name: exists.name, value: `${exists.value}${delimiter}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); } if (lowercaseName === "set-cookie") { this.cookies ??= []; this.cookies.push(value); } } // https://fetch.spec.whatwg.org/#concept-header-list-set set(name, value) { this[kHeadersSortedMap] = null; const lowercaseName = name.toLowerCase(); if (lowercaseName === "set-cookie") { this.cookies = [value]; } this[kHeadersMap].set(lowercaseName, { name, value }); } // https://fetch.spec.whatwg.org/#concept-header-list-delete delete(name) { this[kHeadersSortedMap] = null; name = name.toLowerCase(); if (name === "set-cookie") { this.cookies = null; } this[kHeadersMap].delete(name); } // https://fetch.spec.whatwg.org/#concept-header-list-get get(name) { const value = this[kHeadersMap].get(name.toLowerCase()); return value === void 0 ? null : value.value; } *[Symbol.iterator]() { for (const [name, { value }] of this[kHeadersMap]) { yield [name, value]; } } get entries() { const headers = {}; if (this[kHeadersMap].size) { for (const { name, value } of this[kHeadersMap].values()) { headers[name] = value; } } return headers; } }; var Headers = class _Headers { static { __name(this, "Headers"); } constructor(init = void 0) { if (init === kConstruct) { return; } this[kHeadersList] = new HeadersList(); this[kGuard] = "none"; if (init !== void 0) { init = webidl.converters.HeadersInit(init); fill(this, init); } } // https://fetch.spec.whatwg.org/#dom-headers-append append(name, value) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); name = webidl.converters.ByteString(name); value = webidl.converters.ByteString(value); return appendHeader(this, name, value); } // https://fetch.spec.whatwg.org/#dom-headers-delete delete(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, { header: "Headers.delete" }); name = webidl.converters.ByteString(name); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.delete", value: name, type: "header name" }); } if (this[kGuard] === "immutable") { throw new TypeError("immutable"); } else if (this[kGuard] === "request-no-cors") { } if (!this[kHeadersList].contains(name)) { return; } this[kHeadersList].delete(name); } // https://fetch.spec.whatwg.org/#dom-headers-get get(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, { header: "Headers.get" }); name = webidl.converters.ByteString(name); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.get", value: name, type: "header name" }); } return this[kHeadersList].get(name); } // https://fetch.spec.whatwg.org/#dom-headers-has has(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, { header: "Headers.has" }); name = webidl.converters.ByteString(name); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.has", value: name, type: "header name" }); } return this[kHeadersList].contains(name); } // https://fetch.spec.whatwg.org/#dom-headers-set set(name, value) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 2, { header: "Headers.set" }); name = webidl.converters.ByteString(name); value = webidl.converters.ByteString(value); value = headerValueNormalize(value); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.set", value: name, type: "header name" }); } else if (!isValidHeaderValue(value)) { throw webidl.errors.invalidArgument({ prefix: "Headers.set", value, type: "header value" }); } if (this[kGuard] === "immutable") { throw new TypeError("immutable"); } else if (this[kGuard] === "request-no-cors") { } this[kHeadersList].set(name, value); } // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie getSetCookie() { webidl.brandCheck(this, _Headers); const list = this[kHeadersList].cookies; if (list) { return [...list]; } return []; } // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine get [kHeadersSortedMap]() { if (this[kHeadersList][kHeadersSortedMap]) { return this[kHeadersList][kHeadersSortedMap]; } const headers = []; const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1); const cookies = this[kHeadersList].cookies; for (let i = 0; i < names.length; ++i) { const [name, value] = names[i]; if (name === "set-cookie") { for (let j = 0; j < cookies.length; ++j) { headers.push([name, cookies[j]]); } } else { assert(value !== null); headers.push([name, value]); } } this[kHeadersList][kHeadersSortedMap] = headers; return headers; } keys() { webidl.brandCheck(this, _Headers); if (this[kGuard] === "immutable") { const value = this[kHeadersSortedMap]; return makeIterator( () => value, "Headers", "key" ); } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", "key" ); } values() { webidl.brandCheck(this, _Headers); if (this[kGuard] === "immutable") { const value = this[kHeadersSortedMap]; return makeIterator( () => value, "Headers", "value" ); } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", "value" ); } entries() { webidl.brandCheck(this, _Headers); if (this[kGuard] === "immutable") { const value = this[kHeadersSortedMap]; return makeIterator( () => value, "Headers", "key+value" ); } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", "key+value" ); } /** * @param {(value: string, key: string, self: Headers) => void} callbackFn * @param {unknown} thisArg */ forEach(callbackFn, thisArg = globalThis) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, { header: "Headers.forEach" }); if (typeof callbackFn !== "function") { throw new TypeError( "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." ); } for (const [key, value] of this) { callbackFn.apply(thisArg, [value, key, this]); } } [Symbol.for("nodejs.util.inspect.custom")]() { webidl.brandCheck(this, _Headers); return this[kHeadersList]; } }; Headers.prototype[Symbol.iterator] = Headers.prototype.entries; Object.defineProperties(Headers.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, has: kEnumerableProperty, set: kEnumerableProperty, getSetCookie: kEnumerableProperty, keys: kEnumerableProperty, values: kEnumerableProperty, entries: kEnumerableProperty, forEach: kEnumerableProperty, [Symbol.iterator]: { enumerable: false }, [Symbol.toStringTag]: { value: "Headers", configurable: true }, [util.inspect.custom]: { enumerable: false } }); webidl.converters.HeadersInit = function(V) { if (webidl.util.Type(V) === "Object") { if (V[Symbol.iterator]) { return webidl.converters["sequence>"](V); } return webidl.converters["record"](V); } throw webidl.errors.conversionFailed({ prefix: "Headers constructor", argument: "Argument 1", types: ["sequence>", "record"] }); }; module2.exports = { fill, Headers, HeadersList }; } }); // node_modules/undici/lib/fetch/response.js var require_response = __commonJS({ "node_modules/undici/lib/fetch/response.js"(exports2, module2) { "use strict"; var { Headers, HeadersList, fill } = require_headers(); var { extractBody, cloneBody, mixinBody } = require_body(); var util = require_util(); var { kEnumerableProperty } = util; var { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode } = require_util2(); var { redirectStatusSet, nullBodyStatus, DOMException: DOMException2 } = require_constants3(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var { webidl } = require_webidl(); var { FormData: FormData2 } = require_formdata(); var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); var { kHeadersList, kConstruct } = require_symbols(); var assert = require("assert"); var { types } = require("util"); var ReadableStream2 = globalThis.ReadableStream || require("stream/web").ReadableStream; var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { static { __name(this, "Response"); } // Creates network error Response. static error() { const relevantRealm = { settingsObject: {} }; const responseObject = new _Response(); responseObject[kState] = makeNetworkError(); responseObject[kRealm] = relevantRealm; responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList; responseObject[kHeaders][kGuard] = "immutable"; responseObject[kHeaders][kRealm] = relevantRealm; return responseObject; } // https://fetch.spec.whatwg.org/#dom-response-json static json(data, init = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "Response.json" }); if (init !== null) { init = webidl.converters.ResponseInit(init); } const bytes = textEncoder.encode( serializeJavascriptValueToJSONString(data) ); const body = extractBody(bytes); const relevantRealm = { settingsObject: {} }; const responseObject = new _Response(); responseObject[kRealm] = relevantRealm; responseObject[kHeaders][kGuard] = "response"; responseObject[kHeaders][kRealm] = relevantRealm; initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); return responseObject; } // Creates a redirect Response that redirects to url with status status. static redirect(url, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); url = webidl.converters.USVString(url); status = webidl.converters["unsigned short"](status); let parsedURL; try { parsedURL = new URL(url, getGlobalOrigin()); } catch (err) { throw Object.assign(new TypeError("Failed to parse URL from " + url), { cause: err }); } if (!redirectStatusSet.has(status)) { throw new RangeError("Invalid status code " + status); } const responseObject = new _Response(); responseObject[kRealm] = relevantRealm; responseObject[kHeaders][kGuard] = "immutable"; responseObject[kHeaders][kRealm] = relevantRealm; responseObject[kState].status = status; const value = isomorphicEncode(URLSerializer(parsedURL)); responseObject[kState].headersList.append("location", value); return responseObject; } // https://fetch.spec.whatwg.org/#dom-response constructor(body = null, init = {}) { if (body !== null) { body = webidl.converters.BodyInit(body); } init = webidl.converters.ResponseInit(init); this[kRealm] = { settingsObject: {} }; this[kState] = makeResponse({}); this[kHeaders] = new Headers(kConstruct); this[kHeaders][kGuard] = "response"; this[kHeaders][kHeadersList] = this[kState].headersList; this[kHeaders][kRealm] = this[kRealm]; let bodyWithType = null; if (body != null) { const [extractedBody, type] = extractBody(body); bodyWithType = { body: extractedBody, type }; } initializeResponse(this, init, bodyWithType); } // Returns response’s type, e.g., "cors". get type() { webidl.brandCheck(this, _Response); return this[kState].type; } // Returns response’s URL, if it has one; otherwise the empty string. get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; const url = urlList[urlList.length - 1] ?? null; if (url === null) { return ""; } return URLSerializer(url, true); } // Returns whether response was obtained through a redirect. get redirected() { webidl.brandCheck(this, _Response); return this[kState].urlList.length > 1; } // Returns response’s status. get status() { webidl.brandCheck(this, _Response); return this[kState].status; } // Returns whether response’s status is an ok status. get ok() { webidl.brandCheck(this, _Response); return this[kState].status >= 200 && this[kState].status <= 299; } // Returns response’s status message. get statusText() { webidl.brandCheck(this, _Response); return this[kState].statusText; } // Returns response’s headers as Headers. get headers() { webidl.brandCheck(this, _Response); return this[kHeaders]; } get body() { webidl.brandCheck(this, _Response); return this[kState].body ? this[kState].body.stream : null; } get bodyUsed() { webidl.brandCheck(this, _Response); return !!this[kState].body && util.isDisturbed(this[kState].body.stream); } // Returns a clone of response. clone() { webidl.brandCheck(this, _Response); if (this.bodyUsed || this.body && this.body.locked) { throw webidl.errors.exception({ header: "Response.clone", message: "Body has already been consumed." }); } const clonedResponse = cloneResponse(this[kState]); const clonedResponseObject = new _Response(); clonedResponseObject[kState] = clonedResponse; clonedResponseObject[kRealm] = this[kRealm]; clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList; clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]; clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]; return clonedResponseObject; } }; mixinBody(Response); Object.defineProperties(Response.prototype, { type: kEnumerableProperty, url: kEnumerableProperty, status: kEnumerableProperty, ok: kEnumerableProperty, redirected: kEnumerableProperty, statusText: kEnumerableProperty, headers: kEnumerableProperty, clone: kEnumerableProperty, body: kEnumerableProperty, bodyUsed: kEnumerableProperty, [Symbol.toStringTag]: { value: "Response", configurable: true } }); Object.defineProperties(Response, { json: kEnumerableProperty, redirect: kEnumerableProperty, error: kEnumerableProperty }); function cloneResponse(response) { if (response.internalResponse) { return filterResponse( cloneResponse(response.internalResponse), response.type ); } const newResponse = makeResponse({ ...response, body: null }); if (response.body != null) { newResponse.body = cloneBody(response.body); } return newResponse; } __name(cloneResponse, "cloneResponse"); function makeResponse(init) { return { aborted: false, rangeRequested: false, timingAllowPassed: false, requestIncludesCredentials: false, type: "default", status: 200, timingInfo: null, cacheState: "", statusText: "", ...init, headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList(), urlList: init.urlList ? [...init.urlList] : [] }; } __name(makeResponse, "makeResponse"); function makeNetworkError(reason) { const isError = isErrorLike(reason); return makeResponse({ type: "error", status: 0, error: isError ? reason : new Error(reason ? String(reason) : reason), aborted: reason && reason.name === "AbortError" }); } __name(makeNetworkError, "makeNetworkError"); function makeFilteredResponse(response, state) { state = { internalResponse: response, ...state }; return new Proxy(response, { get(target, p) { return p in state ? state[p] : target[p]; }, set(target, p, value) { assert(!(p in state)); target[p] = value; return true; } }); } __name(makeFilteredResponse, "makeFilteredResponse"); function filterResponse(response, type) { if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), status: 0, statusText: "", body: null }); } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, statusText: "", headersList: [], body: null }); } else { assert(false); } } __name(filterResponse, "filterResponse"); function makeAppropriateNetworkError(fetchParams, err = null) { assert(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); } __name(makeAppropriateNetworkError, "makeAppropriateNetworkError"); function initializeResponse(response, init, body) { if (init.status !== null && (init.status < 200 || init.status > 599)) { throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); } if ("statusText" in init && init.statusText != null) { if (!isValidReasonPhrase(String(init.statusText))) { throw new TypeError("Invalid statusText"); } } if ("status" in init && init.status != null) { response[kState].status = init.status; } if ("statusText" in init && init.statusText != null) { response[kState].statusText = init.statusText; } if ("headers" in init && init.headers != null) { fill(response[kHeaders], init.headers); } if (body) { if (nullBodyStatus.includes(response.status)) { throw webidl.errors.exception({ header: "Response constructor", message: "Invalid response status code " + response.status }); } response[kState].body = body.body; if (body.type != null && !response[kState].headersList.contains("Content-Type")) { response[kState].headersList.append("content-type", body.type); } } } __name(initializeResponse, "initializeResponse"); webidl.converters.ReadableStream = webidl.interfaceConverter( ReadableStream2 ); webidl.converters.FormData = webidl.interfaceConverter( FormData2 ); webidl.converters.URLSearchParams = webidl.interfaceConverter( URLSearchParams ); webidl.converters.XMLHttpRequestBodyInit = function(V) { if (typeof V === "string") { return webidl.converters.USVString(V); } if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { return webidl.converters.BufferSource(V); } if (util.isFormDataLike(V)) { return webidl.converters.FormData(V, { strict: false }); } if (V instanceof URLSearchParams) { return webidl.converters.URLSearchParams(V); } return webidl.converters.DOMString(V); }; webidl.converters.BodyInit = function(V) { if (V instanceof ReadableStream2) { return webidl.converters.ReadableStream(V); } if (V?.[Symbol.asyncIterator]) { return V; } return webidl.converters.XMLHttpRequestBodyInit(V); }; webidl.converters.ResponseInit = webidl.dictionaryConverter([ { key: "status", converter: webidl.converters["unsigned short"], defaultValue: 200 }, { key: "statusText", converter: webidl.converters.ByteString, defaultValue: "" }, { key: "headers", converter: webidl.converters.HeadersInit } ]); module2.exports = { makeNetworkError, makeResponse, makeAppropriateNetworkError, filterResponse, Response, cloneResponse }; } }); // node_modules/undici/lib/fetch/request.js var require_request2 = __commonJS({ "node_modules/undici/lib/fetch/request.js"(exports2, module2) { "use strict"; var { extractBody, mixinBody, cloneBody } = require_body(); var { Headers, fill: fillHeaders, HeadersList } = require_headers(); var { FinalizationRegistry } = require_dispatcher_weakref()(); var util = require_util(); var { isValidHTTPToken, sameOrigin, normalizeMethod, makePolicyContainer, normalizeMethodRecord } = require_util2(); var { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants3(); var { kEnumerableProperty } = util; var { kHeaders, kSignal, kState, kGuard, kRealm } = require_symbols2(); var { webidl } = require_webidl(); var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); var { kHeadersList, kConstruct } = require_symbols(); var assert = require("assert"); var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require("events"); var TransformStream = globalThis.TransformStream; var kAbortController = Symbol("abortController"); var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { signal.removeEventListener("abort", abort); }); var Request = class _Request { static { __name(this, "Request"); } // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { if (input === kConstruct) { return; } webidl.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); input = webidl.converters.RequestInfo(input); init = webidl.converters.RequestInit(init); this[kRealm] = { settingsObject: { baseUrl: getGlobalOrigin(), get origin() { return this.baseUrl?.origin; }, policyContainer: makePolicyContainer() } }; let request = null; let fallbackMode = null; const baseUrl = this[kRealm].settingsObject.baseUrl; let signal = null; if (typeof input === "string") { let parsedURL; try { parsedURL = new URL(input, baseUrl); } catch (err) { throw new TypeError("Failed to parse URL from " + input, { cause: err }); } if (parsedURL.username || parsedURL.password) { throw new TypeError( "Request cannot be constructed from a URL that includes credentials: " + input ); } request = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { assert(input instanceof _Request); request = input[kState]; signal = input[kSignal]; } const origin = this[kRealm].settingsObject.origin; let window2 = "client"; if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) { window2 = request.window; } if (init.window != null) { throw new TypeError(`'window' option '${window2}' must be null`); } if ("window" in init) { window2 = "no-window"; } request = makeRequest({ // URL request’s URL. // undici implementation note: this is set as the first item in request's urlList in makeRequest // method request’s method. method: request.method, // header list A copy of request’s header list. // undici implementation note: headersList is cloned in makeRequest headersList: request.headersList, // unsafe-request flag Set. unsafeRequest: request.unsafeRequest, // client This’s relevant settings object. client: this[kRealm].settingsObject, // window window. window: window2, // priority request’s priority. priority: request.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests // being handled by a service worker. In this scenario a request can have an origin that is different // from the current client. origin: request.origin, // referrer request’s referrer. referrer: request.referrer, // referrer policy request’s referrer policy. referrerPolicy: request.referrerPolicy, // mode request’s mode. mode: request.mode, // credentials mode request’s credentials mode. credentials: request.credentials, // cache mode request’s cache mode. cache: request.cache, // redirect mode request’s redirect mode. redirect: request.redirect, // integrity metadata request’s integrity metadata. integrity: request.integrity, // keepalive request’s keepalive. keepalive: request.keepalive, // reload-navigation flag request’s reload-navigation flag. reloadNavigation: request.reloadNavigation, // history-navigation flag request’s history-navigation flag. historyNavigation: request.historyNavigation, // URL list A clone of request’s URL list. urlList: [...request.urlList] }); const initHasKey = Object.keys(init).length !== 0; if (initHasKey) { if (request.mode === "navigate") { request.mode = "same-origin"; } request.reloadNavigation = false; request.historyNavigation = false; request.origin = "client"; request.referrer = "client"; request.referrerPolicy = ""; request.url = request.urlList[request.urlList.length - 1]; request.urlList = [request.url]; } if (init.referrer !== void 0) { const referrer = init.referrer; if (referrer === "") { request.referrer = "no-referrer"; } else { let parsedReferrer; try { parsedReferrer = new URL(referrer, baseUrl); } catch (err) { throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); } if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) { request.referrer = "client"; } else { request.referrer = parsedReferrer; } } } if (init.referrerPolicy !== void 0) { request.referrerPolicy = init.referrerPolicy; } let mode; if (init.mode !== void 0) { mode = init.mode; } else { mode = fallbackMode; } if (mode === "navigate") { throw webidl.errors.exception({ header: "Request constructor", message: "invalid request mode navigate." }); } if (mode != null) { request.mode = mode; } if (init.credentials !== void 0) { request.credentials = init.credentials; } if (init.cache !== void 0) { request.cache = init.cache; } if (request.cache === "only-if-cached" && request.mode !== "same-origin") { throw new TypeError( "'only-if-cached' can be set only with 'same-origin' mode" ); } if (init.redirect !== void 0) { request.redirect = init.redirect; } if (init.integrity != null) { request.integrity = String(init.integrity); } if (init.keepalive !== void 0) { request.keepalive = Boolean(init.keepalive); } if (init.method !== void 0) { let method = init.method; if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`); } if (forbiddenMethodsSet.has(method.toUpperCase())) { throw new TypeError(`'${method}' HTTP method is unsupported.`); } method = normalizeMethodRecord[method] ?? normalizeMethod(method); request.method = method; } if (init.signal !== void 0) { signal = init.signal; } this[kState] = request; const ac = new AbortController(); this[kSignal] = ac.signal; this[kSignal][kRealm] = this[kRealm]; if (signal != null) { if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") { throw new TypeError( "Failed to construct 'Request': member signal is not of type AbortSignal." ); } if (signal.aborted) { ac.abort(signal.reason); } else { this[kAbortController] = ac; const acRef = new WeakRef(ac); const abort = /* @__PURE__ */ __name(function() { const ac2 = acRef.deref(); if (ac2 !== void 0) { ac2.abort(this.reason); } }, "abort"); try { if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) { setMaxListeners(100, signal); } else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) { setMaxListeners(100, signal); } } catch { } util.addAbortListener(signal, abort); requestFinalizer.register(ac, { signal, abort }); } } this[kHeaders] = new Headers(kConstruct); this[kHeaders][kHeadersList] = request.headersList; this[kHeaders][kGuard] = "request"; this[kHeaders][kRealm] = this[kRealm]; if (mode === "no-cors") { if (!corsSafeListedMethodsSet.has(request.method)) { throw new TypeError( `'${request.method} is unsupported in no-cors mode.` ); } this[kHeaders][kGuard] = "request-no-cors"; } if (initHasKey) { const headersList = this[kHeaders][kHeadersList]; const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { for (const [key, val] of headers) { headersList.append(key, val); } headersList.cookies = headers.cookies; } else { fillHeaders(this[kHeaders], headers); } } const inputBody = input instanceof _Request ? input[kState].body : null; if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) { throw new TypeError("Request with GET/HEAD method cannot have body."); } let initBody = null; if (init.body != null) { const [extractedBody, contentType] = extractBody( init.body, request.keepalive ); initBody = extractedBody; if (contentType && !this[kHeaders][kHeadersList].contains("content-type")) { this[kHeaders].append("content-type", contentType); } } const inputOrInitBody = initBody ?? inputBody; if (inputOrInitBody != null && inputOrInitBody.source == null) { if (initBody != null && init.duplex == null) { throw new TypeError("RequestInit: duplex option is required when sending a body."); } if (request.mode !== "same-origin" && request.mode !== "cors") { throw new TypeError( 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' ); } request.useCORSPreflightFlag = true; } let finalBody = inputOrInitBody; if (initBody == null && inputBody != null) { if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { throw new TypeError( "Cannot construct a Request with a Request object that has already been used." ); } if (!TransformStream) { TransformStream = require("stream/web").TransformStream; } const identityTransform = new TransformStream(); inputBody.stream.pipeThrough(identityTransform); finalBody = { source: inputBody.source, length: inputBody.length, stream: identityTransform.readable }; } this[kState].body = finalBody; } // Returns request’s HTTP method, which is "GET" by default. get method() { webidl.brandCheck(this, _Request); return this[kState].method; } // Returns the URL of request as a string. get url() { webidl.brandCheck(this, _Request); return URLSerializer(this[kState].url); } // Returns a Headers object consisting of the headers associated with request. // Note that headers added in the network layer by the user agent will not // be accounted for in this object, e.g., the "Host" header. get headers() { webidl.brandCheck(this, _Request); return this[kHeaders]; } // Returns the kind of resource requested by request, e.g., "document" // or "script". get destination() { webidl.brandCheck(this, _Request); return this[kState].destination; } // Returns the referrer of request. Its value can be a same-origin URL if // explicitly set in init, the empty string to indicate no referrer, and // "about:client" when defaulting to the global’s default. This is used // during fetching to determine the value of the `Referer` header of the // request being made. get referrer() { webidl.brandCheck(this, _Request); if (this[kState].referrer === "no-referrer") { return ""; } if (this[kState].referrer === "client") { return "about:client"; } return this[kState].referrer.toString(); } // Returns the referrer policy associated with request. // This is used during fetching to compute the value of the request’s // referrer. get referrerPolicy() { webidl.brandCheck(this, _Request); return this[kState].referrerPolicy; } // Returns the mode associated with request, which is a string indicating // whether the request will use CORS, or will be restricted to same-origin // URLs. get mode() { webidl.brandCheck(this, _Request); return this[kState].mode; } // Returns the credentials mode associated with request, // which is a string indicating whether credentials will be sent with the // request always, never, or only when sent to a same-origin URL. get credentials() { return this[kState].credentials; } // Returns the cache mode associated with request, // which is a string indicating how the request will // interact with the browser’s cache when fetching. get cache() { webidl.brandCheck(this, _Request); return this[kState].cache; } // Returns the redirect mode associated with request, // which is a string indicating how redirects for the // request will be handled during fetching. A request // will follow redirects by default. get redirect() { webidl.brandCheck(this, _Request); return this[kState].redirect; } // Returns request’s subresource integrity metadata, which is a // cryptographic hash of the resource being fetched. Its value // consists of multiple hashes separated by whitespace. [SRI] get integrity() { webidl.brandCheck(this, _Request); return this[kState].integrity; } // Returns a boolean indicating whether or not request can outlive the // global in which it was created. get keepalive() { webidl.brandCheck(this, _Request); return this[kState].keepalive; } // Returns a boolean indicating whether or not request is for a reload // navigation. get isReloadNavigation() { webidl.brandCheck(this, _Request); return this[kState].reloadNavigation; } // Returns a boolean indicating whether or not request is for a history // navigation (a.k.a. back-foward navigation). get isHistoryNavigation() { webidl.brandCheck(this, _Request); return this[kState].historyNavigation; } // Returns the signal associated with request, which is an AbortSignal // object indicating whether or not request has been aborted, and its // abort event handler. get signal() { webidl.brandCheck(this, _Request); return this[kSignal]; } get body() { webidl.brandCheck(this, _Request); return this[kState].body ? this[kState].body.stream : null; } get bodyUsed() { webidl.brandCheck(this, _Request); return !!this[kState].body && util.isDisturbed(this[kState].body.stream); } get duplex() { webidl.brandCheck(this, _Request); return "half"; } // Returns a clone of request. clone() { webidl.brandCheck(this, _Request); if (this.bodyUsed || this.body?.locked) { throw new TypeError("unusable"); } const clonedRequest = cloneRequest(this[kState]); const clonedRequestObject = new _Request(kConstruct); clonedRequestObject[kState] = clonedRequest; clonedRequestObject[kRealm] = this[kRealm]; clonedRequestObject[kHeaders] = new Headers(kConstruct); clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList; clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]; clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]; const ac = new AbortController(); if (this.signal.aborted) { ac.abort(this.signal.reason); } else { util.addAbortListener( this.signal, () => { ac.abort(this.signal.reason); } ); } clonedRequestObject[kSignal] = ac.signal; return clonedRequestObject; } }; mixinBody(Request); function makeRequest(init) { const request = { method: "GET", localURLsOnly: false, unsafeRequest: false, body: null, client: null, reservedClient: null, replacesClientId: "", window: "client", keepalive: false, serviceWorkers: "all", initiator: "", destination: "", priority: null, origin: "client", policyContainer: "client", referrer: "client", referrerPolicy: "", mode: "no-cors", useCORSPreflightFlag: false, credentials: "same-origin", useCredentials: false, cache: "default", redirect: "follow", integrity: "", cryptoGraphicsNonceMetadata: "", parserMetadata: "", reloadNavigation: false, historyNavigation: false, userActivation: false, taintedOrigin: false, redirectCount: 0, responseTainting: "basic", preventNoCacheCacheControlHeaderModification: false, done: false, timingAllowFailed: false, ...init, headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() }; request.url = request.urlList[0]; return request; } __name(makeRequest, "makeRequest"); function cloneRequest(request) { const newRequest = makeRequest({ ...request, body: null }); if (request.body != null) { newRequest.body = cloneBody(request.body); } return newRequest; } __name(cloneRequest, "cloneRequest"); Object.defineProperties(Request.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, headers: kEnumerableProperty, redirect: kEnumerableProperty, clone: kEnumerableProperty, signal: kEnumerableProperty, duplex: kEnumerableProperty, destination: kEnumerableProperty, body: kEnumerableProperty, bodyUsed: kEnumerableProperty, isHistoryNavigation: kEnumerableProperty, isReloadNavigation: kEnumerableProperty, keepalive: kEnumerableProperty, integrity: kEnumerableProperty, cache: kEnumerableProperty, credentials: kEnumerableProperty, attribute: kEnumerableProperty, referrerPolicy: kEnumerableProperty, referrer: kEnumerableProperty, mode: kEnumerableProperty, [Symbol.toStringTag]: { value: "Request", configurable: true } }); webidl.converters.Request = webidl.interfaceConverter( Request ); webidl.converters.RequestInfo = function(V) { if (typeof V === "string") { return webidl.converters.USVString(V); } if (V instanceof Request) { return webidl.converters.Request(V); } return webidl.converters.USVString(V); }; webidl.converters.AbortSignal = webidl.interfaceConverter( AbortSignal ); webidl.converters.RequestInit = webidl.dictionaryConverter([ { key: "method", converter: webidl.converters.ByteString }, { key: "headers", converter: webidl.converters.HeadersInit }, { key: "body", converter: webidl.nullableConverter( webidl.converters.BodyInit ) }, { key: "referrer", converter: webidl.converters.USVString }, { key: "referrerPolicy", converter: webidl.converters.DOMString, // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy allowedValues: referrerPolicy }, { key: "mode", converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#concept-request-mode allowedValues: requestMode }, { key: "credentials", converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcredentials allowedValues: requestCredentials }, { key: "cache", converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestcache allowedValues: requestCache }, { key: "redirect", converter: webidl.converters.DOMString, // https://fetch.spec.whatwg.org/#requestredirect allowedValues: requestRedirect }, { key: "integrity", converter: webidl.converters.DOMString }, { key: "keepalive", converter: webidl.converters.boolean }, { key: "signal", converter: webidl.nullableConverter( (signal) => webidl.converters.AbortSignal( signal, { strict: false } ) ) }, { key: "window", converter: webidl.converters.any }, { key: "duplex", converter: webidl.converters.DOMString, allowedValues: requestDuplex } ]); module2.exports = { Request, makeRequest }; } }); // node_modules/undici/lib/fetch/index.js var require_fetch = __commonJS({ "node_modules/undici/lib/fetch/index.js"(exports2, module2) { "use strict"; var { Response, makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse } = require_response(); var { Headers } = require_headers(); var { Request, makeRequest } = require_request2(); var zlib = require("zlib"); var { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme } = require_util2(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var assert = require("assert"); var { safelyExtractBody } = require_body(); var { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet, DOMException: DOMException2 } = require_constants3(); var { kHeadersList } = require_symbols(); var EE = require("events"); var { Readable, pipeline } = require("stream"); var { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util(); var { dataURLProcessor, serializeAMimeType } = require_dataURL(); var { TransformStream } = require("stream/web"); var { getGlobalDispatcher } = require_global2(); var { webidl } = require_webidl(); var { STATUS_CODES } = require("http"); var GET_OR_HEAD = ["GET", "HEAD"]; var resolveObjectURL; var ReadableStream2 = globalThis.ReadableStream; var Fetch = class extends EE { static { __name(this, "Fetch"); } constructor(dispatcher) { super(); this.dispatcher = dispatcher; this.connection = null; this.dump = false; this.state = "ongoing"; this.setMaxListeners(21); } terminate(reason) { if (this.state !== "ongoing") { return; } this.state = "terminated"; this.connection?.destroy(reason); this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort abort(error) { if (this.state !== "ongoing") { return; } this.state = "aborted"; if (!error) { error = new DOMException2("The operation was aborted.", "AbortError"); } this.serializedAbortReason = error; this.connection?.destroy(error); this.emit("terminated", error); } }; function fetch(input, init = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); const p = createDeferredPromise(); let requestObject; try { requestObject = new Request(input, init); } catch (e) { p.reject(e); return p.promise; } const request = requestObject[kState]; if (requestObject.signal.aborted) { abortFetch(p, request, null, requestObject.signal.reason); return p.promise; } const globalObject = request.client.globalObject; if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { request.serviceWorkers = "none"; } let responseObject = null; const relevantRealm = null; let locallyAborted = false; let controller = null; addAbortListener( requestObject.signal, () => { locallyAborted = true; assert(controller != null); controller.abort(requestObject.signal.reason); abortFetch(p, request, responseObject, requestObject.signal.reason); } ); const handleFetchDone = /* @__PURE__ */ __name((response) => finalizeAndReportTiming(response, "fetch"), "handleFetchDone"); const processResponse = /* @__PURE__ */ __name((response) => { if (locallyAborted) { return Promise.resolve(); } if (response.aborted) { abortFetch(p, request, responseObject, controller.serializedAbortReason); return Promise.resolve(); } if (response.type === "error") { p.reject( Object.assign(new TypeError("fetch failed"), { cause: response.error }) ); return Promise.resolve(); } responseObject = new Response(); responseObject[kState] = response; responseObject[kRealm] = relevantRealm; responseObject[kHeaders][kHeadersList] = response.headersList; responseObject[kHeaders][kGuard] = "immutable"; responseObject[kHeaders][kRealm] = relevantRealm; p.resolve(responseObject); }, "processResponse"); controller = fetching({ request, processResponseEndOfBody: handleFetchDone, processResponse, dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici }); return p.promise; } __name(fetch, "fetch"); function finalizeAndReportTiming(response, initiatorType = "other") { if (response.type === "error" && response.aborted) { return; } if (!response.urlList?.length) { return; } const originalURL = response.urlList[0]; let timingInfo = response.timingInfo; let cacheState = response.cacheState; if (!urlIsHttpHttpsScheme(originalURL)) { return; } if (timingInfo === null) { return; } if (!response.timingAllowPassed) { timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); cacheState = ""; } timingInfo.endTime = coarsenedSharedCurrentTime(); response.timingInfo = timingInfo; markResourceTiming( timingInfo, originalURL, initiatorType, globalThis, cacheState ); } __name(finalizeAndReportTiming, "finalizeAndReportTiming"); function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState) { if (nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 2) { performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } __name(markResourceTiming, "markResourceTiming"); function abortFetch(p, request, responseObject, error) { if (!error) { error = new DOMException2("The operation was aborted.", "AbortError"); } p.reject(error); if (request.body != null && isReadable(request.body?.stream)) { request.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } throw err; }); } if (responseObject == null) { return; } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { response.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } throw err; }); } } __name(abortFetch, "abortFetch"); function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher // undici }) { let taskDestination = null; let crossOriginIsolatedCapability = false; if (request.client != null) { taskDestination = request.client.globalObject; crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; } const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); const timingInfo = createOpaqueTimingInfo({ startTime: currenTime }); const fetchParams = { controller: new Fetch(dispatcher), request, timingInfo, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseConsumeBody, processResponseEndOfBody, taskDestination, crossOriginIsolatedCapability }; assert(!request.body || request.body.stream); if (request.window === "client") { request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; } if (request.origin === "client") { request.origin = request.client?.origin; } if (request.policyContainer === "client") { if (request.client != null) { request.policyContainer = clonePolicyContainer( request.client.policyContainer ); } else { request.policyContainer = makePolicyContainer(); } } if (!request.headersList.contains("accept")) { const value = "*/*"; request.headersList.append("accept", value); } if (!request.headersList.contains("accept-language")) { request.headersList.append("accept-language", "*"); } if (request.priority === null) { } if (subresourceSet.has(request.destination)) { } mainFetch(fetchParams).catch((err) => { fetchParams.controller.terminate(err); }); return fetchParams.controller; } __name(fetching, "fetching"); async function mainFetch(fetchParams, recursive = false) { const request = fetchParams.request; let response = null; if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { response = makeNetworkError("local URLs only"); } tryUpgradeRequestToAPotentiallyTrustworthyURL(request); if (requestBadPort(request) === "blocked") { response = makeNetworkError("bad port"); } if (request.referrerPolicy === "") { request.referrerPolicy = request.policyContainer.referrerPolicy; } if (request.referrer !== "no-referrer") { request.referrer = determineRequestsReferrer(request); } if (response === null) { response = await (async () => { const currentURL = requestCurrentURL(request); if ( // - request’s current URL’s origin is same origin with request’s origin, // and request’s response tainting is "basic" sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || // request’s current URL’s scheme is "data" currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" (request.mode === "navigate" || request.mode === "websocket") ) { request.responseTainting = "basic"; return await schemeFetch(fetchParams); } if (request.mode === "same-origin") { return makeNetworkError('request mode cannot be "same-origin"'); } if (request.mode === "no-cors") { if (request.redirect !== "follow") { return makeNetworkError( 'redirect mode cannot be "follow" for "no-cors" request' ); } request.responseTainting = "opaque"; return await schemeFetch(fetchParams); } if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { return makeNetworkError("URL scheme must be a HTTP(S) scheme"); } request.responseTainting = "cors"; return await httpFetch(fetchParams); })(); } if (recursive) { return response; } if (response.status !== 0 && !response.internalResponse) { if (request.responseTainting === "cors") { } if (request.responseTainting === "basic") { response = filterResponse(response, "basic"); } else if (request.responseTainting === "cors") { response = filterResponse(response, "cors"); } else if (request.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { assert(false); } } let internalResponse = response.status === 0 ? response : response.internalResponse; if (internalResponse.urlList.length === 0) { internalResponse.urlList.push(...request.urlList); } if (!request.timingAllowFailed) { response.timingAllowPassed = true; } if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range")) { response = internalResponse = makeNetworkError(); } if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { internalResponse.body = null; fetchParams.controller.dump = true; } if (request.integrity) { const processBodyError = /* @__PURE__ */ __name((reason) => fetchFinale(fetchParams, makeNetworkError(reason)), "processBodyError"); if (request.responseTainting === "opaque" || response.body == null) { processBodyError(response.error); return; } const processBody = /* @__PURE__ */ __name((bytes) => { if (!bytesMatch(bytes, request.integrity)) { processBodyError("integrity mismatch"); return; } response.body = safelyExtractBody(bytes)[0]; fetchFinale(fetchParams, response); }, "processBody"); await fullyReadBody(response.body, processBody, processBodyError); } else { fetchFinale(fetchParams, response); } } __name(mainFetch, "mainFetch"); function schemeFetch(fetchParams) { if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { return Promise.resolve(makeAppropriateNetworkError(fetchParams)); } const { request } = fetchParams; const { protocol: scheme } = requestCurrentURL(request); switch (scheme) { case "about:": { return Promise.resolve(makeNetworkError("about scheme is not supported")); } case "blob:": { if (!resolveObjectURL) { resolveObjectURL = require("buffer").resolveObjectURL; } const blobURLEntry = requestCurrentURL(request); if (blobURLEntry.search.length !== 0) { return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); } const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()); if (request.method !== "GET" || !isBlobLike(blobURLEntryObject)) { return Promise.resolve(makeNetworkError("invalid method")); } const bodyWithType = safelyExtractBody(blobURLEntryObject); const body = bodyWithType[0]; const length = isomorphicEncode(`${body.length}`); const type = bodyWithType[1] ?? ""; const response = makeResponse({ statusText: "OK", headersList: [ ["content-length", { name: "Content-Length", value: length }], ["content-type", { name: "Content-Type", value: type }] ] }); response.body = body; return Promise.resolve(response); } case "data:": { const currentURL = requestCurrentURL(request); const dataURLStruct = dataURLProcessor(currentURL); if (dataURLStruct === "failure") { return Promise.resolve(makeNetworkError("failed to fetch the data URL")); } const mimeType = serializeAMimeType(dataURLStruct.mimeType); return Promise.resolve(makeResponse({ statusText: "OK", headersList: [ ["content-type", { name: "Content-Type", value: mimeType }] ], body: safelyExtractBody(dataURLStruct.body)[0] })); } case "file:": { return Promise.resolve(makeNetworkError("not implemented... yet...")); } case "http:": case "https:": { return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); } default: { return Promise.resolve(makeNetworkError("unknown scheme")); } } } __name(schemeFetch, "schemeFetch"); function finalizeResponse(fetchParams, response) { fetchParams.request.done = true; if (fetchParams.processResponseDone != null) { queueMicrotask(() => fetchParams.processResponseDone(response)); } } __name(finalizeResponse, "finalizeResponse"); function fetchFinale(fetchParams, response) { if (response.type === "error") { response.urlList = [fetchParams.request.urlList[0]]; response.timingInfo = createOpaqueTimingInfo({ startTime: fetchParams.timingInfo.startTime }); } const processResponseEndOfBody = /* @__PURE__ */ __name(() => { fetchParams.request.done = true; if (fetchParams.processResponseEndOfBody != null) { queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); } }, "processResponseEndOfBody"); if (fetchParams.processResponse != null) { queueMicrotask(() => fetchParams.processResponse(response)); } if (response.body == null) { processResponseEndOfBody(); } else { const identityTransformAlgorithm = /* @__PURE__ */ __name((chunk, controller) => { controller.enqueue(chunk); }, "identityTransformAlgorithm"); const transformStream = new TransformStream({ start() { }, transform: identityTransformAlgorithm, flush: processResponseEndOfBody }, { size() { return 1; } }, { size() { return 1; } }); response.body = { stream: response.body.stream.pipeThrough(transformStream) }; } if (fetchParams.processResponseConsumeBody != null) { const processBody = /* @__PURE__ */ __name((nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes), "processBody"); const processBodyError = /* @__PURE__ */ __name((failure) => fetchParams.processResponseConsumeBody(response, failure), "processBodyError"); if (response.body == null) { queueMicrotask(() => processBody(null)); } else { return fullyReadBody(response.body, processBody, processBodyError); } return Promise.resolve(); } } __name(fetchFinale, "fetchFinale"); async function httpFetch(fetchParams) { const request = fetchParams.request; let response = null; let actualResponse = null; const timingInfo = fetchParams.timingInfo; if (request.serviceWorkers === "all") { } if (response === null) { if (request.redirect === "follow") { request.serviceWorkers = "none"; } actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") { return makeNetworkError("cors failure"); } if (TAOCheck(request, response) === "failure") { request.timingAllowFailed = true; } } if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( request.origin, request.client, request.destination, actualResponse ) === "blocked") { return makeNetworkError("blocked"); } if (redirectStatusSet.has(actualResponse.status)) { if (request.redirect !== "manual") { fetchParams.controller.connection.destroy(); } if (request.redirect === "error") { response = makeNetworkError("unexpected redirect"); } else if (request.redirect === "manual") { response = actualResponse; } else if (request.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { assert(false); } } response.timingInfo = timingInfo; return response; } __name(httpFetch, "httpFetch"); function httpRedirectFetch(fetchParams, response) { const request = fetchParams.request; const actualResponse = response.internalResponse ? response.internalResponse : response; let locationURL; try { locationURL = responseLocationURL( actualResponse, requestCurrentURL(request).hash ); if (locationURL == null) { return response; } } catch (err) { return Promise.resolve(makeNetworkError(err)); } if (!urlIsHttpHttpsScheme(locationURL)) { return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); } if (request.redirectCount === 20) { return Promise.resolve(makeNetworkError("redirect count exceeded")); } request.redirectCount += 1; if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) { return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')); } if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) { return Promise.resolve(makeNetworkError( 'URL cannot contain credentials for request mode "cors"' )); } if (actualResponse.status !== 303 && request.body != null && request.body.source == null) { return Promise.resolve(makeNetworkError()); } if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { request.method = "GET"; request.body = null; for (const headerName of requestBodyHeader) { request.headersList.delete(headerName); } } if (!sameOrigin(requestCurrentURL(request), locationURL)) { request.headersList.delete("authorization"); request.headersList.delete("proxy-authorization", true); request.headersList.delete("cookie"); request.headersList.delete("host"); } if (request.body != null) { assert(request.body.source != null); request.body = safelyExtractBody(request.body.source)[0]; } const timingInfo = fetchParams.timingInfo; timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); if (timingInfo.redirectStartTime === 0) { timingInfo.redirectStartTime = timingInfo.startTime; } request.urlList.push(locationURL); setRequestReferrerPolicyOnRedirect(request, actualResponse); return mainFetch(fetchParams, true); } __name(httpRedirectFetch, "httpRedirectFetch"); async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { const request = fetchParams.request; let httpFetchParams = null; let httpRequest = null; let response = null; const httpCache = null; const revalidatingFlag = false; if (request.window === "no-window" && request.redirect === "error") { httpFetchParams = fetchParams; httpRequest = request; } else { httpRequest = makeRequest(request); httpFetchParams = { ...fetchParams }; httpFetchParams.request = httpRequest; } const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; const contentLength = httpRequest.body ? httpRequest.body.length : null; let contentLengthHeaderValue = null; if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { contentLengthHeaderValue = "0"; } if (contentLength != null) { contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); } if (contentLengthHeaderValue != null) { httpRequest.headersList.append("content-length", contentLengthHeaderValue); } if (contentLength != null && httpRequest.keepalive) { } if (httpRequest.referrer instanceof URL) { httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href)); } appendRequestOriginHeader(httpRequest); appendFetchMetadata(httpRequest); if (!httpRequest.headersList.contains("user-agent")) { httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); } if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since") || httpRequest.headersList.contains("if-none-match") || httpRequest.headersList.contains("if-unmodified-since") || httpRequest.headersList.contains("if-match") || httpRequest.headersList.contains("if-range"))) { httpRequest.cache = "no-store"; } if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) { httpRequest.headersList.append("cache-control", "max-age=0"); } if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { if (!httpRequest.headersList.contains("pragma")) { httpRequest.headersList.append("pragma", "no-cache"); } if (!httpRequest.headersList.contains("cache-control")) { httpRequest.headersList.append("cache-control", "no-cache"); } } if (httpRequest.headersList.contains("range")) { httpRequest.headersList.append("accept-encoding", "identity"); } if (!httpRequest.headersList.contains("accept-encoding")) { if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); } else { httpRequest.headersList.append("accept-encoding", "gzip, deflate"); } } httpRequest.headersList.delete("host"); if (includeCredentials) { } if (httpCache == null) { httpRequest.cache = "no-store"; } if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") { } if (response == null) { if (httpRequest.mode === "only-if-cached") { return makeNetworkError("only if cached"); } const forwardResponse = await httpNetworkFetch( httpFetchParams, includeCredentials, isNewConnectionFetch ); if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) { } if (revalidatingFlag && forwardResponse.status === 304) { } if (response == null) { response = forwardResponse; } } response.urlList = [...httpRequest.urlList]; if (httpRequest.headersList.contains("range")) { response.rangeRequested = true; } response.requestIncludesCredentials = includeCredentials; if (response.status === 407) { if (request.window === "no-window") { return makeNetworkError(); } if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams); } return makeNetworkError("proxy authentication required"); } if ( // response’s status is 421 response.status === 421 && // isNewConnectionFetch is false !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null (request.body == null || request.body.source != null) ) { if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams); } fetchParams.controller.connection.destroy(); response = await httpNetworkOrCacheFetch( fetchParams, isAuthenticationFetch, true ); } if (isAuthenticationFetch) { } return response; } __name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch"); async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { abort: null, destroyed: false, destroy(err) { if (!this.destroyed) { this.destroyed = true; this.abort?.(err ?? new DOMException2("The operation was aborted.", "AbortError")); } } }; const request = fetchParams.request; let response = null; const timingInfo = fetchParams.timingInfo; const httpCache = null; if (httpCache == null) { request.cache = "no-store"; } const newConnection = forceNewConnection ? "yes" : "no"; if (request.mode === "websocket") { } else { } let requestBody = null; if (request.body == null && fetchParams.processRequestEndOfBody) { queueMicrotask(() => fetchParams.processRequestEndOfBody()); } else if (request.body != null) { const processBodyChunk = /* @__PURE__ */ __name(async function* (bytes) { if (isCancelled(fetchParams)) { return; } yield bytes; fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); }, "processBodyChunk"); const processEndOfBody = /* @__PURE__ */ __name(() => { if (isCancelled(fetchParams)) { return; } if (fetchParams.processRequestEndOfBody) { fetchParams.processRequestEndOfBody(); } }, "processEndOfBody"); const processBodyError = /* @__PURE__ */ __name((e) => { if (isCancelled(fetchParams)) { return; } if (e.name === "AbortError") { fetchParams.controller.abort(); } else { fetchParams.controller.terminate(e); } }, "processBodyError"); requestBody = async function* () { try { for await (const bytes of request.body.stream) { yield* processBodyChunk(bytes); } processEndOfBody(); } catch (err) { processBodyError(err); } }(); } try { const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); if (socket) { response = makeResponse({ status, statusText, headersList, socket }); } else { const iterator = body[Symbol.asyncIterator](); fetchParams.controller.next = () => iterator.next(); response = makeResponse({ status, statusText, headersList }); } } catch (err) { if (err.name === "AbortError") { fetchParams.controller.connection.destroy(); return makeAppropriateNetworkError(fetchParams, err); } return makeNetworkError(err); } const pullAlgorithm = /* @__PURE__ */ __name(() => { fetchParams.controller.resume(); }, "pullAlgorithm"); const cancelAlgorithm = /* @__PURE__ */ __name((reason) => { fetchParams.controller.abort(reason); }, "cancelAlgorithm"); if (!ReadableStream2) { ReadableStream2 = require("stream/web").ReadableStream; } const stream = new ReadableStream2( { async start(controller) { fetchParams.controller.controller = controller; }, async pull(controller) { await pullAlgorithm(controller); }, async cancel(reason) { await cancelAlgorithm(reason); } }, { highWaterMark: 0, size() { return 1; } } ); response.body = { stream }; fetchParams.controller.on("terminated", onAborted); fetchParams.controller.resume = async () => { while (true) { let bytes; let isFailure; try { const { done, value } = await fetchParams.controller.next(); if (isAborted(fetchParams)) { break; } bytes = done ? void 0 : value; } catch (err) { if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { bytes = void 0; } else { bytes = err; isFailure = true; } } if (bytes === void 0) { readableStreamClose(fetchParams.controller.controller); finalizeResponse(fetchParams, response); return; } timingInfo.decodedBodySize += bytes?.byteLength ?? 0; if (isFailure) { fetchParams.controller.terminate(bytes); return; } fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); if (isErrored(stream)) { fetchParams.controller.terminate(); return; } if (!fetchParams.controller.controller.desiredSize) { return; } } }; function onAborted(reason) { if (isAborted(fetchParams)) { response.aborted = true; if (isReadable(stream)) { fetchParams.controller.controller.error( fetchParams.controller.serializedAbortReason ); } } else { if (isReadable(stream)) { fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); } } fetchParams.controller.connection.destroy(); } __name(onAborted, "onAborted"); return response; async function dispatch({ body }) { const url = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, maxRedirections: 0, upgrade: request.mode === "websocket" ? "websocket" : void 0 }, { body: null, abort: null, onConnect(abort) { const { connection } = fetchParams.controller; if (connection.destroyed) { abort(new DOMException2("The operation was aborted.", "AbortError")); } else { fetchParams.controller.on("terminated", abort); this.abort = connection.abort = abort; } }, onHeaders(status, headersList, resume, statusText) { if (status < 200) { return; } let codings = []; let location = ""; const headers = new Headers(); if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { location = val; } headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { location = val; } headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); const decoders = []; const willFollow = request.redirect === "follow" && location && redirectStatusSet.has(status); if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { for (const coding of codings) { if (coding === "x-gzip" || coding === "gzip") { decoders.push(zlib.createGunzip({ // Be less strict when decoding compressed responses, since sometimes // servers send slightly invalid responses that are still accepted // by common browsers. // Always using Z_SYNC_FLUSH is what cURL does. flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH })); } else if (coding === "deflate") { decoders.push(zlib.createInflate()); } else if (coding === "br") { decoders.push(zlib.createBrotliDecompress()); } else { decoders.length = 0; break; } } } resolve({ status, statusText, headersList: headers[kHeadersList], body: decoders.length ? pipeline(this.body, ...decoders, () => { }) : this.body.on("error", () => { }) }); return true; }, onData(chunk) { if (fetchParams.controller.dump) { return; } const bytes = chunk; timingInfo.encodedBodySize += bytes.byteLength; return this.body.push(bytes); }, onComplete() { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } fetchParams.controller.ended = true; this.body.push(null); }, onError(error) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } this.body?.destroy(error); fetchParams.controller.terminate(error); reject(error); }, onUpgrade(status, headersList, socket) { if (status !== 101) { return; } const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); const val = headersList[n + 1].toString("latin1"); headers[kHeadersList].append(key, val); } resolve({ status, statusText: STATUS_CODES[status], headersList: headers[kHeadersList], socket }); return true; } } )); } __name(dispatch, "dispatch"); } __name(httpNetworkFetch, "httpNetworkFetch"); module2.exports = { fetch, Fetch, fetching, finalizeAndReportTiming }; } }); // node_modules/undici/lib/fileapi/symbols.js var require_symbols3 = __commonJS({ "node_modules/undici/lib/fileapi/symbols.js"(exports2, module2) { "use strict"; module2.exports = { kState: Symbol("FileReader state"), kResult: Symbol("FileReader result"), kError: Symbol("FileReader error"), kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), kEvents: Symbol("FileReader events"), kAborted: Symbol("FileReader aborted") }; } }); // node_modules/undici/lib/fileapi/progressevent.js var require_progressevent = __commonJS({ "node_modules/undici/lib/fileapi/progressevent.js"(exports2, module2) { "use strict"; var { webidl } = require_webidl(); var kState = Symbol("ProgressEvent state"); var ProgressEvent = class _ProgressEvent extends Event { static { __name(this, "ProgressEvent"); } constructor(type, eventInitDict = {}) { type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, total: eventInitDict.total }; } get lengthComputable() { webidl.brandCheck(this, _ProgressEvent); return this[kState].lengthComputable; } get loaded() { webidl.brandCheck(this, _ProgressEvent); return this[kState].loaded; } get total() { webidl.brandCheck(this, _ProgressEvent); return this[kState].total; } }; webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ { key: "lengthComputable", converter: webidl.converters.boolean, defaultValue: false }, { key: "loaded", converter: webidl.converters["unsigned long long"], defaultValue: 0 }, { key: "total", converter: webidl.converters["unsigned long long"], defaultValue: 0 }, { key: "bubbles", converter: webidl.converters.boolean, defaultValue: false }, { key: "cancelable", converter: webidl.converters.boolean, defaultValue: false }, { key: "composed", converter: webidl.converters.boolean, defaultValue: false } ]); module2.exports = { ProgressEvent }; } }); // node_modules/undici/lib/fileapi/encoding.js var require_encoding = __commonJS({ "node_modules/undici/lib/fileapi/encoding.js"(exports2, module2) { "use strict"; function getEncoding(label) { if (!label) { return "failure"; } switch (label.trim().toLowerCase()) { case "unicode-1-1-utf-8": case "unicode11utf8": case "unicode20utf8": case "utf-8": case "utf8": case "x-unicode20utf8": return "UTF-8"; case "866": case "cp866": case "csibm866": case "ibm866": return "IBM866"; case "csisolatin2": case "iso-8859-2": case "iso-ir-101": case "iso8859-2": case "iso88592": case "iso_8859-2": case "iso_8859-2:1987": case "l2": case "latin2": return "ISO-8859-2"; case "csisolatin3": case "iso-8859-3": case "iso-ir-109": case "iso8859-3": case "iso88593": case "iso_8859-3": case "iso_8859-3:1988": case "l3": case "latin3": return "ISO-8859-3"; case "csisolatin4": case "iso-8859-4": case "iso-ir-110": case "iso8859-4": case "iso88594": case "iso_8859-4": case "iso_8859-4:1988": case "l4": case "latin4": return "ISO-8859-4"; case "csisolatincyrillic": case "cyrillic": case "iso-8859-5": case "iso-ir-144": case "iso8859-5": case "iso88595": case "iso_8859-5": case "iso_8859-5:1988": return "ISO-8859-5"; case "arabic": case "asmo-708": case "csiso88596e": case "csiso88596i": case "csisolatinarabic": case "ecma-114": case "iso-8859-6": case "iso-8859-6-e": case "iso-8859-6-i": case "iso-ir-127": case "iso8859-6": case "iso88596": case "iso_8859-6": case "iso_8859-6:1987": return "ISO-8859-6"; case "csisolatingreek": case "ecma-118": case "elot_928": case "greek": case "greek8": case "iso-8859-7": case "iso-ir-126": case "iso8859-7": case "iso88597": case "iso_8859-7": case "iso_8859-7:1987": case "sun_eu_greek": return "ISO-8859-7"; case "csiso88598e": case "csisolatinhebrew": case "hebrew": case "iso-8859-8": case "iso-8859-8-e": case "iso-ir-138": case "iso8859-8": case "iso88598": case "iso_8859-8": case "iso_8859-8:1988": case "visual": return "ISO-8859-8"; case "csiso88598i": case "iso-8859-8-i": case "logical": return "ISO-8859-8-I"; case "csisolatin6": case "iso-8859-10": case "iso-ir-157": case "iso8859-10": case "iso885910": case "l6": case "latin6": return "ISO-8859-10"; case "iso-8859-13": case "iso8859-13": case "iso885913": return "ISO-8859-13"; case "iso-8859-14": case "iso8859-14": case "iso885914": return "ISO-8859-14"; case "csisolatin9": case "iso-8859-15": case "iso8859-15": case "iso885915": case "iso_8859-15": case "l9": return "ISO-8859-15"; case "iso-8859-16": return "ISO-8859-16"; case "cskoi8r": case "koi": case "koi8": case "koi8-r": case "koi8_r": return "KOI8-R"; case "koi8-ru": case "koi8-u": return "KOI8-U"; case "csmacintosh": case "mac": case "macintosh": case "x-mac-roman": return "macintosh"; case "iso-8859-11": case "iso8859-11": case "iso885911": case "tis-620": case "windows-874": return "windows-874"; case "cp1250": case "windows-1250": case "x-cp1250": return "windows-1250"; case "cp1251": case "windows-1251": case "x-cp1251": return "windows-1251"; case "ansi_x3.4-1968": case "ascii": case "cp1252": case "cp819": case "csisolatin1": case "ibm819": case "iso-8859-1": case "iso-ir-100": case "iso8859-1": case "iso88591": case "iso_8859-1": case "iso_8859-1:1987": case "l1": case "latin1": case "us-ascii": case "windows-1252": case "x-cp1252": return "windows-1252"; case "cp1253": case "windows-1253": case "x-cp1253": return "windows-1253"; case "cp1254": case "csisolatin5": case "iso-8859-9": case "iso-ir-148": case "iso8859-9": case "iso88599": case "iso_8859-9": case "iso_8859-9:1989": case "l5": case "latin5": case "windows-1254": case "x-cp1254": return "windows-1254"; case "cp1255": case "windows-1255": case "x-cp1255": return "windows-1255"; case "cp1256": case "windows-1256": case "x-cp1256": return "windows-1256"; case "cp1257": case "windows-1257": case "x-cp1257": return "windows-1257"; case "cp1258": case "windows-1258": case "x-cp1258": return "windows-1258"; case "x-mac-cyrillic": case "x-mac-ukrainian": return "x-mac-cyrillic"; case "chinese": case "csgb2312": case "csiso58gb231280": case "gb2312": case "gb_2312": case "gb_2312-80": case "gbk": case "iso-ir-58": case "x-gbk": return "GBK"; case "gb18030": return "gb18030"; case "big5": case "big5-hkscs": case "cn-big5": case "csbig5": case "x-x-big5": return "Big5"; case "cseucpkdfmtjapanese": case "euc-jp": case "x-euc-jp": return "EUC-JP"; case "csiso2022jp": case "iso-2022-jp": return "ISO-2022-JP"; case "csshiftjis": case "ms932": case "ms_kanji": case "shift-jis": case "shift_jis": case "sjis": case "windows-31j": case "x-sjis": return "Shift_JIS"; case "cseuckr": case "csksc56011987": case "euc-kr": case "iso-ir-149": case "korean": case "ks_c_5601-1987": case "ks_c_5601-1989": case "ksc5601": case "ksc_5601": case "windows-949": return "EUC-KR"; case "csiso2022kr": case "hz-gb-2312": case "iso-2022-cn": case "iso-2022-cn-ext": case "iso-2022-kr": case "replacement": return "replacement"; case "unicodefffe": case "utf-16be": return "UTF-16BE"; case "csunicode": case "iso-10646-ucs-2": case "ucs-2": case "unicode": case "unicodefeff": case "utf-16": case "utf-16le": return "UTF-16LE"; case "x-user-defined": return "x-user-defined"; default: return "failure"; } } __name(getEncoding, "getEncoding"); module2.exports = { getEncoding }; } }); // node_modules/undici/lib/fileapi/util.js var require_util4 = __commonJS({ "node_modules/undici/lib/fileapi/util.js"(exports2, module2) { "use strict"; var { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols3(); var { ProgressEvent } = require_progressevent(); var { getEncoding } = require_encoding(); var { DOMException: DOMException2 } = require_constants3(); var { serializeAMimeType, parseMIMEType } = require_dataURL(); var { types } = require("util"); var { StringDecoder } = require("string_decoder"); var { btoa: btoa2 } = require("buffer"); var staticPropertyDescriptors = { enumerable: true, writable: false, configurable: false }; function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException2("Invalid state", "InvalidStateError"); } fr[kState] = "loading"; fr[kResult] = null; fr[kError] = null; const stream = blob.stream(); const reader = stream.getReader(); const bytes = []; let chunkPromise = reader.read(); let isFirstChunk = true; (async () => { while (!fr[kAborted]) { try { const { done, value } = await chunkPromise; if (isFirstChunk && !fr[kAborted]) { queueMicrotask(() => { fireAProgressEvent("loadstart", fr); }); } isFirstChunk = false; if (!done && types.isUint8Array(value)) { bytes.push(value); if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { fr[kLastProgressEventFired] = Date.now(); queueMicrotask(() => { fireAProgressEvent("progress", fr); }); } chunkPromise = reader.read(); } else if (done) { queueMicrotask(() => { fr[kState] = "done"; try { const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } fr[kResult] = result; fireAProgressEvent("load", fr); } catch (error) { fr[kError] = error; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); } }); break; } } catch (error) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; fr[kError] = error; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); } }); break; } } })(); } __name(readOperation, "readOperation"); function fireAProgressEvent(e, reader) { const event = new ProgressEvent(e, { bubbles: false, cancelable: false }); reader.dispatchEvent(event); } __name(fireAProgressEvent, "fireAProgressEvent"); function packageData(bytes, type, mimeType, encodingName) { switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); if (parsed !== "failure") { dataURL += serializeAMimeType(parsed); } dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { dataURL += btoa2(decoder.write(chunk)); } dataURL += btoa2(decoder.end()); return dataURL; } case "Text": { let encoding = "failure"; if (encodingName) { encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { const type2 = parseMIMEType(mimeType); if (type2 !== "failure") { encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { encoding = "UTF-8"; } return decode(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); return sequence.buffer; } case "BinaryString": { let binaryString = ""; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { binaryString += decoder.write(chunk); } binaryString += decoder.end(); return binaryString; } } } __name(packageData, "packageData"); function decode(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; if (BOMEncoding !== null) { encoding = BOMEncoding; slice = BOMEncoding === "UTF-8" ? 3 : 2; } const sliced = bytes.slice(slice); return new TextDecoder(encoding).decode(sliced); } __name(decode, "decode"); function BOMSniffing(ioQueue) { const [a, b, c] = ioQueue; if (a === 239 && b === 187 && c === 191) { return "UTF-8"; } else if (a === 254 && b === 255) { return "UTF-16BE"; } else if (a === 255 && b === 254) { return "UTF-16LE"; } return null; } __name(BOMSniffing, "BOMSniffing"); function combineByteSequences(sequences) { const size = sequences.reduce((a, b) => { return a + b.byteLength; }, 0); let offset = 0; return sequences.reduce((a, b) => { a.set(b, offset); offset += b.byteLength; return a; }, new Uint8Array(size)); } __name(combineByteSequences, "combineByteSequences"); module2.exports = { staticPropertyDescriptors, readOperation, fireAProgressEvent }; } }); // node_modules/undici/lib/fileapi/filereader.js var require_filereader = __commonJS({ "node_modules/undici/lib/fileapi/filereader.js"(exports2, module2) { "use strict"; var { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util4(); var { kState, kError, kResult, kEvents, kAborted } = require_symbols3(); var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); var FileReader = class _FileReader extends EventTarget { static { __name(this, "FileReader"); } constructor() { super(); this[kState] = "empty"; this[kResult] = null; this[kError] = null; this[kEvents] = { loadend: null, error: null, abort: null, load: null, progress: null, loadstart: null }; } /** * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer * @param {import('buffer').Blob} blob */ readAsArrayBuffer(blob) { webidl.brandCheck(this, _FileReader); webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsArrayBuffer" }); blob = webidl.converters.Blob(blob, { strict: false }); readOperation(this, blob, "ArrayBuffer"); } /** * @see https://w3c.github.io/FileAPI/#readAsBinaryString * @param {import('buffer').Blob} blob */ readAsBinaryString(blob) { webidl.brandCheck(this, _FileReader); webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsBinaryString" }); blob = webidl.converters.Blob(blob, { strict: false }); readOperation(this, blob, "BinaryString"); } /** * @see https://w3c.github.io/FileAPI/#readAsDataText * @param {import('buffer').Blob} blob * @param {string?} encoding */ readAsText(blob, encoding = void 0) { webidl.brandCheck(this, _FileReader); webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsText" }); blob = webidl.converters.Blob(blob, { strict: false }); if (encoding !== void 0) { encoding = webidl.converters.DOMString(encoding); } readOperation(this, blob, "Text", encoding); } /** * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL * @param {import('buffer').Blob} blob */ readAsDataURL(blob) { webidl.brandCheck(this, _FileReader); webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsDataURL" }); blob = webidl.converters.Blob(blob, { strict: false }); readOperation(this, blob, "DataURL"); } /** * @see https://w3c.github.io/FileAPI/#dfn-abort */ abort() { if (this[kState] === "empty" || this[kState] === "done") { this[kResult] = null; return; } if (this[kState] === "loading") { this[kState] = "done"; this[kResult] = null; } this[kAborted] = true; fireAProgressEvent("abort", this); if (this[kState] !== "loading") { fireAProgressEvent("loadend", this); } } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate */ get readyState() { webidl.brandCheck(this, _FileReader); switch (this[kState]) { case "empty": return this.EMPTY; case "loading": return this.LOADING; case "done": return this.DONE; } } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-result */ get result() { webidl.brandCheck(this, _FileReader); return this[kResult]; } /** * @see https://w3c.github.io/FileAPI/#dom-filereader-error */ get error() { webidl.brandCheck(this, _FileReader); return this[kError]; } get onloadend() { webidl.brandCheck(this, _FileReader); return this[kEvents].loadend; } set onloadend(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].loadend) { this.removeEventListener("loadend", this[kEvents].loadend); } if (typeof fn === "function") { this[kEvents].loadend = fn; this.addEventListener("loadend", fn); } else { this[kEvents].loadend = null; } } get onerror() { webidl.brandCheck(this, _FileReader); return this[kEvents].error; } set onerror(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].error) { this.removeEventListener("error", this[kEvents].error); } if (typeof fn === "function") { this[kEvents].error = fn; this.addEventListener("error", fn); } else { this[kEvents].error = null; } } get onloadstart() { webidl.brandCheck(this, _FileReader); return this[kEvents].loadstart; } set onloadstart(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].loadstart) { this.removeEventListener("loadstart", this[kEvents].loadstart); } if (typeof fn === "function") { this[kEvents].loadstart = fn; this.addEventListener("loadstart", fn); } else { this[kEvents].loadstart = null; } } get onprogress() { webidl.brandCheck(this, _FileReader); return this[kEvents].progress; } set onprogress(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].progress) { this.removeEventListener("progress", this[kEvents].progress); } if (typeof fn === "function") { this[kEvents].progress = fn; this.addEventListener("progress", fn); } else { this[kEvents].progress = null; } } get onload() { webidl.brandCheck(this, _FileReader); return this[kEvents].load; } set onload(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].load) { this.removeEventListener("load", this[kEvents].load); } if (typeof fn === "function") { this[kEvents].load = fn; this.addEventListener("load", fn); } else { this[kEvents].load = null; } } get onabort() { webidl.brandCheck(this, _FileReader); return this[kEvents].abort; } set onabort(fn) { webidl.brandCheck(this, _FileReader); if (this[kEvents].abort) { this.removeEventListener("abort", this[kEvents].abort); } if (typeof fn === "function") { this[kEvents].abort = fn; this.addEventListener("abort", fn); } else { this[kEvents].abort = null; } } }; FileReader.EMPTY = FileReader.prototype.EMPTY = 0; FileReader.LOADING = FileReader.prototype.LOADING = 1; FileReader.DONE = FileReader.prototype.DONE = 2; Object.defineProperties(FileReader.prototype, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors, readAsArrayBuffer: kEnumerableProperty, readAsBinaryString: kEnumerableProperty, readAsText: kEnumerableProperty, readAsDataURL: kEnumerableProperty, abort: kEnumerableProperty, readyState: kEnumerableProperty, result: kEnumerableProperty, error: kEnumerableProperty, onloadstart: kEnumerableProperty, onprogress: kEnumerableProperty, onload: kEnumerableProperty, onabort: kEnumerableProperty, onerror: kEnumerableProperty, onloadend: kEnumerableProperty, [Symbol.toStringTag]: { value: "FileReader", writable: false, enumerable: false, configurable: true } }); Object.defineProperties(FileReader, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors }); module2.exports = { FileReader }; } }); // node_modules/undici/lib/cache/symbols.js var require_symbols4 = __commonJS({ "node_modules/undici/lib/cache/symbols.js"(exports2, module2) { "use strict"; module2.exports = { kConstruct: require_symbols().kConstruct }; } }); // node_modules/undici/lib/cache/util.js var require_util5 = __commonJS({ "node_modules/undici/lib/cache/util.js"(exports2, module2) { "use strict"; var assert = require("assert"); var { URLSerializer } = require_dataURL(); var { isValidHeaderName } = require_util2(); function urlEquals(A, B, excludeFragment = false) { const serializedA = URLSerializer(A, excludeFragment); const serializedB = URLSerializer(B, excludeFragment); return serializedA === serializedB; } __name(urlEquals, "urlEquals"); function fieldValues(header) { assert(header !== null); const values = []; for (let value of header.split(",")) { value = value.trim(); if (!value.length) { continue; } else if (!isValidHeaderName(value)) { continue; } values.push(value); } return values; } __name(fieldValues, "fieldValues"); module2.exports = { urlEquals, fieldValues }; } }); // node_modules/undici/lib/cache/cache.js var require_cache = __commonJS({ "node_modules/undici/lib/cache/cache.js"(exports2, module2) { "use strict"; var { kConstruct } = require_symbols4(); var { urlEquals, fieldValues: getFieldValues } = require_util5(); var { kEnumerableProperty, isDisturbed } = require_util(); var { kHeadersList } = require_symbols(); var { webidl } = require_webidl(); var { Response, cloneResponse } = require_response(); var { Request } = require_request2(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); var assert = require("assert"); var { getGlobalDispatcher } = require_global2(); var Cache = class _Cache { static { __name(this, "Cache"); } /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list * @type {requestResponseList} */ #relevantRequestResponseList; constructor() { if (arguments[0] !== kConstruct) { webidl.illegalConstructor(); } this.#relevantRequestResponseList = arguments[1]; } async match(request, options = {}) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options); const p = await this.matchAll(request, options); if (p.length === 0) { return; } return p[0]; } async matchAll(request = void 0, options = {}) { webidl.brandCheck(this, _Cache); if (request !== void 0) request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options); let r = null; if (request !== void 0) { if (request instanceof Request) { r = request[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request === "string") { r = new Request(request)[kState]; } } const responses = []; if (request === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { responses.push(requestResponse[1]); } } else { const requestResponses = this.#queryCache(r, options); for (const requestResponse of requestResponses) { responses.push(requestResponse[1]); } } const responseList = []; for (const response of responses) { const responseObject = new Response(response.body?.source ?? null); const body = responseObject[kState].body; responseObject[kState] = response; responseObject[kState].body = body; responseObject[kHeaders][kHeadersList] = response.headersList; responseObject[kHeaders][kGuard] = "immutable"; responseList.push(responseObject); } return Object.freeze(responseList); } async add(request) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); request = webidl.converters.RequestInfo(request); const requests = [request]; const responseArrayPromise = this.addAll(requests); return await responseArrayPromise; } async addAll(requests) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.addAll" }); requests = webidl.converters["sequence"](requests); const responsePromises = []; const requestList = []; for (const request of requests) { if (typeof request === "string") { continue; } const r = request[kState]; if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { throw webidl.errors.exception({ header: "Cache.addAll", message: "Expected http/s scheme when method is not GET." }); } } const fetchControllers = []; for (const request of requests) { const r = new Request(request)[kState]; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: "Cache.addAll", message: "Expected http/s scheme." }); } r.initiator = "fetch"; r.destination = "subresource"; requestList.push(r); const responsePromise = createDeferredPromise(); fetchControllers.push(fetching({ request: r, dispatcher: getGlobalDispatcher(), processResponse(response) { if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) { responsePromise.reject(webidl.errors.exception({ header: "Cache.addAll", message: "Received an invalid status code or the request failed." })); } else if (response.headersList.contains("vary")) { const fieldValues = getFieldValues(response.headersList.get("vary")); for (const fieldValue of fieldValues) { if (fieldValue === "*") { responsePromise.reject(webidl.errors.exception({ header: "Cache.addAll", message: "invalid vary field value" })); for (const controller of fetchControllers) { controller.abort(); } return; } } } }, processResponseEndOfBody(response) { if (response.aborted) { responsePromise.reject(new DOMException("aborted", "AbortError")); return; } responsePromise.resolve(response); } })); responsePromises.push(responsePromise.promise); } const p = Promise.all(responsePromises); const responses = await p; const operations = []; let index = 0; for (const response of responses) { const operation = { type: "put", // 7.3.2 request: requestList[index], // 7.3.3 response // 7.3.4 }; operations.push(operation); index++; } const cacheJobPromise = createDeferredPromise(); let errorData = null; try { this.#batchCacheOperations(operations); } catch (e) { errorData = e; } queueMicrotask(() => { if (errorData === null) { cacheJobPromise.resolve(void 0); } else { cacheJobPromise.reject(errorData); } }); return cacheJobPromise.promise; } async put(request, response) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); request = webidl.converters.RequestInfo(request); response = webidl.converters.Response(response); let innerRequest = null; if (request instanceof Request) { innerRequest = request[kState]; } else { innerRequest = new Request(request)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ header: "Cache.put", message: "Expected an http/s scheme when method is not GET" }); } const innerResponse = response[kState]; if (innerResponse.status === 206) { throw webidl.errors.exception({ header: "Cache.put", message: "Got 206 status" }); } if (innerResponse.headersList.contains("vary")) { const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); for (const fieldValue of fieldValues) { if (fieldValue === "*") { throw webidl.errors.exception({ header: "Cache.put", message: "Got * vary field value" }); } } } if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { throw webidl.errors.exception({ header: "Cache.put", message: "Response body is locked or disturbed" }); } const clonedResponse = cloneResponse(innerResponse); const bodyReadPromise = createDeferredPromise(); if (innerResponse.body != null) { const stream = innerResponse.body.stream; const reader = stream.getReader(); readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); } else { bodyReadPromise.resolve(void 0); } const operations = []; const operation = { type: "put", // 14. request: innerRequest, // 15. response: clonedResponse // 16. }; operations.push(operation); const bytes = await bodyReadPromise.promise; if (clonedResponse.body != null) { clonedResponse.body.source = bytes; } const cacheJobPromise = createDeferredPromise(); let errorData = null; try { this.#batchCacheOperations(operations); } catch (e) { errorData = e; } queueMicrotask(() => { if (errorData === null) { cacheJobPromise.resolve(); } else { cacheJobPromise.reject(errorData); } }); return cacheJobPromise.promise; } async delete(request, options = {}) { webidl.brandCheck(this, _Cache); webidl.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options); let r = null; if (request instanceof Request) { r = request[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return false; } } else { assert(typeof request === "string"); r = new Request(request)[kState]; } const operations = []; const operation = { type: "delete", request: r, options }; operations.push(operation); const cacheJobPromise = createDeferredPromise(); let errorData = null; let requestResponses; try { requestResponses = this.#batchCacheOperations(operations); } catch (e) { errorData = e; } queueMicrotask(() => { if (errorData === null) { cacheJobPromise.resolve(!!requestResponses?.length); } else { cacheJobPromise.reject(errorData); } }); return cacheJobPromise.promise; } /** * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys * @param {any} request * @param {import('../../types/cache').CacheQueryOptions} options * @returns {readonly Request[]} */ async keys(request = void 0, options = {}) { webidl.brandCheck(this, _Cache); if (request !== void 0) request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options); let r = null; if (request !== void 0) { if (request instanceof Request) { r = request[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request === "string") { r = new Request(request)[kState]; } } const promise = createDeferredPromise(); const requests = []; if (request === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { requests.push(requestResponse[0]); } } else { const requestResponses = this.#queryCache(r, options); for (const requestResponse of requestResponses) { requests.push(requestResponse[0]); } } queueMicrotask(() => { const requestList = []; for (const request2 of requests) { const requestObject = new Request("https://a"); requestObject[kState] = request2; requestObject[kHeaders][kHeadersList] = request2.headersList; requestObject[kHeaders][kGuard] = "immutable"; requestObject[kRealm] = request2.client; requestList.push(requestObject); } promise.resolve(Object.freeze(requestList)); }); return promise.promise; } /** * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm * @param {CacheBatchOperation[]} operations * @returns {requestResponseList} */ #batchCacheOperations(operations) { const cache2 = this.#relevantRequestResponseList; const backupCache = [...cache2]; const addedItems = []; const resultList = []; try { for (const operation of operations) { if (operation.type !== "delete" && operation.type !== "put") { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: 'operation type does not match "delete" or "put"' }); } if (operation.type === "delete" && operation.response != null) { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "delete operation should not have an associated response" }); } if (this.#queryCache(operation.request, operation.options, addedItems).length) { throw new DOMException("???", "InvalidStateError"); } let requestResponses; if (operation.type === "delete") { requestResponses = this.#queryCache(operation.request, operation.options); if (requestResponses.length === 0) { return []; } for (const requestResponse of requestResponses) { const idx = cache2.indexOf(requestResponse); assert(idx !== -1); cache2.splice(idx, 1); } } else if (operation.type === "put") { if (operation.response == null) { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "put operation should have an associated response" }); } const r = operation.request; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "expected http or https scheme" }); } if (r.method !== "GET") { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "not get method" }); } if (operation.options != null) { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "options must not be defined" }); } requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache2.indexOf(requestResponse); assert(idx !== -1); cache2.splice(idx, 1); } cache2.push([operation.request, operation.response]); addedItems.push([operation.request, operation.response]); } resultList.push([operation.request, operation.response]); } return resultList; } catch (e) { this.#relevantRequestResponseList.length = 0; this.#relevantRequestResponseList = backupCache; throw e; } } /** * @see https://w3c.github.io/ServiceWorker/#query-cache * @param {any} requestQuery * @param {import('../../types/cache').CacheQueryOptions} options * @param {requestResponseList} targetStorage * @returns {requestResponseList} */ #queryCache(requestQuery, options, targetStorage) { const resultList = []; const storage = targetStorage ?? this.#relevantRequestResponseList; for (const requestResponse of storage) { const [cachedRequest, cachedResponse] = requestResponse; if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { resultList.push(requestResponse); } } return resultList; } /** * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm * @param {any} requestQuery * @param {any} request * @param {any | null} response * @param {import('../../types/cache').CacheQueryOptions | undefined} options * @returns {boolean} */ #requestMatchesCachedItem(requestQuery, request, response = null, options) { const queryURL = new URL(requestQuery.url); const cachedURL = new URL(request.url); if (options?.ignoreSearch) { cachedURL.search = ""; queryURL.search = ""; } if (!urlEquals(queryURL, cachedURL, true)) { return false; } if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) { return true; } const fieldValues = getFieldValues(response.headersList.get("vary")); for (const fieldValue of fieldValues) { if (fieldValue === "*") { return false; } const requestValue = request.headersList.get(fieldValue); const queryValue = requestQuery.headersList.get(fieldValue); if (requestValue !== queryValue) { return false; } } return true; } }; Object.defineProperties(Cache.prototype, { [Symbol.toStringTag]: { value: "Cache", configurable: true }, match: kEnumerableProperty, matchAll: kEnumerableProperty, add: kEnumerableProperty, addAll: kEnumerableProperty, put: kEnumerableProperty, delete: kEnumerableProperty, keys: kEnumerableProperty }); var cacheQueryOptionConverters = [ { key: "ignoreSearch", converter: webidl.converters.boolean, defaultValue: false }, { key: "ignoreMethod", converter: webidl.converters.boolean, defaultValue: false }, { key: "ignoreVary", converter: webidl.converters.boolean, defaultValue: false } ]; webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ ...cacheQueryOptionConverters, { key: "cacheName", converter: webidl.converters.DOMString } ]); webidl.converters.Response = webidl.interfaceConverter(Response); webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.RequestInfo ); module2.exports = { Cache }; } }); // node_modules/undici/lib/cache/cachestorage.js var require_cachestorage = __commonJS({ "node_modules/undici/lib/cache/cachestorage.js"(exports2, module2) { "use strict"; var { kConstruct } = require_symbols4(); var { Cache } = require_cache(); var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); var CacheStorage = class _CacheStorage { static { __name(this, "CacheStorage"); } /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map * @type {Map} */ async has(cacheName) { webidl.brandCheck(this, _CacheStorage); webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.has" }); cacheName = webidl.converters.DOMString(cacheName); return this.#caches.has(cacheName); } /** * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open * @param {string} cacheName * @returns {Promise} */ async open(cacheName) { webidl.brandCheck(this, _CacheStorage); webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); cacheName = webidl.converters.DOMString(cacheName); if (this.#caches.has(cacheName)) { const cache3 = this.#caches.get(cacheName); return new Cache(kConstruct, cache3); } const cache2 = []; this.#caches.set(cacheName, cache2); return new Cache(kConstruct, cache2); } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete * @param {string} cacheName * @returns {Promise} */ async delete(cacheName) { webidl.brandCheck(this, _CacheStorage); webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.delete" }); cacheName = webidl.converters.DOMString(cacheName); return this.#caches.delete(cacheName); } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys * @returns {string[]} */ async keys() { webidl.brandCheck(this, _CacheStorage); const keys = this.#caches.keys(); return [...keys]; } }; Object.defineProperties(CacheStorage.prototype, { [Symbol.toStringTag]: { value: "CacheStorage", configurable: true }, match: kEnumerableProperty, has: kEnumerableProperty, open: kEnumerableProperty, delete: kEnumerableProperty, keys: kEnumerableProperty }); module2.exports = { CacheStorage }; } }); // node_modules/undici/lib/cookies/constants.js var require_constants5 = __commonJS({ "node_modules/undici/lib/cookies/constants.js"(exports2, module2) { "use strict"; var maxAttributeValueSize = 1024; var maxNameValuePairSize = 4096; module2.exports = { maxAttributeValueSize, maxNameValuePairSize }; } }); // node_modules/undici/lib/cookies/util.js var require_util6 = __commonJS({ "node_modules/undici/lib/cookies/util.js"(exports2, module2) { "use strict"; function isCTLExcludingHtab(value) { if (value.length === 0) { return false; } for (const char of value) { const code = char.charCodeAt(0); if (code >= 0 || code <= 8 || (code >= 10 || code <= 31) || code === 127) { return false; } } } __name(isCTLExcludingHtab, "isCTLExcludingHtab"); function validateCookieName(name) { for (const char of name) { const code = char.charCodeAt(0); if (code <= 32 || code > 127 || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === '"' || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") { throw new Error("Invalid cookie name"); } } } __name(validateCookieName, "validateCookieName"); function validateCookieValue(value) { for (const char of value) { const code = char.charCodeAt(0); if (code < 33 || // exclude CTLs (0-31) code === 34 || code === 44 || code === 59 || code === 92 || code > 126) { throw new Error("Invalid header value"); } } } __name(validateCookieValue, "validateCookieValue"); function validateCookiePath(path2) { for (const char of path2) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); } } } __name(validateCookiePath, "validateCookiePath"); function validateCookieDomain(domain) { if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) { throw new Error("Invalid cookie domain"); } } __name(validateCookieDomain, "validateCookieDomain"); function toIMFDate(date) { if (typeof date === "number") { date = new Date(date); } const days = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ]; const months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]; const dayName = days[date.getUTCDay()]; const day = date.getUTCDate().toString().padStart(2, "0"); const month = months[date.getUTCMonth()]; const year = date.getUTCFullYear(); const hour = date.getUTCHours().toString().padStart(2, "0"); const minute = date.getUTCMinutes().toString().padStart(2, "0"); const second = date.getUTCSeconds().toString().padStart(2, "0"); return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; } __name(toIMFDate, "toIMFDate"); function validateCookieMaxAge(maxAge) { if (maxAge < 0) { throw new Error("Invalid cookie max-age"); } } __name(validateCookieMaxAge, "validateCookieMaxAge"); function stringify(cookie) { if (cookie.name.length === 0) { return null; } validateCookieName(cookie.name); validateCookieValue(cookie.value); const out = [`${cookie.name}=${cookie.value}`]; if (cookie.name.startsWith("__Secure-")) { cookie.secure = true; } if (cookie.name.startsWith("__Host-")) { cookie.secure = true; cookie.domain = null; cookie.path = "/"; } if (cookie.secure) { out.push("Secure"); } if (cookie.httpOnly) { out.push("HttpOnly"); } if (typeof cookie.maxAge === "number") { validateCookieMaxAge(cookie.maxAge); out.push(`Max-Age=${cookie.maxAge}`); } if (cookie.domain) { validateCookieDomain(cookie.domain); out.push(`Domain=${cookie.domain}`); } if (cookie.path) { validateCookiePath(cookie.path); out.push(`Path=${cookie.path}`); } if (cookie.expires && cookie.expires.toString() !== "Invalid Date") { out.push(`Expires=${toIMFDate(cookie.expires)}`); } if (cookie.sameSite) { out.push(`SameSite=${cookie.sameSite}`); } for (const part of cookie.unparsed) { if (!part.includes("=")) { throw new Error("Invalid unparsed"); } const [key, ...value] = part.split("="); out.push(`${key.trim()}=${value.join("=")}`); } return out.join("; "); } __name(stringify, "stringify"); module2.exports = { isCTLExcludingHtab, validateCookieName, validateCookiePath, validateCookieValue, toIMFDate, stringify }; } }); // node_modules/undici/lib/cookies/parse.js var require_parse2 = __commonJS({ "node_modules/undici/lib/cookies/parse.js"(exports2, module2) { "use strict"; var { maxNameValuePairSize, maxAttributeValueSize } = require_constants5(); var { isCTLExcludingHtab } = require_util6(); var { collectASequenceOfCodePointsFast } = require_dataURL(); var assert = require("assert"); function parseSetCookie(header) { if (isCTLExcludingHtab(header)) { return null; } let nameValuePair = ""; let unparsedAttributes = ""; let name = ""; let value = ""; if (header.includes(";")) { const position = { position: 0 }; nameValuePair = collectASequenceOfCodePointsFast(";", header, position); unparsedAttributes = header.slice(position.position); } else { nameValuePair = header; } if (!nameValuePair.includes("=")) { value = nameValuePair; } else { const position = { position: 0 }; name = collectASequenceOfCodePointsFast( "=", nameValuePair, position ); value = nameValuePair.slice(position.position + 1); } name = name.trim(); value = value.trim(); if (name.length + value.length > maxNameValuePairSize) { return null; } return { name, value, ...parseUnparsedAttributes(unparsedAttributes) }; } __name(parseSetCookie, "parseSetCookie"); function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { if (unparsedAttributes.length === 0) { return cookieAttributeList; } assert(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; if (unparsedAttributes.includes(";")) { cookieAv = collectASequenceOfCodePointsFast( ";", unparsedAttributes, { position: 0 } ); unparsedAttributes = unparsedAttributes.slice(cookieAv.length); } else { cookieAv = unparsedAttributes; unparsedAttributes = ""; } let attributeName = ""; let attributeValue = ""; if (cookieAv.includes("=")) { const position = { position: 0 }; attributeName = collectASequenceOfCodePointsFast( "=", cookieAv, position ); attributeValue = cookieAv.slice(position.position + 1); } else { attributeName = cookieAv; } attributeName = attributeName.trim(); attributeValue = attributeValue.trim(); if (attributeValue.length > maxAttributeValueSize) { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } const attributeNameLowercase = attributeName.toLowerCase(); if (attributeNameLowercase === "expires") { const expiryTime = new Date(attributeValue); cookieAttributeList.expires = expiryTime; } else if (attributeNameLowercase === "max-age") { const charCode = attributeValue.charCodeAt(0); if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } if (!/^\d+$/.test(attributeValue)) { return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } const deltaSeconds = Number(attributeValue); cookieAttributeList.maxAge = deltaSeconds; } else if (attributeNameLowercase === "domain") { let cookieDomain = attributeValue; if (cookieDomain[0] === ".") { cookieDomain = cookieDomain.slice(1); } cookieDomain = cookieDomain.toLowerCase(); cookieAttributeList.domain = cookieDomain; } else if (attributeNameLowercase === "path") { let cookiePath = ""; if (attributeValue.length === 0 || attributeValue[0] !== "/") { cookiePath = "/"; } else { cookiePath = attributeValue; } cookieAttributeList.path = cookiePath; } else if (attributeNameLowercase === "secure") { cookieAttributeList.secure = true; } else if (attributeNameLowercase === "httponly") { cookieAttributeList.httpOnly = true; } else if (attributeNameLowercase === "samesite") { let enforcement = "Default"; const attributeValueLowercase = attributeValue.toLowerCase(); if (attributeValueLowercase.includes("none")) { enforcement = "None"; } if (attributeValueLowercase.includes("strict")) { enforcement = "Strict"; } if (attributeValueLowercase.includes("lax")) { enforcement = "Lax"; } cookieAttributeList.sameSite = enforcement; } else { cookieAttributeList.unparsed ??= []; cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); } return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } __name(parseUnparsedAttributes, "parseUnparsedAttributes"); module2.exports = { parseSetCookie, parseUnparsedAttributes }; } }); // node_modules/undici/lib/cookies/index.js var require_cookies = __commonJS({ "node_modules/undici/lib/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse2(); var { stringify } = require_util6(); var { webidl } = require_webidl(); var { Headers } = require_headers(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, { header: "getCookies" }); webidl.brandCheck(headers, Headers, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { return out; } for (const piece of cookie.split(";")) { const [name, ...value] = piece.split("="); out[name.trim()] = value.join("="); } return out; } __name(getCookies, "getCookies"); function deleteCookie(headers, name, attributes) { webidl.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); webidl.brandCheck(headers, Headers, { strict: false }); name = webidl.converters.DOMString(name); attributes = webidl.converters.DeleteCookieAttributes(attributes); setCookie(headers, { name, value: "", expires: /* @__PURE__ */ new Date(0), ...attributes }); } __name(deleteCookie, "deleteCookie"); function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); webidl.brandCheck(headers, Headers, { strict: false }); const cookies = headers.getSetCookie(); if (!cookies) { return []; } return cookies.map((pair) => parseSetCookie(pair)); } __name(getSetCookies, "getSetCookies"); function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); const str = stringify(cookie); if (str) { headers.append("Set-Cookie", stringify(cookie)); } } __name(setCookie, "setCookie"); webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ { converter: webidl.nullableConverter(webidl.converters.DOMString), key: "path", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: "domain", defaultValue: null } ]); webidl.converters.Cookie = webidl.dictionaryConverter([ { converter: webidl.converters.DOMString, key: "name" }, { converter: webidl.converters.DOMString, key: "value" }, { converter: webidl.nullableConverter((value) => { if (typeof value === "number") { return webidl.converters["unsigned long long"](value); } return new Date(value); }), key: "expires", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters["long long"]), key: "maxAge", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: "domain", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters.DOMString), key: "path", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters.boolean), key: "secure", defaultValue: null }, { converter: webidl.nullableConverter(webidl.converters.boolean), key: "httpOnly", defaultValue: null }, { converter: webidl.converters.USVString, key: "sameSite", allowedValues: ["Strict", "Lax", "None"] }, { converter: webidl.sequenceConverter(webidl.converters.DOMString), key: "unparsed", defaultValue: [] } ]); module2.exports = { getCookies, deleteCookie, getSetCookies, setCookie }; } }); // node_modules/undici/lib/websocket/constants.js var require_constants6 = __commonJS({ "node_modules/undici/lib/websocket/constants.js"(exports2, module2) { "use strict"; var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; var staticPropertyDescriptors = { enumerable: true, writable: false, configurable: false }; var states = { CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 }; var opcodes = { CONTINUATION: 0, TEXT: 1, BINARY: 2, CLOSE: 8, PING: 9, PONG: 10 }; var maxUnsigned16Bit = 2 ** 16 - 1; var parserStates = { INFO: 0, PAYLOADLENGTH_16: 2, PAYLOADLENGTH_64: 3, READ_DATA: 4 }; var emptyBuffer = Buffer.allocUnsafe(0); module2.exports = { uid, staticPropertyDescriptors, states, opcodes, maxUnsigned16Bit, parserStates, emptyBuffer }; } }); // node_modules/undici/lib/websocket/symbols.js var require_symbols5 = __commonJS({ "node_modules/undici/lib/websocket/symbols.js"(exports2, module2) { "use strict"; module2.exports = { kWebSocketURL: Symbol("url"), kReadyState: Symbol("ready state"), kController: Symbol("controller"), kResponse: Symbol("response"), kBinaryType: Symbol("binary type"), kSentClose: Symbol("sent close"), kReceivedClose: Symbol("received close"), kByteParser: Symbol("byte parser") }; } }); // node_modules/undici/lib/websocket/events.js var require_events = __commonJS({ "node_modules/undici/lib/websocket/events.js"(exports2, module2) { "use strict"; var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); var { MessagePort } = require("worker_threads"); var MessageEvent = class _MessageEvent extends Event { static { __name(this, "MessageEvent"); } #eventInit; constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.MessageEventInit(eventInitDict); super(type, eventInitDict); this.#eventInit = eventInitDict; } get data() { webidl.brandCheck(this, _MessageEvent); return this.#eventInit.data; } get origin() { webidl.brandCheck(this, _MessageEvent); return this.#eventInit.origin; } get lastEventId() { webidl.brandCheck(this, _MessageEvent); return this.#eventInit.lastEventId; } get source() { webidl.brandCheck(this, _MessageEvent); return this.#eventInit.source; } get ports() { webidl.brandCheck(this, _MessageEvent); if (!Object.isFrozen(this.#eventInit.ports)) { Object.freeze(this.#eventInit.ports); } return this.#eventInit.ports; } initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); return new _MessageEvent(type, { bubbles, cancelable, data, origin, lastEventId, source, ports }); } }; var CloseEvent = class _CloseEvent extends Event { static { __name(this, "CloseEvent"); } #eventInit; constructor(type, eventInitDict = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); super(type, eventInitDict); this.#eventInit = eventInitDict; } get wasClean() { webidl.brandCheck(this, _CloseEvent); return this.#eventInit.wasClean; } get code() { webidl.brandCheck(this, _CloseEvent); return this.#eventInit.code; } get reason() { webidl.brandCheck(this, _CloseEvent); return this.#eventInit.reason; } }; var ErrorEvent = class _ErrorEvent extends Event { static { __name(this, "ErrorEvent"); } #eventInit; constructor(type, eventInitDict) { webidl.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); super(type, eventInitDict); type = webidl.converters.DOMString(type); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } get message() { webidl.brandCheck(this, _ErrorEvent); return this.#eventInit.message; } get filename() { webidl.brandCheck(this, _ErrorEvent); return this.#eventInit.filename; } get lineno() { webidl.brandCheck(this, _ErrorEvent); return this.#eventInit.lineno; } get colno() { webidl.brandCheck(this, _ErrorEvent); return this.#eventInit.colno; } get error() { webidl.brandCheck(this, _ErrorEvent); return this.#eventInit.error; } }; Object.defineProperties(MessageEvent.prototype, { [Symbol.toStringTag]: { value: "MessageEvent", configurable: true }, data: kEnumerableProperty, origin: kEnumerableProperty, lastEventId: kEnumerableProperty, source: kEnumerableProperty, ports: kEnumerableProperty, initMessageEvent: kEnumerableProperty }); Object.defineProperties(CloseEvent.prototype, { [Symbol.toStringTag]: { value: "CloseEvent", configurable: true }, reason: kEnumerableProperty, code: kEnumerableProperty, wasClean: kEnumerableProperty }); Object.defineProperties(ErrorEvent.prototype, { [Symbol.toStringTag]: { value: "ErrorEvent", configurable: true }, message: kEnumerableProperty, filename: kEnumerableProperty, lineno: kEnumerableProperty, colno: kEnumerableProperty, error: kEnumerableProperty }); webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.MessagePort ); var eventInit = [ { key: "bubbles", converter: webidl.converters.boolean, defaultValue: false }, { key: "cancelable", converter: webidl.converters.boolean, defaultValue: false }, { key: "composed", converter: webidl.converters.boolean, defaultValue: false } ]; webidl.converters.MessageEventInit = webidl.dictionaryConverter([ ...eventInit, { key: "data", converter: webidl.converters.any, defaultValue: null }, { key: "origin", converter: webidl.converters.USVString, defaultValue: "" }, { key: "lastEventId", converter: webidl.converters.DOMString, defaultValue: "" }, { key: "source", // Node doesn't implement WindowProxy or ServiceWorker, so the only // valid value for source is a MessagePort. converter: webidl.nullableConverter(webidl.converters.MessagePort), defaultValue: null }, { key: "ports", converter: webidl.converters["sequence"], get defaultValue() { return []; } } ]); webidl.converters.CloseEventInit = webidl.dictionaryConverter([ ...eventInit, { key: "wasClean", converter: webidl.converters.boolean, defaultValue: false }, { key: "code", converter: webidl.converters["unsigned short"], defaultValue: 0 }, { key: "reason", converter: webidl.converters.USVString, defaultValue: "" } ]); webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ ...eventInit, { key: "message", converter: webidl.converters.DOMString, defaultValue: "" }, { key: "filename", converter: webidl.converters.USVString, defaultValue: "" }, { key: "lineno", converter: webidl.converters["unsigned long"], defaultValue: 0 }, { key: "colno", converter: webidl.converters["unsigned long"], defaultValue: 0 }, { key: "error", converter: webidl.converters.any } ]); module2.exports = { MessageEvent, CloseEvent, ErrorEvent }; } }); // node_modules/undici/lib/websocket/util.js var require_util7 = __commonJS({ "node_modules/undici/lib/websocket/util.js"(exports2, module2) { "use strict"; var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols5(); var { states, opcodes } = require_constants6(); var { MessageEvent, ErrorEvent } = require_events(); function isEstablished(ws) { return ws[kReadyState] === states.OPEN; } __name(isEstablished, "isEstablished"); function isClosing(ws) { return ws[kReadyState] === states.CLOSING; } __name(isClosing, "isClosing"); function isClosed(ws) { return ws[kReadyState] === states.CLOSED; } __name(isClosed, "isClosed"); function fireEvent(e, target, eventConstructor = Event, eventInitDict) { const event = new eventConstructor(e, eventInitDict); target.dispatchEvent(event); } __name(fireEvent, "fireEvent"); function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; if (type === opcodes.TEXT) { try { dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { dataForEvent = new Uint8Array(data).buffer; } } fireEvent("message", ws, MessageEvent, { origin: ws[kWebSocketURL].origin, data: dataForEvent }); } __name(websocketMessageReceived, "websocketMessageReceived"); function isValidSubprotocol(protocol) { if (protocol.length === 0) { return false; } for (const char of protocol) { const code = char.charCodeAt(0); if (code < 33 || code > 126 || char === "(" || char === ")" || char === "<" || char === ">" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === '"' || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}" || code === 32 || // SP code === 9) { return false; } } return true; } __name(isValidSubprotocol, "isValidSubprotocol"); function isValidStatusCode(code) { if (code >= 1e3 && code < 1015) { return code !== 1004 && // reserved code !== 1005 && // "MUST NOT be set as a status code" code !== 1006; } return code >= 3e3 && code <= 4999; } __name(isValidStatusCode, "isValidStatusCode"); function failWebsocketConnection(ws, reason) { const { [kController]: controller, [kResponse]: response } = ws; controller.abort(); if (response?.socket && !response.socket.destroyed) { response.socket.destroy(); } if (reason) { fireEvent("error", ws, ErrorEvent, { error: new Error(reason) }); } } __name(failWebsocketConnection, "failWebsocketConnection"); module2.exports = { isEstablished, isClosing, isClosed, fireEvent, isValidSubprotocol, isValidStatusCode, failWebsocketConnection, websocketMessageReceived }; } }); // node_modules/undici/lib/websocket/connection.js var require_connection = __commonJS({ "node_modules/undici/lib/websocket/connection.js"(exports2, module2) { "use strict"; var diagnosticsChannel = require("diagnostics_channel"); var { uid, states } = require_constants6(); var { kReadyState, kSentClose, kByteParser, kReceivedClose } = require_symbols5(); var { fireEvent, failWebsocketConnection } = require_util7(); var { CloseEvent } = require_events(); var { makeRequest } = require_request2(); var { fetching } = require_fetch(); var { Headers } = require_headers(); var { getGlobalDispatcher } = require_global2(); var { kHeadersList } = require_symbols(); var channels = {}; channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); var crypto2; try { crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { const requestURL = url; requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", referrer: "no-referrer", mode: "websocket", credentials: "include", cache: "no-store", redirect: "error" }); if (options.headers) { const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { request.headersList.append("sec-websocket-protocol", protocol); } const permessageDeflate = ""; const controller = fetching({ request, useParallelQueue: true, dispatcher: options.dispatcher ?? getGlobalDispatcher(), processResponse(response) { if (response.type === "error" || response.status !== 101) { failWebsocketConnection(ws, "Received network error or non-101 status code."); return; } if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { failWebsocketConnection(ws, "Server did not respond with sent protocols."); return; } if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".'); return; } if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".'); return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; } const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); if (secExtension !== null && secExtension !== permessageDeflate) { failWebsocketConnection(ws, "Received different permessage-deflate than the one set."); return; } const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); if (secProtocol !== null && secProtocol !== request.headersList.get("Sec-WebSocket-Protocol")) { failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); return; } response.socket.on("data", onSocketData); response.socket.on("close", onSocketClose); response.socket.on("error", onSocketError); if (channels.open.hasSubscribers) { channels.open.publish({ address: response.socket.address(), protocol: secProtocol, extensions: secExtension }); } onEstablish(response); } }); return controller; } __name(establishWebSocketConnection, "establishWebSocketConnection"); function onSocketData(chunk) { if (!this.ws[kByteParser].write(chunk)) { this.pause(); } } __name(onSocketData, "onSocketData"); function onSocketClose() { const { ws } = this; const wasClean = ws[kSentClose] && ws[kReceivedClose]; let code = 1005; let reason = ""; const result = ws[kByteParser].closingInfo; if (result) { code = result.code ?? 1005; reason = result.reason; } else if (!ws[kSentClose]) { code = 1006; } ws[kReadyState] = states.CLOSED; fireEvent("close", ws, CloseEvent, { wasClean, code, reason }); if (channels.close.hasSubscribers) { channels.close.publish({ websocket: ws, code, reason }); } } __name(onSocketClose, "onSocketClose"); function onSocketError(error) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { channels.socketError.publish(error); } this.destroy(); } __name(onSocketError, "onSocketError"); module2.exports = { establishWebSocketConnection }; } }); // node_modules/undici/lib/websocket/frame.js var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants6(); var crypto2; try { crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { static { __name(this, "WebsocketFrameSend"); } /** * @param {Buffer|undefined} data */ constructor(data) { this.frameData = data; this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; let payloadLength = bodyLength; let offset = 6; if (bodyLength > maxUnsigned16Bit) { offset += 8; payloadLength = 127; } else if (bodyLength > 125) { offset += 2; payloadLength = 126; } const buffer = Buffer.allocUnsafe(bodyLength + offset); buffer[0] = buffer[1] = 0; buffer[0] |= 128; buffer[0] = (buffer[0] & 240) + opcode; buffer[offset - 4] = this.maskKey[0]; buffer[offset - 3] = this.maskKey[1]; buffer[offset - 2] = this.maskKey[2]; buffer[offset - 1] = this.maskKey[3]; buffer[1] = payloadLength; if (payloadLength === 126) { buffer.writeUInt16BE(bodyLength, 2); } else if (payloadLength === 127) { buffer[2] = buffer[3] = 0; buffer.writeUIntBE(bodyLength, 4, 6); } buffer[1] |= 128; for (let i = 0; i < bodyLength; i++) { buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]; } return buffer; } }; module2.exports = { WebsocketFrameSend }; } }); // node_modules/undici/lib/websocket/receiver.js var require_receiver = __commonJS({ "node_modules/undici/lib/websocket/receiver.js"(exports2, module2) { "use strict"; var { Writable } = require("stream"); var diagnosticsChannel = require("diagnostics_channel"); var { parserStates, opcodes, states, emptyBuffer } = require_constants6(); var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols5(); var { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require_util7(); var { WebsocketFrameSend } = require_frame(); var channels = {}; channels.ping = diagnosticsChannel.channel("undici:websocket:ping"); channels.pong = diagnosticsChannel.channel("undici:websocket:pong"); var ByteParser = class extends Writable { static { __name(this, "ByteParser"); } #buffers = []; #byteOffset = 0; #state = parserStates.INFO; #info = {}; #fragments = []; constructor(ws) { super(); this.ws = ws; } /** * @param {Buffer} chunk * @param {() => void} callback */ _write(chunk, _, callback) { this.#buffers.push(chunk); this.#byteOffset += chunk.length; this.run(callback); } /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, * or not enough bytes are buffered to parse. */ run(callback) { while (true) { if (this.#state === parserStates.INFO) { if (this.#byteOffset < 2) { return callback(); } const buffer = this.consume(2); this.#info.fin = (buffer[0] & 128) !== 0; this.#info.opcode = buffer[0] & 15; this.#info.originalOpcode ??= this.#info.opcode; this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION; if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); return; } const payloadLength = buffer[1] & 127; if (payloadLength <= 125) { this.#info.payloadLength = payloadLength; this.#state = parserStates.READ_DATA; } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16; } else if (payloadLength === 127) { this.#state = parserStates.PAYLOADLENGTH_64; } if (this.#info.fragmented && payloadLength > 125) { failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); return; } else if ((this.#info.opcode === opcodes.PING || this.#info.opcode === opcodes.PONG || this.#info.opcode === opcodes.CLOSE) && payloadLength > 125) { failWebsocketConnection(this.ws, "Payload length for control frame exceeded 125 bytes."); return; } else if (this.#info.opcode === opcodes.CLOSE) { if (payloadLength === 1) { failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); return; } const body = this.consume(payloadLength); this.#info.closeInfo = this.parseCloseBody(false, body); if (!this.ws[kSentClose]) { const body2 = Buffer.allocUnsafe(2); body2.writeUInt16BE(this.#info.closeInfo.code, 0); const closeFrame = new WebsocketFrameSend(body2); this.ws[kResponse].socket.write( closeFrame.createFrame(opcodes.CLOSE), (err) => { if (!err) { this.ws[kSentClose] = true; } } ); } this.ws[kReadyState] = states.CLOSING; this.ws[kReceivedClose] = true; this.end(); return; } else if (this.#info.opcode === opcodes.PING) { const body = this.consume(payloadLength); if (!this.ws[kReceivedClose]) { const frame = new WebsocketFrameSend(body); this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); if (channels.ping.hasSubscribers) { channels.ping.publish({ payload: body }); } } this.#state = parserStates.INFO; if (this.#byteOffset > 0) { continue; } else { callback(); return; } } else if (this.#info.opcode === opcodes.PONG) { const body = this.consume(payloadLength); if (channels.pong.hasSubscribers) { channels.pong.publish({ payload: body }); } if (this.#byteOffset > 0) { continue; } else { callback(); return; } } } else if (this.#state === parserStates.PAYLOADLENGTH_16) { if (this.#byteOffset < 2) { return callback(); } const buffer = this.consume(2); this.#info.payloadLength = buffer.readUInt16BE(0); this.#state = parserStates.READ_DATA; } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback(); } const buffer = this.consume(8); const upper = buffer.readUInt32BE(0); if (upper > 2 ** 31 - 1) { failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); return; } const lower = buffer.readUInt32BE(4); this.#info.payloadLength = (upper << 8) + lower; this.#state = parserStates.READ_DATA; } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback(); } else if (this.#byteOffset >= this.#info.payloadLength) { const body = this.consume(this.#info.payloadLength); this.#fragments.push(body); if (!this.#info.fragmented || this.#info.fin && this.#info.opcode === opcodes.CONTINUATION) { const fullMessage = Buffer.concat(this.#fragments); websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage); this.#info = {}; this.#fragments.length = 0; } this.#state = parserStates.INFO; } } if (this.#byteOffset > 0) { continue; } else { callback(); break; } } } /** * Take n bytes from the buffered Buffers * @param {number} n * @returns {Buffer|null} */ consume(n) { if (n > this.#byteOffset) { return null; } else if (n === 0) { return emptyBuffer; } if (this.#buffers[0].length === n) { this.#byteOffset -= this.#buffers[0].length; return this.#buffers.shift(); } const buffer = Buffer.allocUnsafe(n); let offset = 0; while (offset !== n) { const next = this.#buffers[0]; const { length } = next; if (length + offset === n) { buffer.set(this.#buffers.shift(), offset); break; } else if (length + offset > n) { buffer.set(next.subarray(0, n - offset), offset); this.#buffers[0] = next.subarray(n - offset); break; } else { buffer.set(this.#buffers.shift(), offset); offset += next.length; } } this.#byteOffset -= n; return buffer; } parseCloseBody(onlyCode, data) { let code; if (data.length >= 2) { code = data.readUInt16BE(0); } if (onlyCode) { if (!isValidStatusCode(code)) { return null; } return { code }; } let reason = data.subarray(2); if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) { reason = reason.subarray(3); } if (code !== void 0 && !isValidStatusCode(code)) { return null; } try { reason = new TextDecoder("utf-8", { fatal: true }).decode(reason); } catch { return null; } return { code, reason }; } get closingInfo() { return this.#info.closeInfo; } }; module2.exports = { ByteParser }; } }); // node_modules/undici/lib/websocket/websocket.js var require_websocket = __commonJS({ "node_modules/undici/lib/websocket/websocket.js"(exports2, module2) { "use strict"; var { webidl } = require_webidl(); var { DOMException: DOMException2 } = require_constants3(); var { URLSerializer } = require_dataURL(); var { getGlobalOrigin } = require_global(); var { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require_constants6(); var { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols5(); var { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require_util7(); var { establishWebSocketConnection } = require_connection(); var { WebsocketFrameSend } = require_frame(); var { ByteParser } = require_receiver(); var { kEnumerableProperty, isBlobLike } = require_util(); var { getGlobalDispatcher } = require_global2(); var { types } = require("util"); var experimentalWarned = false; var WebSocket = class _WebSocket extends EventTarget { static { __name(this, "WebSocket"); } #events = { open: null, error: null, close: null, message: null }; #bufferedAmount = 0; #protocol = ""; #extensions = ""; /** * @param {string} url * @param {string|string[]} protocols */ constructor(url, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { experimentalWarned = true; process.emitWarning("WebSockets are experimental, expect them to change at any time.", { code: "UNDICI-WS" }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); url = webidl.converters.USVString(url); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { urlRecord = new URL(url, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } if (urlRecord.protocol === "http:") { urlRecord.protocol = "ws:"; } else if (urlRecord.protocol === "https:") { urlRecord.protocol = "wss:"; } if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") { throw new DOMException2( `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError" ); } if (urlRecord.hash || urlRecord.href.endsWith("#")) { throw new DOMException2("Got fragment", "SyntaxError"); } if (typeof protocols === "string") { protocols = [protocols]; } if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { throw new DOMException2("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { throw new DOMException2("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } this[kWebSocketURL] = new URL(urlRecord.href); this[kController] = establishWebSocketConnection( urlRecord, protocols, this, (response) => this.#onConnectionEstablished(response), options ); this[kReadyState] = _WebSocket.CONNECTING; this[kBinaryType] = "blob"; } /** * @see https://websockets.spec.whatwg.org/#dom-websocket-close * @param {number|undefined} code * @param {string|undefined} reason */ close(code = void 0, reason = void 0) { webidl.brandCheck(this, _WebSocket); if (code !== void 0) { code = webidl.converters["unsigned short"](code, { clamp: true }); } if (reason !== void 0) { reason = webidl.converters.USVString(reason); } if (code !== void 0) { if (code !== 1e3 && (code < 3e3 || code > 4999)) { throw new DOMException2("invalid code", "InvalidAccessError"); } } let reasonByteLength = 0; if (reason !== void 0) { reasonByteLength = Buffer.byteLength(reason); if (reasonByteLength > 123) { throw new DOMException2( `Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError" ); } } if (this[kReadyState] === _WebSocket.CLOSING || this[kReadyState] === _WebSocket.CLOSED) { } else if (!isEstablished(this)) { failWebsocketConnection(this, "Connection was closed before it was established."); this[kReadyState] = _WebSocket.CLOSING; } else if (!isClosing(this)) { const frame = new WebsocketFrameSend(); if (code !== void 0 && reason === void 0) { frame.frameData = Buffer.allocUnsafe(2); frame.frameData.writeUInt16BE(code, 0); } else if (code !== void 0 && reason !== void 0) { frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); frame.frameData.writeUInt16BE(code, 0); frame.frameData.write(reason, 2, "utf-8"); } else { frame.frameData = emptyBuffer; } const socket = this[kResponse].socket; socket.write(frame.createFrame(opcodes.CLOSE), (err) => { if (!err) { this[kSentClose] = true; } }); this[kReadyState] = states.CLOSING; } else { this[kReadyState] = _WebSocket.CLOSING; } } /** * @see https://websockets.spec.whatwg.org/#dom-websocket-send * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data */ send(data) { webidl.brandCheck(this, _WebSocket); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket.send" }); data = webidl.converters.WebSocketSendData(data); if (this[kReadyState] === _WebSocket.CONNECTING) { throw new DOMException2("Sent before connected.", "InvalidStateError"); } if (!isEstablished(this) || isClosing(this)) { return; } const socket = this[kResponse].socket; if (typeof data === "string") { const value = Buffer.from(data); const frame = new WebsocketFrameSend(value); const buffer = frame.createFrame(opcodes.TEXT); this.#bufferedAmount += value.byteLength; socket.write(buffer, () => { this.#bufferedAmount -= value.byteLength; }); } else if (types.isArrayBuffer(data)) { const value = Buffer.from(data); const frame = new WebsocketFrameSend(value); const buffer = frame.createFrame(opcodes.BINARY); this.#bufferedAmount += value.byteLength; socket.write(buffer, () => { this.#bufferedAmount -= value.byteLength; }); } else if (ArrayBuffer.isView(data)) { const ab = Buffer.from(data, data.byteOffset, data.byteLength); const frame = new WebsocketFrameSend(ab); const buffer = frame.createFrame(opcodes.BINARY); this.#bufferedAmount += ab.byteLength; socket.write(buffer, () => { this.#bufferedAmount -= ab.byteLength; }); } else if (isBlobLike(data)) { const frame = new WebsocketFrameSend(); data.arrayBuffer().then((ab) => { const value = Buffer.from(ab); frame.frameData = value; const buffer = frame.createFrame(opcodes.BINARY); this.#bufferedAmount += value.byteLength; socket.write(buffer, () => { this.#bufferedAmount -= value.byteLength; }); }); } } get readyState() { webidl.brandCheck(this, _WebSocket); return this[kReadyState]; } get bufferedAmount() { webidl.brandCheck(this, _WebSocket); return this.#bufferedAmount; } get url() { webidl.brandCheck(this, _WebSocket); return URLSerializer(this[kWebSocketURL]); } get extensions() { webidl.brandCheck(this, _WebSocket); return this.#extensions; } get protocol() { webidl.brandCheck(this, _WebSocket); return this.#protocol; } get onopen() { webidl.brandCheck(this, _WebSocket); return this.#events.open; } set onopen(fn) { webidl.brandCheck(this, _WebSocket); if (this.#events.open) { this.removeEventListener("open", this.#events.open); } if (typeof fn === "function") { this.#events.open = fn; this.addEventListener("open", fn); } else { this.#events.open = null; } } get onerror() { webidl.brandCheck(this, _WebSocket); return this.#events.error; } set onerror(fn) { webidl.brandCheck(this, _WebSocket); if (this.#events.error) { this.removeEventListener("error", this.#events.error); } if (typeof fn === "function") { this.#events.error = fn; this.addEventListener("error", fn); } else { this.#events.error = null; } } get onclose() { webidl.brandCheck(this, _WebSocket); return this.#events.close; } set onclose(fn) { webidl.brandCheck(this, _WebSocket); if (this.#events.close) { this.removeEventListener("close", this.#events.close); } if (typeof fn === "function") { this.#events.close = fn; this.addEventListener("close", fn); } else { this.#events.close = null; } } get onmessage() { webidl.brandCheck(this, _WebSocket); return this.#events.message; } set onmessage(fn) { webidl.brandCheck(this, _WebSocket); if (this.#events.message) { this.removeEventListener("message", this.#events.message); } if (typeof fn === "function") { this.#events.message = fn; this.addEventListener("message", fn); } else { this.#events.message = null; } } get binaryType() { webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } set binaryType(type) { webidl.brandCheck(this, _WebSocket); if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { this[kBinaryType] = type; } } /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol */ #onConnectionEstablished(response) { this[kResponse] = response; const parser = new ByteParser(this); parser.on("drain", /* @__PURE__ */ __name(function onParserDrain() { this.ws[kResponse].socket.resume(); }, "onParserDrain")); response.socket.ws = this; this[kByteParser] = parser; this[kReadyState] = states.OPEN; const extensions = response.headersList.get("sec-websocket-extensions"); if (extensions !== null) { this.#extensions = extensions; } const protocol = response.headersList.get("sec-websocket-protocol"); if (protocol !== null) { this.#protocol = protocol; } fireEvent("open", this); } }; WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; Object.defineProperties(WebSocket.prototype, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, CLOSED: staticPropertyDescriptors, url: kEnumerableProperty, readyState: kEnumerableProperty, bufferedAmount: kEnumerableProperty, onopen: kEnumerableProperty, onerror: kEnumerableProperty, onclose: kEnumerableProperty, close: kEnumerableProperty, onmessage: kEnumerableProperty, binaryType: kEnumerableProperty, send: kEnumerableProperty, extensions: kEnumerableProperty, protocol: kEnumerableProperty, [Symbol.toStringTag]: { value: "WebSocket", writable: false, enumerable: false, configurable: true } }); Object.defineProperties(WebSocket, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, CLOSED: staticPropertyDescriptors }); webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.DOMString ); webidl.converters["DOMString or sequence"] = function(V) { if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) { return webidl.converters["sequence"](V); } return webidl.converters.DOMString(V); }; webidl.converters.WebSocketInit = webidl.dictionaryConverter([ { key: "protocols", converter: webidl.converters["DOMString or sequence"], get defaultValue() { return []; } }, { key: "dispatcher", converter: (V) => V, get defaultValue() { return getGlobalDispatcher(); } }, { key: "headers", converter: webidl.nullableConverter(webidl.converters.HeadersInit) } ]); webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) { return webidl.converters.WebSocketInit(V); } return { protocols: webidl.converters["DOMString or sequence"](V) }; }; webidl.converters.WebSocketSendData = function(V) { if (webidl.util.Type(V) === "Object") { if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { return webidl.converters.BufferSource(V); } } return webidl.converters.USVString(V); }; module2.exports = { WebSocket }; } }); // node_modules/undici/index.js var require_undici = __commonJS({ "node_modules/undici/index.js"(exports2, module2) { "use strict"; var Client = require_client(); var Dispatcher = require_dispatcher(); var errors = require_errors(); var Pool = require_pool(); var BalancedPool = require_balanced_pool(); var Agent = require_agent(); var util = require_util(); var { InvalidArgumentError } = errors; var api = require_api(); var buildConnector = require_connect(); var MockClient = require_mock_client(); var MockAgent = require_mock_agent(); var MockPool = require_mock_pool(); var mockErrors = require_mock_errors(); var ProxyAgent = require_proxy_agent(); var RetryHandler = require_RetryHandler(); var { getGlobalDispatcher, setGlobalDispatcher } = require_global2(); var DecoratorHandler = require_DecoratorHandler(); var RedirectHandler = require_RedirectHandler(); var createRedirectInterceptor = require_redirectInterceptor(); var hasCrypto; try { require("crypto"); hasCrypto = true; } catch { hasCrypto = false; } Object.assign(Dispatcher.prototype, api); module2.exports.Dispatcher = Dispatcher; module2.exports.Client = Client; module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; module2.exports.Agent = Agent; module2.exports.ProxyAgent = ProxyAgent; module2.exports.RetryHandler = RetryHandler; module2.exports.DecoratorHandler = DecoratorHandler; module2.exports.RedirectHandler = RedirectHandler; module2.exports.createRedirectInterceptor = createRedirectInterceptor; module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { return (url, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); } if (opts && opts.path != null) { if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } let path2 = opts.path; if (!opts.path.startsWith("/")) { path2 = `/${path2}`; } url = new URL(util.parseOrigin(url).origin + path2); } else { if (!opts) { opts = typeof url === "object" ? url : {}; } url = util.parseURL(url); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); } return fn.call(dispatcher, { ...opts, origin: url.origin, path: url.search ? `${url.pathname}${url.search}` : url.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; } __name(makeDispatcher, "makeDispatcher"); module2.exports.setGlobalDispatcher = setGlobalDispatcher; module2.exports.getGlobalDispatcher = getGlobalDispatcher; if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { let fetchImpl = null; module2.exports.fetch = /* @__PURE__ */ __name(async function fetch(resource) { if (!fetchImpl) { fetchImpl = require_fetch().fetch; } try { return await fetchImpl(...arguments); } catch (err) { if (typeof err === "object") { Error.captureStackTrace(err, this); } throw err; } }, "fetch"); module2.exports.Headers = require_headers().Headers; module2.exports.Response = require_response().Response; module2.exports.Request = require_request2().Request; module2.exports.FormData = require_formdata().FormData; module2.exports.File = require_file().File; module2.exports.FileReader = require_filereader().FileReader; const { setGlobalOrigin, getGlobalOrigin } = require_global(); module2.exports.setGlobalOrigin = setGlobalOrigin; module2.exports.getGlobalOrigin = getGlobalOrigin; const { CacheStorage } = require_cachestorage(); const { kConstruct } = require_symbols4(); module2.exports.caches = new CacheStorage(kConstruct); } if (util.nodeMajor >= 16) { const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); module2.exports.deleteCookie = deleteCookie; module2.exports.getCookies = getCookies; module2.exports.getSetCookies = getSetCookies; module2.exports.setCookie = setCookie; const { parseMIMEType, serializeAMimeType } = require_dataURL(); module2.exports.parseMIMEType = parseMIMEType; module2.exports.serializeAMimeType = serializeAMimeType; } if (util.nodeMajor >= 18 && hasCrypto) { const { WebSocket } = require_websocket(); module2.exports.WebSocket = WebSocket; } module2.exports.request = makeDispatcher(api.request); module2.exports.stream = makeDispatcher(api.stream); module2.exports.pipeline = makeDispatcher(api.pipeline); module2.exports.connect = makeDispatcher(api.connect); module2.exports.upgrade = makeDispatcher(api.upgrade); module2.exports.MockClient = MockClient; module2.exports.MockPool = MockPool; module2.exports.MockAgent = MockAgent; module2.exports.mockErrors = mockErrors; } }); // node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; var http = __importStar2(require("http")); var https = __importStar2(require("https")); var pm = __importStar2(require_proxy()); var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); var Headers; (function(Headers2) { Headers2["Accept"] = "accept"; Headers2["ContentType"] = "content-type"; })(Headers || (exports2.Headers = Headers = {})); var MediaTypes; (function(MediaTypes2) { MediaTypes2["ApplicationJson"] = "application/json"; })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); function getProxyUrl(serverUrl) { const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } __name(getProxyUrl, "getProxyUrl"); exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect ]; var HttpResponseRetryCodes = [ HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout ]; var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; var ExponentialBackoffCeiling = 10; var ExponentialBackoffTimeSlice = 5; var HttpClientError = class _HttpClientError extends Error { static { __name(this, "HttpClientError"); } constructor(message, statusCode) { super(message); this.name = "HttpClientError"; this.statusCode = statusCode; Object.setPrototypeOf(this, _HttpClientError.prototype); } }; exports2.HttpClientError = HttpClientError; var HttpClientResponse = class { static { __name(this, "HttpClientResponse"); } constructor(message) { this.message = message; } readBody() { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { resolve(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { resolve(Buffer.concat(chunks)); }); })); }); } }; exports2.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } __name(isHttps, "isHttps"); exports2.isHttps = isHttps; var HttpClient = class { static { __name(this, "HttpClient"); } constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; this._allowRedirects = true; this._allowRedirectDowngrade = false; this._maxRedirects = 50; this._allowRetries = false; this._maxRetries = 1; this._keepAlive = false; this._disposed = false; this.userAgent = userAgent; this.handlers = handlers || []; this.requestOptions = requestOptions; if (requestOptions) { if (requestOptions.ignoreSslError != null) { this._ignoreSslError = requestOptions.ignoreSslError; } this._socketTimeout = requestOptions.socketTimeout; if (requestOptions.allowRedirects != null) { this._allowRedirects = requestOptions.allowRedirects; } if (requestOptions.allowRedirectDowngrade != null) { this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; } if (requestOptions.maxRedirects != null) { this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); } if (requestOptions.keepAlive != null) { this._keepAlive = requestOptions.keepAlive; } if (requestOptions.allowRetries != null) { this._allowRetries = requestOptions.allowRetries; } if (requestOptions.maxRetries != null) { this._maxRetries = requestOptions.maxRetries; } } } options(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } /** * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } putJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } patchJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } /** * Makes a raw http request. * All other methods such as get, post, patch, and request ultimately call this. * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); let info = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { response = yield this.requestRaw(info, data); if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { let authenticationHandler; for (const handler of this.handlers) { if (handler.canHandleAuthentication(response)) { authenticationHandler = handler; break; } } if (authenticationHandler) { return authenticationHandler.handleAuthentication(this, info, data); } else { return response; } } let redirectsRemaining = this._maxRedirects; while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { const redirectUrl = response.message.headers["location"]; if (!redirectUrl) { break; } const parsedRedirectUrl = new URL(redirectUrl); if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); } yield response.readBody(); if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { for (const header in headers) { if (header.toLowerCase() === "authorization") { delete headers[header]; } } } info = this._prepareRequest(verb, parsedRedirectUrl, headers); response = yield this.requestRaw(info, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { return response; } numTries += 1; if (numTries < maxTries) { yield response.readBody(); yield this._performExponentialBackoff(numTries); } } while (numTries < maxTries); return response; }); } /** * Needs to be called if keepAlive is set to true in request options. */ dispose() { if (this._agent) { this._agent.destroy(); } this._disposed = true; } /** * Raw request. * @param info * @param data */ requestRaw(info, data) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { resolve(res); } } __name(callbackForResult, "callbackForResult"); this.requestRawWithCallback(info, data, callbackForResult); }); }); } /** * Raw request with callback. * @param info * @param data * @param onResult */ requestRawWithCallback(info, data, onResult) { if (typeof data === "string") { if (!info.options.headers) { info.options.headers = {}; } info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); } } __name(handleResult, "handleResult"); const req = info.httpModule.request(info.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); }); let socket; req.on("socket", (sock) => { socket = sock; }); req.setTimeout(this._socketTimeout || 3 * 6e4, () => { if (socket) { socket.end(); } handleResult(new Error(`Request timeout: ${info.options.path}`)); }); req.on("error", function(err) { handleResult(err); }); if (data && typeof data === "string") { req.write(data, "utf8"); } if (data && typeof data !== "string") { data.on("close", function() { req.end(); }); data.pipe(req); } else { req.end(); } } /** * Gets an http agent. This function is useful when you need an http agent that handles * routing through a proxy server - depending upon the url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com */ getAgent(serverUrl) { const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } getAgentDispatcher(serverUrl) { const parsedUrl = new URL(serverUrl); const proxyUrl = pm.getProxyUrl(parsedUrl); const useProxy = proxyUrl && proxyUrl.hostname; if (!useProxy) { return; } return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); } _prepareRequest(method, requestUrl, headers) { const info = {}; info.parsedUrl = requestUrl; const usingSsl = info.parsedUrl.protocol === "https:"; info.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; info.options = {}; info.options.host = info.parsedUrl.hostname; info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); info.options.method = method; info.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { info.options.headers["user-agent"] = this.userAgent; } info.options.agent = this._getAgent(info.parsedUrl); if (this.handlers) { for (const handler of this.handlers) { handler.prepareRequest(info.options); } } return info; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); } return lowercaseKeys(headers || {}); } _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; } return additionalHeaders[header] || clientHeader || _default; } _getAgent(parsedUrl) { let agent; const proxyUrl = pm.getProxyUrl(parsedUrl); const useProxy = proxyUrl && proxyUrl.hostname; if (this._keepAlive && useProxy) { agent = this._proxyAgent; } if (!useProxy) { agent = this._agent; } if (agent) { return agent; } const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; if (this.requestOptions) { maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } if (proxyUrl && proxyUrl.hostname) { const agentOptions = { maxSockets, keepAlive: this._keepAlive, proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { host: proxyUrl.hostname, port: proxyUrl.port }) }; let tunnelAgent; const overHttps = proxyUrl.protocol === "https:"; if (usingSsl) { tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; } else { tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } agent = tunnelAgent(agentOptions); this._proxyAgent = agent; } if (!agent) { const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } if (usingSsl && this._ignoreSslError) { agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); } return agent; } _getProxyAgentDispatcher(parsedUrl, proxyUrl) { let proxyAgent; if (this._keepAlive) { proxyAgent = this._proxyAgentDispatcher; } if (proxyAgent) { return proxyAgent; } const usingSsl = parsedUrl.protocol === "https:"; proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); this._proxyAgentDispatcher = proxyAgent; if (usingSsl && this._ignoreSslError) { proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); } return proxyAgent; } _performExponentialBackoff(retryNumber) { return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, result: null, headers: {} }; if (statusCode === HttpCodes.NotFound) { resolve(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { const a = new Date(value); if (!isNaN(a.valueOf())) { return a; } } return value; } __name(dateTimeDeserializer, "dateTimeDeserializer"); let obj; let contents; try { contents = yield res.readBody(); if (contents && contents.length > 0) { if (options && options.deserializeDates) { obj = JSON.parse(contents, dateTimeDeserializer); } else { obj = JSON.parse(contents); } response.result = obj; } response.headers = res.message.headers; } catch (err) { } if (statusCode > 299) { let msg; if (obj && obj.message) { msg = obj.message; } else if (contents && contents.length > 0) { msg = contents; } else { msg = `Failed request: (${statusCode})`; } const err = new HttpClientError(msg, statusCode); err.result = response.result; reject(err); } else { resolve(response); } })); }); } }; exports2.HttpClient = HttpClient; var lowercaseKeys = /* @__PURE__ */ __name((obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}), "lowercaseKeys"); } }); // node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; var BasicCredentialHandler = class { static { __name(this, "BasicCredentialHandler"); } constructor(username, password) { this.username = username; this.password = password; } prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports2.BasicCredentialHandler = BasicCredentialHandler; var BearerCredentialHandler = class { static { __name(this, "BearerCredentialHandler"); } constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Bearer ${this.token}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports2.BearerCredentialHandler = BearerCredentialHandler; var PersonalAccessTokenCredentialHandler = class { static { __name(this, "PersonalAccessTokenCredentialHandler"); } constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } }); // node_modules/@actions/core/lib/oidc-utils.js var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.OidcClient = void 0; var http_client_1 = require_lib(); var auth_1 = require_auth(); var core_1 = require_core(); var OidcClient = class _OidcClient { static { __name(this, "OidcClient"); } static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, maxRetries: maxRetry }; return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); } static getRequestToken() { const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; if (!token) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); } return token; } static getIDTokenUrl() { const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; if (!runtimeUrl) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); } return runtimeUrl; } static getCall(id_token_url) { var _a; return __awaiter2(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error) => { throw new Error(`Failed to get ID Token. Error Code : ${error.statusCode} Error Message: ${error.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } return id_token; }); } static getIDToken(audience) { return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } (0, core_1.debug)(`ID token url is ${id_token_url}`); const id_token = yield _OidcClient.getCall(id_token_url); (0, core_1.setSecret)(id_token); return id_token; } catch (error) { throw new Error(`Error message: ${error.message}`); } }); } }; exports2.OidcClient = OidcClient; } }); // node_modules/@actions/core/lib/summary.js var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; var os_1 = require("os"); var fs_1 = require("fs"); var { access, appendFile, writeFile } = fs_1.promises; exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var Summary = class { static { __name(this, "Summary"); } constructor() { this._buffer = ""; } /** * Finds the summary file path from the environment, rejects if env var is not found or file does not exist * Also checks r/w permissions. * * @returns step summary file path */ filePath() { return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; if (!pathFromEnv) { throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); } catch (_a) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; return this._filePath; }); } /** * Wraps content in an HTML tag, adding any HTML attributes * * @param {string} tag HTML tag to wrap * @param {string | null} content content within the tag * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add * * @returns {string} content wrapped in HTML element */ wrap(tag, content, attrs = {}) { const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); if (!content) { return `<${tag}${htmlAttrs}>`; } return `<${tag}${htmlAttrs}>${content}`; } /** * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. * * @param {SummaryWriteOptions} [options] (optional) options for write operation * * @returns {Promise} summary instance */ write(options) { return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); return this.emptyBuffer(); }); } /** * Clears the summary buffer and wipes the summary file * * @returns {Summary} summary instance */ clear() { return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } /** * Returns the current summary buffer as a string * * @returns {string} string of summary buffer */ stringify() { return this._buffer; } /** * If the summary buffer is empty * * @returns {boolen} true if the buffer is empty */ isEmptyBuffer() { return this._buffer.length === 0; } /** * Resets the summary buffer without writing to summary file * * @returns {Summary} summary instance */ emptyBuffer() { this._buffer = ""; return this; } /** * Adds raw text to the summary buffer * * @param {string} text content to add * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) * * @returns {Summary} summary instance */ addRaw(text, addEOL = false) { this._buffer += text; return addEOL ? this.addEOL() : this; } /** * Adds the operating system-specific end-of-line marker to the buffer * * @returns {Summary} summary instance */ addEOL() { return this.addRaw(os_1.EOL); } /** * Adds an HTML codeblock to the summary buffer * * @param {string} code content to render within fenced code block * @param {string} lang (optional) language to syntax highlight code * * @returns {Summary} summary instance */ addCodeBlock(code, lang) { const attrs = Object.assign({}, lang && { lang }); const element = this.wrap("pre", this.wrap("code", code), attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML list to the summary buffer * * @param {string[]} items list of items to render * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) * * @returns {Summary} summary instance */ addList(items, ordered = false) { const tag = ordered ? "ol" : "ul"; const listItems = items.map((item) => this.wrap("li", item)).join(""); const element = this.wrap(tag, listItems); return this.addRaw(element).addEOL(); } /** * Adds an HTML table to the summary buffer * * @param {SummaryTableCell[]} rows table rows * * @returns {Summary} summary instance */ addTable(rows) { const tableBody = rows.map((row) => { const cells = row.map((cell) => { if (typeof cell === "string") { return this.wrap("td", cell); } const { header, data, colspan, rowspan } = cell; const tag = header ? "th" : "td"; const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); return this.wrap(tag, data, attrs); }).join(""); return this.wrap("tr", cells); }).join(""); const element = this.wrap("table", tableBody); return this.addRaw(element).addEOL(); } /** * Adds a collapsable HTML details element to the summary buffer * * @param {string} label text for the closed state * @param {string} content collapsable content * * @returns {Summary} summary instance */ addDetails(label, content) { const element = this.wrap("details", this.wrap("summary", label) + content); return this.addRaw(element).addEOL(); } /** * Adds an HTML image tag to the summary buffer * * @param {string} src path to the image you to embed * @param {string} alt text description of the image * @param {SummaryImageOptions} options (optional) addition image attributes * * @returns {Summary} summary instance */ addImage(src, alt, options) { const { width, height } = options || {}; const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); return this.addRaw(element).addEOL(); } /** * Adds an HTML section heading element * * @param {string} text heading text * @param {number | string} [level=1] (optional) the heading level, default: 1 * * @returns {Summary} summary instance */ addHeading(text, level) { const tag = `h${level}`; const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; const element = this.wrap(allowedTag, text); return this.addRaw(element).addEOL(); } /** * Adds an HTML thematic break (
) to the summary buffer * * @returns {Summary} summary instance */ addSeparator() { const element = this.wrap("hr", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML line break (
) to the summary buffer * * @returns {Summary} summary instance */ addBreak() { const element = this.wrap("br", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML blockquote to the summary buffer * * @param {string} text quote text * @param {string} cite (optional) citation url * * @returns {Summary} summary instance */ addQuote(text, cite) { const attrs = Object.assign({}, cite && { cite }); const element = this.wrap("blockquote", text, attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML anchor tag to the summary buffer * * @param {string} text link text/content * @param {string} href hyperlink * * @returns {Summary} summary instance */ addLink(text, href) { const element = this.wrap("a", text, { href }); return this.addRaw(element).addEOL(); } }; var _summary = new Summary(); exports2.markdownSummary = _summary; exports2.summary = _summary; } }); // node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } __name(toPosixPath, "toPosixPath"); exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } __name(toWin32Path, "toWin32Path"); exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } __name(toPlatformPath, "toPlatformPath"); exports2.toPlatformPath = toPlatformPath; } }); // node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; var fs = __importStar2(require("fs")); var path2 = __importStar2(require("path")); _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { yield exports2.stat(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; } throw err; } return true; }); } __name(exists, "exists"); exports2.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter2(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } __name(isDirectory, "isDirectory"); exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { throw new Error('isRooted() parameter "p" cannot be empty'); } if (exports2.IS_WINDOWS) { return p.startsWith("\\") || /^[A-Z]:/i.test(p); } return p.startsWith("/"); } __name(isRooted, "isRooted"); exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { stats = yield exports2.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { const upperExt = path2.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } } else { if (isUnixExecutable(stats)) { return filePath; } } } const originalFilePath = filePath; for (const extension of extensions) { filePath = originalFilePath + extension; stats = void 0; try { stats = yield exports2.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { const directory = path2.dirname(filePath); const upperName = path2.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path2.join(directory, actualName); break; } } } catch (err) { console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); } return filePath; } else { if (isUnixExecutable(stats)) { return filePath; } } } } return ""; }); } __name(tryGetExecutablePath, "tryGetExecutablePath"); exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { p = p.replace(/\//g, "\\"); return p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } __name(normalizeSeparators, "normalizeSeparators"); function isUnixExecutable(stats) { return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } __name(isUnixExecutable, "isUnixExecutable"); function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } __name(getCmdPath, "getCmdPath"); exports2.getCmdPath = getCmdPath; } }); // node_modules/@actions/io/lib/io.js var require_io = __commonJS({ "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); var path2 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { return; } const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } const sourceStat = yield ioUtil.stat(source); if (sourceStat.isDirectory()) { if (!recursive) { throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); } else { yield cpDirRecursive(source, newDest, 0, force); } } else { if (path2.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); } }); } __name(cp, "cp"); exports2.cp = cp; function mv(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { dest = path2.join(dest, path2.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { if (options.force == null || options.force) { yield rmRF(dest); } else { throw new Error("Destination already exists"); } } } yield mkdirP(path2.dirname(dest)); yield ioUtil.rename(source, dest); }); } __name(mv, "mv"); exports2.mv = mv; function rmRF(inputPath) { return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } } try { yield ioUtil.rm(inputPath, { force: true, maxRetries: 3, recursive: true, retryDelay: 300 }); } catch (err) { throw new Error(`File was unable to be removed ${err}`); } }); } __name(rmRF, "rmRF"); exports2.rmRF = rmRF; function mkdirP(fsPath) { return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } __name(mkdirP, "mkdirP"); exports2.mkdirP = mkdirP; function which(tool, check) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } if (check) { const result = yield which(tool, false); if (!result) { if (ioUtil.IS_WINDOWS) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } return result; } const matches = yield findInPath(tool); if (matches && matches.length > 0) { return matches[0]; } return ""; }); } __name(which, "which"); exports2.which = which; function findInPath(tool) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { if (extension) { extensions.push(extension); } } } if (ioUtil.isRooted(tool)) { const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); if (filePath) { return [filePath]; } return []; } if (tool.includes(path2.sep)) { return []; } const directories = []; if (process.env.PATH) { for (const p of process.env.PATH.split(path2.delimiter)) { if (p) { directories.push(p); } } } const matches = []; for (const directory of directories) { const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } } return matches; }); } __name(findInPath, "findInPath"); exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); return { force, recursive, copySourceDirectory }; } __name(readCopyOptions, "readCopyOptions"); function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; yield mkdirP(destDir); const files = yield ioUtil.readdir(sourceDir); for (const fileName of files) { const srcFile = `${sourceDir}/${fileName}`; const destFile = `${destDir}/${fileName}`; const srcFileStat = yield ioUtil.lstat(srcFile); if (srcFileStat.isDirectory()) { yield cpDirRecursive(srcFile, destFile, currentDepth, force); } else { yield copyFile(srcFile, destFile, force); } } yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } __name(cpDirRecursive, "cpDirRecursive"); function copyFile(srcFile, destFile, force) { return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); yield ioUtil.unlink(destFile); } catch (e) { if (e.code === "EPERM") { yield ioUtil.chmod(destFile, "0666"); yield ioUtil.unlink(destFile); } } const symlinkFull = yield ioUtil.readlink(srcFile); yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); } else if (!(yield ioUtil.exists(destFile)) || force) { yield ioUtil.copyFile(srcFile, destFile); } }); } __name(copyFile, "copyFile"); } }); // node_modules/@actions/exec/lib/toolrunner.js var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.argStringToArray = exports2.ToolRunner = void 0; var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); var path2 = __importStar2(require("path")); var io = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner = class extends events.EventEmitter { static { __name(this, "ToolRunner"); } constructor(toolPath, args, options) { super(); if (!toolPath) { throw new Error("Parameter 'toolPath' cannot be null or empty."); } this.toolPath = toolPath; this.args = args || []; this.options = options || {}; } _debug(message) { if (this.options.listeners && this.options.listeners.debug) { this.options.listeners.debug(message); } } _getCommandString(options, noPrefix) { const toolPath = this._getSpawnFileName(); const args = this._getSpawnArgs(options); let cmd = noPrefix ? "" : "[command]"; if (IS_WINDOWS) { if (this._isCmdFile()) { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } else if (options.windowsVerbatimArguments) { cmd += `"${toolPath}"`; for (const a of args) { cmd += ` ${a}`; } } else { cmd += this._windowsQuoteCmdArg(toolPath); for (const a of args) { cmd += ` ${this._windowsQuoteCmdArg(a)}`; } } } else { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } return cmd; } _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); s = s.substring(n + os2.EOL.length); n = s.indexOf(os2.EOL); } return s; } catch (err) { this._debug(`error processing line. Failed with error ${err}`); return ""; } } _getSpawnFileName() { if (IS_WINDOWS) { if (this._isCmdFile()) { return process.env["COMSPEC"] || "cmd.exe"; } } return this.toolPath; } _getSpawnArgs(options) { if (IS_WINDOWS) { if (this._isCmdFile()) { let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; for (const a of this.args) { argline += " "; argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); } argline += '"'; return [argline]; } } return this.args; } _endsWith(str, end) { return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); } _windowsQuoteCmdArg(arg) { if (!this._isCmdFile()) { return this._uvQuoteCmdArg(arg); } if (!arg) { return '""'; } const cmdSpecialChars = [ " ", " ", "&", "(", ")", "[", "]", "{", "}", "^", "=", ";", "!", "'", "+", ",", "`", "~", "|", "<", ">", '"' ]; let needsQuotes = false; for (const char of arg) { if (cmdSpecialChars.some((x) => x === char)) { needsQuotes = true; break; } } if (!needsQuotes) { return arg; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += '"'; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _uvQuoteCmdArg(arg) { if (!arg) { return '""'; } if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { return arg; } if (!arg.includes('"') && !arg.includes("\\")) { return `"${arg}"`; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += "\\"; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _cloneExecOptions(options) { options = options || {}; const result = { cwd: options.cwd || process.cwd(), env: options.env || process.env, silent: options.silent || false, windowsVerbatimArguments: options.windowsVerbatimArguments || false, failOnStdErr: options.failOnStdErr || false, ignoreReturnCode: options.ignoreReturnCode || false, delay: options.delay || 1e4 }; result.outStream = options.outStream || process.stdout; result.errStream = options.errStream || process.stderr; return result; } _getSpawnOptions(options, toolPath) { options = options || {}; const result = {}; result.cwd = options.cwd; result.env = options.env; result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); if (options.windowsVerbatimArguments) { result.argv0 = `"${toolPath}"`; } return result; } /** * Exec a tool. * Output will be streamed to the live console. * Returns promise with return code * * @param tool path to tool to exec * @param options optional exec options. See ExecOptions * @returns number */ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { this._debug(` ${arg}`); } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { this._debug(message); }); if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); } const fileName = this._getSpawnFileName(); const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); let stdbuffer = ""; if (cp.stdout) { cp.stdout.on("data", (data) => { if (this.options.listeners && this.options.listeners.stdout) { this.options.listeners.stdout(data); } if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } let errbuffer = ""; if (cp.stderr) { cp.stderr.on("data", (data) => { state.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; s.write(data); } errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } }); }); } cp.on("error", (err) => { state.processError = err.message; state.processExited = true; state.processClosed = true; state.CheckComplete(); }); cp.on("exit", (code) => { state.processExitCode = code; state.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); state.CheckComplete(); }); cp.on("close", (code) => { state.processExitCode = code; state.processExited = true; state.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); state.on("done", (error, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } if (errbuffer.length > 0) { this.emit("errline", errbuffer); } cp.removeAllListeners(); if (error) { reject(error); } else { resolve(exitCode); } }); if (this.options.input) { if (!cp.stdin) { throw new Error("child process missing stdin"); } cp.stdin.end(this.options.input); } })); }); } }; exports2.ToolRunner = ToolRunner; function argStringToArray(argString) { const args = []; let inQuotes = false; let escaped = false; let arg = ""; function append(c) { if (escaped && c !== '"') { arg += "\\"; } arg += c; escaped = false; } __name(append, "append"); for (let i = 0; i < argString.length; i++) { const c = argString.charAt(i); if (c === '"') { if (!escaped) { inQuotes = !inQuotes; } else { append(c); } continue; } if (c === "\\" && escaped) { append(c); continue; } if (c === "\\" && inQuotes) { escaped = true; continue; } if (c === " " && !inQuotes) { if (arg.length > 0) { args.push(arg); arg = ""; } continue; } append(c); } if (arg.length > 0) { args.push(arg.trim()); } return args; } __name(argStringToArray, "argStringToArray"); exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { static { __name(this, "ExecState"); } constructor(options, toolPath) { super(); this.processClosed = false; this.processError = ""; this.processExitCode = 0; this.processExited = false; this.processStderr = false; this.delay = 1e4; this.done = false; this.timeout = null; if (!toolPath) { throw new Error("toolPath must not be empty"); } this.options = options; this.toolPath = toolPath; if (options.delay) { this.delay = options.delay; } } CheckComplete() { if (this.done) { return; } if (this.processClosed) { this._setResult(); } else if (this.processExited) { this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { this.emit("debug", message); } _setResult() { let error; if (this.processExited) { if (this.processError) { error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { clearTimeout(this.timeout); this.timeout = null; } this.done = true; this.emit("done", error, this.processExitCode); } static HandleTimeout(state) { if (state.done) { return; } if (!state.processClosed && state.processExited) { const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; state._debug(message); } state._setResult(); } }; } }); // node_modules/@actions/exec/lib/exec.js var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExecOutput = exports2.exec = void 0; var string_decoder_1 = require("string_decoder"); var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); } const toolPath = commandArgs[0]; args = commandArgs.slice(1).concat(args || []); const runner = new tr.ToolRunner(toolPath, args, options); return runner.exec(); }); } __name(exec, "exec"); exports2.exec = exec; function getExecOutput(commandLine, args, options) { var _a, _b; return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = /* @__PURE__ */ __name((data) => { stderr += stderrDecoder.write(data); if (originalStdErrListener) { originalStdErrListener(data); } }, "stdErrListener"); const stdOutListener = /* @__PURE__ */ __name((data) => { stdout += stdoutDecoder.write(data); if (originalStdoutListener) { originalStdoutListener(data); } }, "stdOutListener"); const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); stdout += stdoutDecoder.end(); stderr += stderrDecoder.end(); return { exitCode, stdout, stderr }; }); } __name(getExecOutput, "getExecOutput"); exports2.getExecOutput = getExecOutput; } }); // node_modules/@actions/core/lib/platform.js var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; var os_1 = __importDefault2(require("os")); var exec = __importStar2(require_exec()); var getWindowsInfo = /* @__PURE__ */ __name(() => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { silent: true }); return { name: name.trim(), version: version.trim() }; }), "getWindowsInfo"); var getMacOsInfo = /* @__PURE__ */ __name(() => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; return { name, version }; }), "getMacOsInfo"); var getLinuxInfo = /* @__PURE__ */ __name(() => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); const [name, version] = stdout.trim().split("\n"); return { name, version }; }), "getLinuxInfo"); exports2.platform = os_1.default.platform(); exports2.arch = os_1.default.arch(); exports2.isWindows = exports2.platform === "win32"; exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, isWindows: exports2.isWindows, isMacOS: exports2.isMacOS, isLinux: exports2.isLinux }); }); } __name(getDetails, "getDetails"); exports2.getDetails = getDetails; } }); // node_modules/@actions/core/lib/core.js var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os2 = __importStar2(require("os")); var path2 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); function exportVariable(name, val) { const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } __name(exportVariable, "exportVariable"); exports2.exportVariable = exportVariable; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } __name(setSecret, "setSecret"); exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { (0, file_command_1.issueFileCommand)("PATH", inputPath); } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } __name(addPath, "addPath"); exports2.addPath = addPath; function getInput(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { return val; } return val.trim(); } __name(getInput, "getInput"); exports2.getInput = getInput; function getMultilineInput(name, options) { const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } return inputs.map((input) => input.trim()); } __name(getMultilineInput, "getMultilineInput"); exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const val = getInput(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } __name(getBooleanInput, "getBooleanInput"); exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); } process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } __name(setOutput, "setOutput"); exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } __name(setCommandEcho, "setCommandEcho"); exports2.setCommandEcho = setCommandEcho; function setFailed(message) { process.exitCode = ExitCode.Failure; error(message); } __name(setFailed, "setFailed"); exports2.setFailed = setFailed; function isDebug() { return process.env["RUNNER_DEBUG"] === "1"; } __name(isDebug, "isDebug"); exports2.isDebug = isDebug; function debug(message) { (0, command_1.issueCommand)("debug", {}, message); } __name(debug, "debug"); exports2.debug = debug; function error(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } __name(error, "error"); exports2.error = error; function warning(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } __name(warning, "warning"); exports2.warning = warning; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } __name(notice, "notice"); exports2.notice = notice; function info(message) { process.stdout.write(message + os2.EOL); } __name(info, "info"); exports2.info = info; function startGroup(name) { (0, command_1.issue)("group", name); } __name(startGroup, "startGroup"); exports2.startGroup = startGroup; function endGroup() { (0, command_1.issue)("endgroup"); } __name(endGroup, "endGroup"); exports2.endGroup = endGroup; function group(name, fn) { return __awaiter2(this, void 0, void 0, function* () { startGroup(name); let result; try { result = yield fn(); } finally { endGroup(); } return result; }); } __name(group, "group"); exports2.group = group; function saveState(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } __name(saveState, "saveState"); exports2.saveState = saveState; function getState(name) { return process.env[`STATE_${name}`] || ""; } __name(getState, "getState"); exports2.getState = getState; function getIDToken(aud) { return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } __name(getIDToken, "getIDToken"); exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; } }); var summary_2 = require_summary(); Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { return summary_2.markdownSummary; } }); var path_utils_1 = require_path_utils(); Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { return path_utils_1.toPosixPath; } }); Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { return path_utils_1.toWin32Path; } }); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); exports2.platform = __importStar2(require_platform()); } }); // node_modules/@actions/glob/lib/internal-glob-options-helper.js var require_internal_glob_options_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; var core = __importStar2(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, omitBrokenSymbolicLinks: true }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; core.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; } __name(getOptions, "getOptions"); exports2.getOptions = getOptions; } }); // node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; var path2 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } let result = path2.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } return result; } __name(dirname, "dirname"); exports2.dirname = dirname; function ensureAbsoluteRoot(root, itemPath) { assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; } else { if (!cwd.endsWith("\\")) { cwd += "\\"; } return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; } } else { return `${itemPath[0]}:\\${itemPath.substr(2)}`; } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path2.sep; } return root + itemPath; } __name(ensureAbsoluteRoot, "ensureAbsoluteRoot"); exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); } return itemPath.startsWith("/"); } __name(hasAbsoluteRoot, "hasAbsoluteRoot"); exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); } return itemPath.startsWith("/"); } __name(hasRoot, "hasRoot"); exports2.hasRoot = hasRoot; function normalizeSeparators(p) { p = p || ""; if (IS_WINDOWS) { p = p.replace(/\//g, "\\"); const isUnc = /^\\\\+[^\\]/.test(p); return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } __name(normalizeSeparators, "normalizeSeparators"); exports2.normalizeSeparators = normalizeSeparators; function safeTrimTrailingSeparator(p) { if (!p) { return ""; } p = normalizeSeparators(p); if (!p.endsWith(path2.sep)) { return p; } if (p === path2.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { return p; } return p.substr(0, p.length - 1); } __name(safeTrimTrailingSeparator, "safeTrimTrailingSeparator"); exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; } }); // node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; var MatchKind; (function(MatchKind2) { MatchKind2[MatchKind2["None"] = 0] = "None"; MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); } }); // node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { patterns = patterns.filter((x) => !x.negate); const searchPathMap = {}; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; searchPathMap[key] = "candidate"; } const result = []; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; if (searchPathMap[key] === "included") { continue; } let foundAncestor = false; let tempKey = key; let parent = pathHelper.dirname(tempKey); while (parent !== tempKey) { if (searchPathMap[parent]) { foundAncestor = true; break; } tempKey = parent; parent = pathHelper.dirname(tempKey); } if (!foundAncestor) { result.push(pattern.searchPath); searchPathMap[key] = "included"; } } return result; } __name(getSearchPaths, "getSearchPaths"); exports2.getSearchPaths = getSearchPaths; function match(patterns, itemPath) { let result = internal_match_kind_1.MatchKind.None; for (const pattern of patterns) { if (pattern.negate) { result &= ~pattern.match(itemPath); } else { result |= pattern.match(itemPath); } } return result; } __name(match, "match"); exports2.match = match; function partialMatch(patterns, itemPath) { return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); } __name(partialMatch, "partialMatch"); exports2.partialMatch = partialMatch; } }); // node_modules/concat-map/index.js var require_concat_map = __commonJS({ "node_modules/concat-map/index.js"(exports2, module2) { module2.exports = function(xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); if (isArray(x)) res.push.apply(res, x); else res.push(x); } return res; }; var isArray = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; } }); // node_modules/balanced-match/index.js var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; module2.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } __name(balanced, "balanced"); function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } __name(maybeMatch, "maybeMatch"); balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [left, right]; } } return result; } __name(range, "range"); } }); // node_modules/brace-expansion/index.js var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports2, module2) { var concatMap = require_concat_map(); var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } __name(numeric, "numeric"); function escapeBraces(str) { return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); } __name(escapeBraces, "escapeBraces"); function unescapeBraces(str) { return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); } __name(unescapeBraces, "unescapeBraces"); function parseCommaParts(str) { if (!str) return [""]; var parts = []; var m = balanced("{", "}", str); if (!m) return str.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } __name(parseCommaParts, "parseCommaParts"); function expandTop(str) { if (!str) return []; if (str.substr(0, 2) === "{}") { str = "\\{\\}" + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } __name(expandTop, "expandTop"); function embrace(str) { return "{" + str + "}"; } __name(embrace, "embrace"); function isPadded(el) { return /^-?0\d/.test(el); } __name(isPadded, "isPadded"); function lte(i, y) { return i <= y; } __name(lte, "lte"); function gte(i, y) { return i >= y; } __name(gte, "gte"); function expand(str, isTop) { var expansions = []; var m = balanced("{", "}", str); if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,(?!,).*\}/)) { str = m.pre + "{" + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : [""]; return post.map(function(p) { return m.pre + n[0] + p; }); } } } var pre = m.pre; var post = m.post.length ? expand(m.post, false) : [""]; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length); var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === "\\") c = ""; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join("0"); if (i < 0) c = "-" + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false); }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } __name(expand, "expand"); } }); // node_modules/minimatch/minimatch.js var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; var path2 = function() { try { return require("path"); } catch (e) { } }() || { sep: "/" }; minimatch.sep = path2.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, "+": { open: "(?:", close: ")+" }, "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; var qmark = "[^/]"; var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { return s.split("").reduce(function(set, c) { set[c] = true; return set; }, {}); } __name(charSet, "charSet"); var slashSplit = /\/+/; minimatch.filter = filter; function filter(pattern, options) { options = options || {}; return function(p, i, list) { return minimatch(p, pattern, options); }; } __name(filter, "filter"); function ext(a, b) { b = b || {}; var t = {}; Object.keys(a).forEach(function(k) { t[k] = a[k]; }); Object.keys(b).forEach(function(k) { t[k] = b[k]; }); return t; } __name(ext, "ext"); minimatch.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) { return minimatch; } var orig = minimatch; var m = /* @__PURE__ */ __name(function minimatch2(p, pattern, options) { return orig(p, pattern, ext(def, options)); }, "minimatch"); m.Minimatch = /* @__PURE__ */ __name(function Minimatch2(pattern, options) { return new orig.Minimatch(pattern, ext(def, options)); }, "Minimatch"); m.Minimatch.defaults = /* @__PURE__ */ __name(function defaults(options) { return orig.defaults(ext(def, options)).Minimatch; }, "defaults"); m.filter = /* @__PURE__ */ __name(function filter2(pattern, options) { return orig.filter(pattern, ext(def, options)); }, "filter"); m.defaults = /* @__PURE__ */ __name(function defaults(options) { return orig.defaults(ext(def, options)); }, "defaults"); m.makeRe = /* @__PURE__ */ __name(function makeRe2(pattern, options) { return orig.makeRe(pattern, ext(def, options)); }, "makeRe"); m.braceExpand = /* @__PURE__ */ __name(function braceExpand2(pattern, options) { return orig.braceExpand(pattern, ext(def, options)); }, "braceExpand"); m.match = function(list, pattern, options) { return orig.match(list, pattern, ext(def, options)); }; return m; }; Minimatch.defaults = function(def) { return minimatch.defaults(def).Minimatch; }; function minimatch(p, pattern, options) { assertValidPattern(pattern); if (!options) options = {}; if (!options.nocomment && pattern.charAt(0) === "#") { return false; } return new Minimatch(pattern, options).match(p); } __name(minimatch, "minimatch"); function Minimatch(pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options); } assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); if (!options.allowWindowsEscape && path2.sep !== "/") { pattern = pattern.split(path2.sep).join("/"); } this.options = options; this.set = []; this.pattern = pattern; this.regexp = null; this.negate = false; this.comment = false; this.empty = false; this.partial = !!options.partial; this.make(); } __name(Minimatch, "Minimatch"); Minimatch.prototype.debug = function() { }; Minimatch.prototype.make = make; function make() { var pattern = this.pattern; var options = this.options; if (!options.nocomment && pattern.charAt(0) === "#") { this.comment = true; return; } if (!pattern) { this.empty = true; return; } this.parseNegate(); var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = /* @__PURE__ */ __name(function debug() { console.error.apply(console, arguments); }, "debug"); this.debug(this.pattern, set); set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); this.debug(this.pattern, set); set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); this.debug(this.pattern, set); set = set.filter(function(s) { return s.indexOf(false) === -1; }); this.debug(this.pattern, set); this.set = set; } __name(make, "make"); Minimatch.prototype.parseNegate = parseNegate; function parseNegate() { var pattern = this.pattern; var negate = false; var options = this.options; var negateOffset = 0; if (options.nonegate) return; for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { negate = !negate; negateOffset++; } if (negateOffset) this.pattern = pattern.substr(negateOffset); this.negate = negate; } __name(parseNegate, "parseNegate"); minimatch.braceExpand = function(pattern, options) { return braceExpand(pattern, options); }; Minimatch.prototype.braceExpand = braceExpand; function braceExpand(pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options; } else { options = {}; } } pattern = typeof pattern === "undefined" ? this.pattern : pattern; assertValidPattern(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return expand(pattern); } __name(braceExpand, "braceExpand"); var MAX_PATTERN_LENGTH = 1024 * 64; var assertValidPattern = /* @__PURE__ */ __name(function(pattern) { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } }, "assertValidPattern"); Minimatch.prototype.parse = parse; var SUBPARSE = {}; function parse(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { if (!options.noglobstar) return GLOBSTAR; else pattern = "*"; } if (pattern === "") return ""; var re = ""; var hasMagic = !!options.nocase; var escaping = false; var patternListStack = []; var negativeLists = []; var stateChar; var inClass = false; var reClassStart = -1; var classStart = -1; var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; var self2 = this; function clearStateChar() { if (stateChar) { switch (stateChar) { case "*": re += star; hasMagic = true; break; case "?": re += qmark; hasMagic = true; break; default: re += "\\" + stateChar; break; } self2.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } __name(clearStateChar, "clearStateChar"); for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); if (escaping && reSpecials[c]) { re += "\\" + c; escaping = false; continue; } switch (c) { case "/": { return false; } case "\\": clearStateChar(); escaping = true; continue; case "?": case "*": case "+": case "@": case "!": this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); if (inClass) { this.debug(" in class"); if (c === "!" && i === classStart + 1) c = "^"; re += c; continue; } self2.debug("call clearStateChar %j", stateChar); clearStateChar(); stateChar = c; if (options.noext) clearStateChar(); continue; case "(": if (inClass) { re += "("; continue; } if (!stateChar) { re += "\\("; continue; } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }); re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; this.debug("plType %j %j", stateChar, re); stateChar = false; continue; case ")": if (inClass || !patternListStack.length) { re += "\\)"; continue; } clearStateChar(); hasMagic = true; var pl = patternListStack.pop(); re += pl.close; if (pl.type === "!") { negativeLists.push(pl); } pl.reEnd = re.length; continue; case "|": if (inClass || !patternListStack.length || escaping) { re += "\\|"; escaping = false; continue; } clearStateChar(); re += "|"; continue; case "[": clearStateChar(); if (inClass) { re += "\\" + c; continue; } inClass = true; classStart = i; reClassStart = re.length; re += c; continue; case "]": if (i === classStart + 1 || !inClass) { re += "\\" + c; escaping = false; continue; } var cs = pattern.substring(classStart + 1, i); try { RegExp("[" + cs + "]"); } catch (er) { var sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; hasMagic = hasMagic || sp[1]; inClass = false; continue; } hasMagic = true; inClass = false; re += c; continue; default: clearStateChar(); if (escaping) { escaping = false; } else if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; } } if (inClass) { cs = pattern.substr(classStart + 1); sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0]; hasMagic = hasMagic || sp[1]; } for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length); this.debug("setting tail", re, pl); tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { if (!$2) { $2 = "\\"; } return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } clearStateChar(); if (escaping) { re += "\\\\"; } var addPatternStart = false; switch (re.charAt(0)) { case "[": case ".": case "(": addPatternStart = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; var nlBefore = re.slice(0, nl.reStart); var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); var nlAfter = re.slice(nl.reEnd); nlLast += nlAfter; var openParensBefore = nlBefore.split("(").length - 1; var cleanAfter = nlAfter; for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); } nlAfter = cleanAfter; var dollar = ""; if (nlAfter === "" && isSub !== SUBPARSE) { dollar = "$"; } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; re = newRe; } if (re !== "" && hasMagic) { re = "(?=.)" + re; } if (addPatternStart) { re = patternStart + re; } if (isSub === SUBPARSE) { return [re, hasMagic]; } if (!hasMagic) { return globUnescape(pattern); } var flags = options.nocase ? "i" : ""; try { var regExp = new RegExp("^" + re + "$", flags); } catch (er) { return new RegExp("$."); } regExp._glob = pattern; regExp._src = re; return regExp; } __name(parse, "parse"); minimatch.makeRe = function(pattern, options) { return new Minimatch(pattern, options || {}).makeRe(); }; Minimatch.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; var set = this.set; if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; if (this.negate) re = "^(?!" + re + ").*$"; try { this.regexp = new RegExp(re, flags); } catch (ex) { this.regexp = false; } return this.regexp; } __name(makeRe, "makeRe"); minimatch.match = function(list, pattern, options) { options = options || {}; var mm = new Minimatch(pattern, options); list = list.filter(function(f) { return mm.match(f); }); if (mm.options.nonull && !list.length) { list.push(pattern); } return list; }; Minimatch.prototype.match = /* @__PURE__ */ __name(function match(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; if (path2.sep !== "/") { f = f.split(path2.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); var set = this.set; this.debug(this.pattern, "set", set); var filename; var i; for (i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } for (i = 0; i < set.length; i++) { var pattern = set[i]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; } var hit = this.matchOne(file, pattern, partial); if (hit) { if (options.flipNegate) return true; return !this.negate; } } if (options.flipNegate) return false; return this.negate; }, "match"); Minimatch.prototype.matchOne = function(file, pattern, partial) { var options = this.options; this.debug( "matchOne", { "this": this, file, pattern } ); this.debug("matchOne", file.length, pattern.length); for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug("matchOne loop"); var p = pattern[pi]; var f = file[fi]; this.debug(pattern, p, f); if (p === false) return false; if (p === GLOBSTAR) { this.debug("GLOBSTAR", [pattern, p, f]); var fr = fi; var pr = pi + 1; if (pr === pl) { this.debug("** at the end"); for (; fi < fl; fi++) { if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; } return true; } while (fr < fl) { var swallowee = file[fr]; this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug("globstar found match!", fr, fl, swallowee); return true; } else { if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { this.debug("dot detected!", file, fr, pattern, pr); break; } this.debug("globstar swallow a segment, and continue"); fr++; } } if (partial) { this.debug("\n>>> no match, partial?", file, fr, pattern, pr); if (fr === fl) return true; } return false; } var hit; if (typeof p === "string") { hit = f === p; this.debug("string match", p, f, hit); } else { hit = f.match(p); this.debug("pattern match", p, f, hit); } if (!hit) return false; } if (fi === fl && pi === pl) { return true; } else if (fi === fl) { return partial; } else if (pi === pl) { return fi === fl - 1 && file[fi] === ""; } throw new Error("wtf?"); }; function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } __name(globUnescape, "globUnescape"); function regExpEscape(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } __name(regExpEscape, "regExpEscape"); } }); // node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; var path2 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { static { __name(this, "Path"); } /** * Constructs a Path * @param itemPath Path or array of segments */ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path2.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { const basename = path2.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); } this.segments.unshift(remaining); } } else { assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { assert_1.default(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } } } /** * Converts the path to it's string representation */ toString() { let result = this.segments[0]; let skipSlash = result.endsWith(path2.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { result += path2.sep; } result += this.segments[i]; } return result; } }; exports2.Path = Path; } }); // node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); var path2 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); var IS_WINDOWS = process.platform === "win32"; var Pattern = class _Pattern { static { __name(this, "Pattern"); } constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { this.negate = false; let pattern; if (typeof patternOrNegate === "string") { pattern = patternOrNegate.trim(); } else { segments = segments || []; assert_1.default(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; } } while (pattern.startsWith("!")) { this.negate = !this.negate; pattern = pattern.substr(1).trim(); } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path2.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); this.searchPath = new internal_path_1.Path(searchSegments).toString(); this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); this.isImplicitPattern = isImplicitPattern; const minimatchOptions = { dot: true, nobrace: true, nocase: IS_WINDOWS, nocomment: true, noext: true, nonegate: true }; pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); } /** * Matches the pattern against the specified path */ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); if (!itemPath.endsWith(path2.sep) && this.isImplicitPattern === false) { itemPath = `${itemPath}${path2.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); } if (this.minimatch.match(itemPath)) { return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; } return internal_match_kind_1.MatchKind.None; } /** * Indicates whether the pattern may match descendants of the specified path */ partialMatch(itemPath) { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (pathHelper.dirname(itemPath) === itemPath) { return this.rootRegExp.test(itemPath); } return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); } /** * Escapes glob patterns within a path */ static globEscape(s) { return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); } /** * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { assert_1.default(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { homedir = homedir || os2.homedir(); assert_1.default(homedir, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); if (pattern.length > 2 && !root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(2); } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); if (!root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(1); } else { pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); } return pathHelper.normalizeSeparators(pattern); } /** * Attempts to unescape a pattern segment to create a literal path segment. * Otherwise returns empty string. */ static getLiteral(segment) { let literal = ""; for (let i = 0; i < segment.length; i++) { const c = segment[i]; if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { literal += segment[++i]; continue; } else if (c === "*" || c === "?") { return ""; } else if (c === "[" && i + 1 < segment.length) { let set = ""; let closed = -1; for (let i2 = i + 1; i2 < segment.length; i2++) { const c2 = segment[i2]; if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { set += segment[++i2]; continue; } else if (c2 === "]") { closed = i2; break; } else { set += c2; } } if (closed >= 0) { if (set.length > 1) { return ""; } if (set) { literal += set; i = closed; continue; } } } literal += c; } return literal; } /** * Escapes regexp special characters * https://javascript.info/regexp-escaping */ static regExpEscape(s) { return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); } }; exports2.Pattern = Pattern; } }); // node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { static { __name(this, "SearchState"); } constructor(path2, level) { this.path = path2; this.level = level; } }; exports2.SearchState = SearchState; } }); // node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); }; var __await2 = exports2 && exports2.__await || function(v) { return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function verb(n) { if (g[n]) i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } __name(verb, "verb"); function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } __name(resume, "resume"); function step(r) { r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } __name(step, "step"); function fulfill(value) { resume("next", value); } __name(fulfill, "fulfill"); function reject(value) { resume("throw", value); } __name(reject, "reject"); function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } __name(settle, "settle"); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core = __importStar2(require_core()); var fs = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); var path2 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); var IS_WINDOWS = process.platform === "win32"; var DefaultGlobber = class _DefaultGlobber { static { __name(this, "DefaultGlobber"); } constructor(options) { this.patterns = []; this.searchPaths = []; this.options = globOptionsHelper.getOptions(options); } getSearchPaths() { return this.searchPaths.slice(); } glob() { var e_1, _a; return __awaiter2(this, void 0, void 0, function* () { const result = []; try { for (var _b = __asyncValues2(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { const itemPath = _c.value; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); } finally { if (e_1) throw e_1.error; } } return result; }); } globGenerator() { return __asyncGenerator2(this, arguments, /* @__PURE__ */ __name(function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { patterns.push(pattern); if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); } } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { core.debug(`Search path '${searchPath}'`); try { yield __await2(fs.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; } throw err; } stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); } const traversalChain = []; while (stack.length) { const item = stack.pop(); const match = patternHelper.match(patterns, item.path); const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); if (!match && !partialMatch) { continue; } const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } if (stats.isDirectory()) { if (match & internal_match_kind_1.MatchKind.Directory) { yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; const childItems = (yield __await2(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); } } }, "globGenerator_1")); } /** * Constructs a DefaultGlobber */ static create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); patterns = patterns.replace(/\r/g, "\n"); } const lines = patterns.split("\n").map((x) => x.trim()); for (const line of lines) { if (!line || line.startsWith("#")) { continue; } else { result.patterns.push(new internal_pattern_1.Pattern(line)); } } result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; }); } static stat(item, options, traversalChain) { return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { stats = yield fs.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { core.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); } throw err; } } else { stats = yield fs.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { const realPath = yield fs.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); } return stats; }); } }; exports2.DefaultGlobber = DefaultGlobber; } }); // node_modules/@actions/glob/lib/glob.js var require_glob = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.create = void 0; var internal_globber_1 = require_internal_globber(); function create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } __name(create, "create"); exports2.create = create; } }); // node_modules/@actions/cache/node_modules/semver/semver.js var require_semver3 = __commonJS({ "node_modules/@actions/cache/node_modules/semver/semver.js"(exports2, module2) { exports2 = module2.exports = SemVer; var debug; if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments, 0); args.unshift("SEMVER"); console.log.apply(console, args); }, "debug"); } else { debug = /* @__PURE__ */ __name(function() { }, "debug"); } exports2.SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var t = exports2.tokens = {}; var R = 0; function tok(n) { t[n] = R++; } __name(tok, "tok"); var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; function makeSafeRe(value) { for (var i2 = 0; i2 < safeRegexReplacements.length; i2++) { var token = safeRegexReplacements[i2][0]; var max = safeRegexReplacements[i2][1]; value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); } return value; } __name(makeSafeRe, "makeSafeRe"); tok("NUMERICIDENTIFIER"); src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; tok("NUMERICIDENTIFIERLOOSE"); src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; tok("NONNUMERICIDENTIFIER"); src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; tok("MAINVERSION"); src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; tok("MAINVERSIONLOOSE"); src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; tok("PRERELEASEIDENTIFIER"); src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASEIDENTIFIERLOOSE"); src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASE"); src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; tok("PRERELEASELOOSE"); src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; tok("BUILDIDENTIFIER"); src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; tok("BUILD"); src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; tok("FULL"); tok("FULLPLAIN"); src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; tok("LOOSEPLAIN"); src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; tok("LOOSE"); src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; tok("GTLT"); src[t.GTLT] = "((?:<|>)?=?)"; tok("XRANGEIDENTIFIERLOOSE"); src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; tok("XRANGEIDENTIFIER"); src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; tok("XRANGEPLAIN"); src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGEPLAINLOOSE"); src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGE"); src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; tok("XRANGELOOSE"); src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; tok("TILDELOOSE"); src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; tok("LONECARET"); src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); var caretTrimReplace = "$1^"; tok("CARET"); src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; tok("CARETLOOSE"); src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; tok("COMPARATORLOOSE"); src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; tok("COMPARATOR"); src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; tok("HYPHENRANGELOOSE"); src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; tok("STAR"); src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); if (!re[i]) { re[i] = new RegExp(src[i]); safeRe[i] = new RegExp(makeSafeRe(src[i])); } } var i; exports2.parse = parse; function parse(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { return version; } if (typeof version !== "string") { return null; } if (version.length > MAX_LENGTH) { return null; } var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; if (!r.test(version)) { return null; } try { return new SemVer(version, options); } catch (er) { return null; } } __name(parse, "parse"); exports2.valid = valid; function valid(version, options) { var v = parse(version, options); return v ? v.version : null; } __name(valid, "valid"); exports2.clean = clean; function clean(version, options) { var s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports2.SemVer = SemVer; function SemVer(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { if (version.loose === options.loose) { return version; } else { version = version.version; } } else if (typeof version !== "string") { throw new TypeError("Invalid Version: " + version); } if (version.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { return new SemVer(version, options); } debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { throw new TypeError("Invalid Version: " + version); } this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map(function(id) { if (/^[0-9]+$/.test(id)) { var num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } __name(SemVer, "SemVer"); SemVer.prototype.format = function() { this.version = this.major + "." + this.minor + "." + this.patch; if (this.prerelease.length) { this.version += "-" + this.prerelease.join("."); } return this.version; }; SemVer.prototype.toString = function() { return this.version; }; SemVer.prototype.compare = function(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return this.compareMain(other) || this.comparePre(other); }; SemVer.prototype.compareMain = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; SemVer.prototype.comparePre = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } var i2 = 0; do { var a = this.prerelease[i2]; var b = other.prerelease[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.compareBuild = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } var i2 = 0; do { var a = this.build[i2]; var b = other.build[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.inc = function(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { var i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports2.inc = inc; function inc(version, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { return new SemVer(version, loose).inc(release, identifier).version; } catch (er) { return null; } } __name(inc, "inc"); exports2.diff = diff; function diff(version1, version2) { if (eq(version1, version2)) { return null; } else { var v1 = parse(version1); var v2 = parse(version2); var prefix = ""; if (v1.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } } __name(diff, "diff"); exports2.compareIdentifiers = compareIdentifiers; var numeric = /^[0-9]+$/; function compareIdentifiers(a, b) { var anum = numeric.test(a); var bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; } __name(compareIdentifiers, "compareIdentifiers"); exports2.rcompareIdentifiers = rcompareIdentifiers; function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } __name(rcompareIdentifiers, "rcompareIdentifiers"); exports2.major = major; function major(a, loose) { return new SemVer(a, loose).major; } __name(major, "major"); exports2.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; } __name(minor, "minor"); exports2.patch = patch; function patch(a, loose) { return new SemVer(a, loose).patch; } __name(patch, "patch"); exports2.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)); } __name(compare, "compare"); exports2.compareLoose = compareLoose; function compareLoose(a, b) { return compare(a, b, true); } __name(compareLoose, "compareLoose"); exports2.compareBuild = compareBuild; function compareBuild(a, b, loose) { var versionA = new SemVer(a, loose); var versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); } __name(compareBuild, "compareBuild"); exports2.rcompare = rcompare; function rcompare(a, b, loose) { return compare(b, a, loose); } __name(rcompare, "rcompare"); exports2.sort = sort; function sort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(a, b, loose); }); } __name(sort, "sort"); exports2.rsort = rsort; function rsort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(b, a, loose); }); } __name(rsort, "rsort"); exports2.gt = gt; function gt(a, b, loose) { return compare(a, b, loose) > 0; } __name(gt, "gt"); exports2.lt = lt; function lt(a, b, loose) { return compare(a, b, loose) < 0; } __name(lt, "lt"); exports2.eq = eq; function eq(a, b, loose) { return compare(a, b, loose) === 0; } __name(eq, "eq"); exports2.neq = neq; function neq(a, b, loose) { return compare(a, b, loose) !== 0; } __name(neq, "neq"); exports2.gte = gte; function gte(a, b, loose) { return compare(a, b, loose) >= 0; } __name(gte, "gte"); exports2.lte = lte; function lte(a, b, loose) { return compare(a, b, loose) <= 0; } __name(lte, "lte"); exports2.cmp = cmp; function cmp(a, op, b, loose) { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } } __name(cmp, "cmp"); exports2.Comparator = Comparator; function Comparator(comp, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } if (!(this instanceof Comparator)) { return new Comparator(comp, options); } comp = comp.trim().split(/\s+/).join(" "); debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } __name(Comparator, "Comparator"); var ANY = {}; Comparator.prototype.parse = function(comp) { var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; var m = comp.match(r); if (!m) { throw new TypeError("Invalid comparator: " + comp); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } }; Comparator.prototype.toString = function() { return this.value; }; Comparator.prototype.test = function(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY || version === ANY) { return true; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } return cmp(version, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } var rangeTmp; if (this.operator === "") { if (this.value === "") { return true; } rangeTmp = new Range(comp.value, options); return satisfies(this.value, rangeTmp, options); } else if (comp.operator === "") { if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options); return satisfies(comp.semver, rangeTmp, options); } var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); var sameSemVer = this.semver.version === comp.semver.version; var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range; function Range(range, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { return new Range(range.value, options); } if (!(this instanceof Range)) { return new Range(range, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range.trim().split(/\s+/).join(" "); this.set = this.raw.split("||").map(function(range2) { return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); if (!this.set.length) { throw new TypeError("Invalid SemVer Range: " + this.raw); } this.format(); } __name(Range, "Range"); Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(" ").trim(); }).join("||").trim(); return this.range; }; Range.prototype.toString = function() { return this.range; }; Range.prototype.parseRange = function(range) { var loose = this.options.loose; var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace); debug("hyphen replace", range); range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; var set = range.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { set = set.filter(function(comp) { return !!comp.match(compRe); }); } set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); return set; }; Range.prototype.intersects = function(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); }); }); }); }); }; function isSatisfiable(comparators, options) { var result = true; var remainingComparators = comparators.slice(); var testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every(function(otherComparator) { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; } __name(isSatisfiable, "isSatisfiable"); exports2.toComparators = toComparators; function toComparators(range, options) { return new Range(range, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } __name(toComparators, "toComparators"); function parseComparator(comp, options) { debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; } __name(parseComparator, "parseComparator"); function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } __name(isX, "isX"); function replaceTildes(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceTilde(comp2, options); }).join(" "); } __name(replaceTildes, "replaceTildes"); function replaceTilde(comp, options) { var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; return comp.replace(r, function(_, M, m, p, pr) { debug("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else if (pr) { debug("replaceTilde pr", pr); ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } debug("tilde return", ret); return ret; }); } __name(replaceTilde, "replaceTilde"); function replaceCarets(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceCaret(comp2, options); }).join(" "); } __name(replaceCarets, "replaceCarets"); function replaceCaret(comp, options) { debug("caret", comp, options); var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; return comp.replace(r, function(_, M, m, p, pr) { debug("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { if (M === "0") { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; } } debug("caret return", ret); return ret; }); } __name(replaceCaret, "replaceCaret"); function replaceXRanges(comp, options) { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map(function(comp2) { return replaceXRange(comp2, options); }).join(" "); } __name(replaceXRanges, "replaceXRanges"); function replaceXRange(comp, options) { comp = comp.trim(); var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; return comp.replace(r, function(ret, gtlt, M, m, p, pr) { debug("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); var anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } ret = gtlt + M + "." + m + "." + p + pr; } else if (xm) { ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; } else if (xp) { ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; } debug("xRange return", ret); return ret; }); } __name(replaceXRange, "replaceXRange"); function replaceStars(comp, options) { debug("replaceStars", comp, options); return comp.trim().replace(safeRe[t.STAR], ""); } __name(replaceStars, "replaceStars"); function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = ">=" + fM + ".0.0"; } else if (isX(fp)) { from = ">=" + fM + "." + fm + ".0"; } else { from = ">=" + from; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = "<" + (+tM + 1) + ".0.0"; } else if (isX(tp)) { to = "<" + tM + "." + (+tm + 1) + ".0"; } else if (tpr) { to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; } else { to = "<=" + to; } return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); Range.prototype.test = function(version) { if (!version) { return false; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version, this.options)) { return true; } } return false; }; function testSet(set, version, options) { for (var i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } } } return false; } return true; } __name(testSet, "testSet"); exports2.satisfies = satisfies; function satisfies(version, range, options) { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version); } __name(satisfies, "satisfies"); exports2.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, options) { var max = null; var maxSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; } __name(maxSatisfying, "maxSatisfying"); exports2.minSatisfying = minSatisfying; function minSatisfying(versions, range, options) { var min = null; var minSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; } __name(minSatisfying, "minSatisfying"); exports2.minVersion = minVersion; function minVersion(range, loose) { range = new Range(range, loose); var minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!minver || gt(minver, compver)) { minver = compver; } break; case "<": case "<=": break; default: throw new Error("Unexpected operation: " + comparator.operator); } }); } if (minver && range.test(minver)) { return minver; } return null; } __name(minVersion, "minVersion"); exports2.validRange = validRange; function validRange(range, options) { try { return new Range(range, options).range || "*"; } catch (er) { return null; } } __name(validRange, "validRange"); exports2.ltr = ltr; function ltr(version, range, options) { return outside(version, range, "<", options); } __name(ltr, "ltr"); exports2.gtr = gtr; function gtr(version, range, options) { return outside(version, range, ">", options); } __name(gtr, "gtr"); exports2.outside = outside; function outside(version, range, hilo, options) { version = new SemVer(version, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false; } } return true; } __name(outside, "outside"); exports2.prerelease = prerelease; function prerelease(version, options) { var parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); exports2.intersects = intersects; function intersects(r1, r2, options) { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2); } __name(intersects, "intersects"); exports2.coerce = coerce; function coerce(version, options) { if (version instanceof SemVer) { return version; } if (typeof version === "number") { version = String(version); } if (typeof version !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { match = version.match(safeRe[t.COERCE]); } else { var next; while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } safeRe[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } }); // node_modules/@actions/cache/lib/internal/constants.js var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ManifestFilename = exports2.TarFilename = exports2.SystemTarPathOnWindows = exports2.GnuTarPathOnWindows = exports2.SocketTimeout = exports2.DefaultRetryDelay = exports2.DefaultRetryAttempts = exports2.ArchiveToolType = exports2.CompressionMethod = exports2.CacheFilename = void 0; var CacheFilename; (function(CacheFilename2) { CacheFilename2["Gzip"] = "cache.tgz"; CacheFilename2["Zstd"] = "cache.tzst"; })(CacheFilename || (exports2.CacheFilename = CacheFilename = {})); var CompressionMethod; (function(CompressionMethod2) { CompressionMethod2["Gzip"] = "gzip"; CompressionMethod2["ZstdWithoutLong"] = "zstd-without-long"; CompressionMethod2["Zstd"] = "zstd"; })(CompressionMethod || (exports2.CompressionMethod = CompressionMethod = {})); var ArchiveToolType; (function(ArchiveToolType2) { ArchiveToolType2["GNU"] = "gnu"; ArchiveToolType2["BSD"] = "bsd"; })(ArchiveToolType || (exports2.ArchiveToolType = ArchiveToolType = {})); exports2.DefaultRetryAttempts = 2; exports2.DefaultRetryDelay = 5e3; exports2.SocketTimeout = 5e3; exports2.GnuTarPathOnWindows = `${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`; exports2.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; exports2.TarFilename = "cache.tar"; exports2.ManifestFilename = "manifest.txt"; } }); // node_modules/@actions/cache/lib/internal/cacheUtils.js var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isGhes = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core = __importStar2(require_core()); var exec = __importStar2(require_exec()); var glob = __importStar2(require_glob()); var io = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs = __importStar2(require("fs")); var path2 = __importStar2(require("path")); var semver2 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants7(); function createTempDirectory() { return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { let baseLocation; if (IS_WINDOWS) { baseLocation = process.env["USERPROFILE"] || "C:\\"; } else { if (process.platform === "darwin") { baseLocation = "/Users"; } else { baseLocation = "/home"; } } tempDirectory = path2.join(baseLocation, "actions", "temp"); } const dest = path2.join(tempDirectory, crypto2.randomUUID()); yield io.mkdirP(dest); return dest; }); } __name(createTempDirectory, "createTempDirectory"); exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs.statSync(filePath).size; } __name(getArchiveFileSizeInBytes, "getArchiveFileSizeInBytes"); exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { var _a, e_1, _b, _c; var _d; return __awaiter2(this, void 0, void 0, function* () { const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; const relativeFile = path2.relative(workspace, file).replace(new RegExp(`\\${path2.sep}`, "g"), "/"); core.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { paths.push(`${relativeFile}`); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } } return paths; }); } __name(resolvePaths, "resolvePaths"); exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs.unlink)(filePath); }); } __name(unlinkFile, "unlinkFile"); exports2.unlinkFile = unlinkFile; function getVersion(app, additionalArgs = []) { return __awaiter2(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); core.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { stdout: (data) => versionOutput += data.toString(), stderr: (data) => versionOutput += data.toString() } }); } catch (err) { core.debug(err.message); } versionOutput = versionOutput.trim(); core.debug(versionOutput); return versionOutput; }); } __name(getVersion, "getVersion"); function getCompressionMethod() { return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver2.clean(versionOutput); core.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { return constants_1.CompressionMethod.ZstdWithoutLong; } }); } __name(getCompressionMethod, "getCompressionMethod"); exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } __name(getCacheFileName, "getCacheFileName"); exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); return versionOutput.toLowerCase().includes("gnu tar") ? io.which("tar") : ""; }); } __name(getGnuTarPathOnWindows, "getGnuTarPathOnWindows"); exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } __name(assertDefined, "assertDefined"); exports2.assertDefined = assertDefined; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); const isGitHubHost = hostname === "GITHUB.COM"; const isGheHost = hostname.endsWith(".GHE.COM") || hostname.endsWith(".GHE.LOCALHOST"); return !isGitHubHost && !isGheHost; } __name(isGhes, "isGhes"); exports2.isGhes = isGhes; } }); // node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, __assign: () => __assign, __asyncDelegator: () => __asyncDelegator, __asyncGenerator: () => __asyncGenerator, __asyncValues: () => __asyncValues, __await: () => __await, __awaiter: () => __awaiter, __classPrivateFieldGet: () => __classPrivateFieldGet, __classPrivateFieldIn: () => __classPrivateFieldIn, __classPrivateFieldSet: () => __classPrivateFieldSet, __createBinding: () => __createBinding, __decorate: () => __decorate, __disposeResources: () => __disposeResources, __esDecorate: () => __esDecorate, __exportStar: () => __exportStar, __extends: () => __extends, __generator: () => __generator, __importDefault: () => __importDefault, __importStar: () => __importStar, __makeTemplateObject: () => __makeTemplateObject, __metadata: () => __metadata, __param: () => __param, __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, __spreadArray: () => __spreadArray, __spreadArrays: () => __spreadArrays, __values: () => __values2, default: () => tslib_es6_default }); function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } __name(__, "__"); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function(target, key) { decorator(target, key, paramIndex); }; } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } __name(accept, "accept"); var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function(f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; } function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; } function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); } function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function(v) { return step([n, v]); }; } __name(verb, "verb"); function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } __name(step, "step"); } function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values2(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { return this; }, i; function awaitReturn(f) { return function(v) { return Promise.resolve(v).then(f, reject); }; } __name(awaitReturn, "awaitReturn"); function verb(n, f) { if (g[n]) { i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } __name(verb, "verb"); function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } __name(resume, "resume"); function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } __name(step, "step"); function fulfill(value) { resume("next", value); } __name(fulfill, "fulfill"); function reject(value) { resume("throw", value); } __name(reject, "reject"); function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } __name(settle, "settle"); } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function(e) { throw e; }), verb("return"), i[Symbol.iterator] = function() { return this; }, i; function verb(n, f) { i[n] = o[n] ? function(v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } __name(verb, "verb"); } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } __name(verb, "verb"); function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } __name(settle, "settle"); } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; } function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return mod && mod.__esModule ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); dispose = value[Symbol.asyncDispose]; } if (dispose === void 0) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; if (async) inner = dispose; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); if (inner) dispose = /* @__PURE__ */ __name(function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }, "dispose"); env.stack.push({ value, dispose, async }); } else if (async) { env.stack.push({ async: true }); } return value; } function __disposeResources(env) { function fail(e) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } __name(fail, "fail"); var r, s = 0; function next() { while (r = env.stack.pop()) { try { if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); if (r.dispose) { var result = r.dispose.call(r.value); if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); } else s |= 1; } catch (e) { fail(e); } } if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } __name(next, "next"); return next(); } function __rewriteRelativeImportExtension(path2, preserveJsx) { if (typeof path2 === "string" && /^\.\.?\//.test(path2)) { return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } return path2; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ "node_modules/tslib/tslib.es6.mjs"() { extendStatics = /* @__PURE__ */ __name(function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }, "extendStatics"); __name(__extends, "__extends"); __assign = /* @__PURE__ */ __name(function() { __assign = Object.assign || /* @__PURE__ */ __name(function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }, "__assign"); return __assign.apply(this, arguments); }, "__assign"); __name(__rest, "__rest"); __name(__decorate, "__decorate"); __name(__param, "__param"); __name(__esDecorate, "__esDecorate"); __name(__runInitializers, "__runInitializers"); __name(__propKey, "__propKey"); __name(__setFunctionName, "__setFunctionName"); __name(__metadata, "__metadata"); __name(__awaiter, "__awaiter"); __name(__generator, "__generator"); __createBinding = Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }; __name(__exportStar, "__exportStar"); __name(__values2, "__values"); __name(__read, "__read"); __name(__spread, "__spread"); __name(__spreadArrays, "__spreadArrays"); __name(__spreadArray, "__spreadArray"); __name(__await, "__await"); __name(__asyncGenerator, "__asyncGenerator"); __name(__asyncDelegator, "__asyncDelegator"); __name(__asyncValues, "__asyncValues"); __name(__makeTemplateObject, "__makeTemplateObject"); __setModuleDefault = Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }; ownKeys = /* @__PURE__ */ __name(function(o) { ownKeys = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }, "ownKeys"); __name(__importStar, "__importStar"); __name(__importDefault, "__importDefault"); __name(__classPrivateFieldGet, "__classPrivateFieldGet"); __name(__classPrivateFieldSet, "__classPrivateFieldSet"); __name(__classPrivateFieldIn, "__classPrivateFieldIn"); __name(__addDisposableResource, "__addDisposableResource"); _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; __name(__disposeResources, "__disposeResources"); __name(__rewriteRelativeImportExtension, "__rewriteRelativeImportExtension"); tslib_es6_default = { __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values: __values2, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension }; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js var require_AbortError = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError = class extends Error { static { __name(this, "AbortError"); } constructor(message) { super(message); this.name = "AbortError"; } }; exports2.AbortError = AbortError; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js var require_log = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.log = log; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var node_os_1 = require("node:os"); var node_util_1 = tslib_1.__importDefault(require("node:util")); var node_process_1 = tslib_1.__importDefault(require("node:process")); function log(message, ...args) { node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); } __name(log, "log"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js var require_debug2 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var log_js_1 = require_log(); var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; var enabledString; var enabledNamespaces = []; var skippedNamespaces = []; var debuggers = []; if (debugEnvVariable) { enable(debugEnvVariable); } var debugObj = Object.assign((namespace) => { return createDebugger(namespace); }, { enable, enabled, disable, log: log_js_1.log }); function enable(namespaces) { enabledString = namespaces; enabledNamespaces = []; skippedNamespaces = []; const namespaceList = namespaces.split(",").map((ns) => ns.trim()); for (const ns of namespaceList) { if (ns.startsWith("-")) { skippedNamespaces.push(ns.substring(1)); } else { enabledNamespaces.push(ns); } } for (const instance of debuggers) { instance.enabled = enabled(instance.namespace); } } __name(enable, "enable"); function enabled(namespace) { if (namespace.endsWith("*")) { return true; } for (const skipped of skippedNamespaces) { if (namespaceMatches(namespace, skipped)) { return false; } } for (const enabledNamespace of enabledNamespaces) { if (namespaceMatches(namespace, enabledNamespace)) { return true; } } return false; } __name(enabled, "enabled"); function namespaceMatches(namespace, patternToMatch) { if (patternToMatch.indexOf("*") === -1) { return namespace === patternToMatch; } let pattern = patternToMatch; if (patternToMatch.indexOf("**") !== -1) { const patternParts = []; let lastCharacter = ""; for (const character of patternToMatch) { if (character === "*" && lastCharacter === "*") { continue; } else { lastCharacter = character; patternParts.push(character); } } pattern = patternParts.join(""); } let namespaceIndex = 0; let patternIndex = 0; const patternLength = pattern.length; const namespaceLength = namespace.length; let lastWildcard = -1; let lastWildcardNamespace = -1; while (namespaceIndex < namespaceLength && patternIndex < patternLength) { if (pattern[patternIndex] === "*") { lastWildcard = patternIndex; patternIndex++; if (patternIndex === patternLength) { return true; } while (namespace[namespaceIndex] !== pattern[patternIndex]) { namespaceIndex++; if (namespaceIndex === namespaceLength) { return false; } } lastWildcardNamespace = namespaceIndex; namespaceIndex++; patternIndex++; continue; } else if (pattern[patternIndex] === namespace[namespaceIndex]) { patternIndex++; namespaceIndex++; } else if (lastWildcard >= 0) { patternIndex = lastWildcard + 1; namespaceIndex = lastWildcardNamespace + 1; if (namespaceIndex === namespaceLength) { return false; } while (namespace[namespaceIndex] !== pattern[patternIndex]) { namespaceIndex++; if (namespaceIndex === namespaceLength) { return false; } } lastWildcardNamespace = namespaceIndex; namespaceIndex++; patternIndex++; continue; } else { return false; } } const namespaceDone = namespaceIndex === namespace.length; const patternDone = patternIndex === pattern.length; const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; return namespaceDone && (patternDone || trailingWildCard); } __name(namespaceMatches, "namespaceMatches"); function disable() { const result = enabledString || ""; enable(""); return result; } __name(disable, "disable"); function createDebugger(namespace) { const newDebugger = Object.assign(debug, { enabled: enabled(namespace), destroy, log: debugObj.log, namespace, extend }); function debug(...args) { if (!newDebugger.enabled) { return; } if (args.length > 0) { args[0] = `${namespace} ${args[0]}`; } newDebugger.log(...args); } __name(debug, "debug"); debuggers.push(newDebugger); return newDebugger; } __name(createDebugger, "createDebugger"); function destroy() { const index = debuggers.indexOf(this); if (index >= 0) { debuggers.splice(index, 1); return true; } return false; } __name(destroy, "destroy"); function extend(namespace) { const newDebugger = createDebugger(`${this.namespace}:${namespace}`); newDebugger.log = this.log; return newDebugger; } __name(extend, "extend"); exports2.default = debugObj; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js var require_logger = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TypeSpecRuntimeLogger = void 0; exports2.createLoggerContext = createLoggerContext; exports2.setLogLevel = setLogLevel; exports2.getLogLevel = getLogLevel; exports2.createClientLogger = createClientLogger; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var debug_js_1 = tslib_1.__importDefault(require_debug2()); var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; var levelMap = { verbose: 400, info: 300, warning: 200, error: 100 }; function patchLogMethod(parent, child) { child.log = (...args) => { parent.log(...args); }; } __name(patchLogMethod, "patchLogMethod"); function isTypeSpecRuntimeLogLevel(level) { return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); } __name(isTypeSpecRuntimeLogLevel, "isTypeSpecRuntimeLogLevel"); function createLoggerContext(options) { const registeredLoggers = /* @__PURE__ */ new Set(); const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; let logLevel; const clientLogger = (0, debug_js_1.default)(options.namespace); clientLogger.log = (...args) => { debug_js_1.default.log(...args); }; function contextSetLogLevel(level) { if (level && !isTypeSpecRuntimeLogLevel(level)) { throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); } logLevel = level; const enabledNamespaces = []; for (const logger of registeredLoggers) { if (shouldEnable(logger)) { enabledNamespaces.push(logger.namespace); } } debug_js_1.default.enable(enabledNamespaces.join(",")); } __name(contextSetLogLevel, "contextSetLogLevel"); if (logLevelFromEnv) { if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { contextSetLogLevel(logLevelFromEnv); } else { console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); } } function shouldEnable(logger) { return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); } __name(shouldEnable, "shouldEnable"); function createLogger(parent, level) { const logger = Object.assign(parent.extend(level), { level }); patchLogMethod(parent, logger); if (shouldEnable(logger)) { const enabledNamespaces = debug_js_1.default.disable(); debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); } registeredLoggers.add(logger); return logger; } __name(createLogger, "createLogger"); function contextGetLogLevel() { return logLevel; } __name(contextGetLogLevel, "contextGetLogLevel"); function contextCreateClientLogger(namespace) { const clientRootLogger = clientLogger.extend(namespace); patchLogMethod(clientLogger, clientRootLogger); return { error: createLogger(clientRootLogger, "error"), warning: createLogger(clientRootLogger, "warning"), info: createLogger(clientRootLogger, "info"), verbose: createLogger(clientRootLogger, "verbose") }; } __name(contextCreateClientLogger, "contextCreateClientLogger"); return { setLogLevel: contextSetLogLevel, getLogLevel: contextGetLogLevel, createClientLogger: contextCreateClientLogger, logger: clientLogger }; } __name(createLoggerContext, "createLoggerContext"); var context = createLoggerContext({ logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", namespace: "typeSpecRuntime" }); exports2.TypeSpecRuntimeLogger = context.logger; function setLogLevel(logLevel) { context.setLogLevel(logLevel); } __name(setLogLevel, "setLogLevel"); function getLogLevel() { return context.getLogLevel(); } __name(getLogLevel, "getLogLevel"); function createClientLogger(namespace) { return context.createClientLogger(namespace); } __name(createClientLogger, "createClientLogger"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; function normalizeName(name) { return name.toLowerCase(); } __name(normalizeName, "normalizeName"); function* headerIterator(map) { for (const entry of map.values()) { yield [entry.name, entry.value]; } } __name(headerIterator, "headerIterator"); var HttpHeadersImpl = class { static { __name(this, "HttpHeadersImpl"); } _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { for (const headerName of Object.keys(rawHeaders)) { this.set(headerName, rawHeaders[headerName]); } } } /** * Set a header in this collection with the provided name and value. The name is * case-insensitive. * @param name - The name of the header to set. This value is case-insensitive. * @param value - The value of the header to set. */ set(name, value) { this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); } /** * Get the header value for the provided header name, or undefined if no header exists in this * collection with the provided name. * @param name - The name of the header. This value is case-insensitive. */ get(name) { return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. * @param name - The name of the header to set. This value is case-insensitive. */ has(name) { return this._headersMap.has(normalizeName(name)); } /** * Remove the header with the provided headerName. * @param name - The name of the header to remove. */ delete(name) { this._headersMap.delete(normalizeName(name)); } /** * Get the JSON object representation of this HTTP header collection. */ toJSON(options = {}) { const result = {}; if (options.preserveCase) { for (const entry of this._headersMap.values()) { result[entry.name] = entry.value; } } else { for (const [normalizedName, entry] of this._headersMap) { result[normalizedName] = entry.value; } } return result; } /** * Get the string representation of this HTTP header collection. */ toString() { return JSON.stringify(this.toJSON({ preserveCase: true })); } /** * Iterate over tuples of header [name, value] pairs. */ [Symbol.iterator]() { return headerIterator(this._headersMap); } }; function createHttpHeaders(rawHeaders) { return new HttpHeadersImpl(rawHeaders); } __name(createHttpHeaders, "createHttpHeaders"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js var require_schemes = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js var require_oauth2Flows = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js var require_uuidUtils = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.randomUUID = randomUUID; function randomUUID() { return crypto.randomUUID(); } __name(randomUUID, "randomUUID"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js var require_pipelineRequest = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; var httpHeaders_js_1 = require_httpHeaders(); var uuidUtils_js_1 = require_uuidUtils(); var PipelineRequestImpl = class { static { __name(this, "PipelineRequestImpl"); } url; method; headers; timeout; withCredentials; body; multipartBody; formData; streamResponseStatusCodes; enableBrowserStreams; proxySettings; disableKeepAlive; abortSignal; requestId; allowInsecureConnection; onUploadProgress; onDownloadProgress; requestOverrides; authSchemes; constructor(options) { this.url = options.url; this.body = options.body; this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); this.method = options.method ?? "GET"; this.timeout = options.timeout ?? 0; this.multipartBody = options.multipartBody; this.formData = options.formData; this.disableKeepAlive = options.disableKeepAlive ?? false; this.proxySettings = options.proxySettings; this.streamResponseStatusCodes = options.streamResponseStatusCodes; this.withCredentials = options.withCredentials ?? false; this.abortSignal = options.abortSignal; this.onUploadProgress = options.onUploadProgress; this.onDownloadProgress = options.onDownloadProgress; this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); this.allowInsecureConnection = options.allowInsecureConnection ?? false; this.enableBrowserStreams = options.enableBrowserStreams ?? false; this.requestOverrides = options.requestOverrides; this.authSchemes = options.authSchemes; } }; function createPipelineRequest(options) { return new PipelineRequestImpl(options); } __name(createPipelineRequest, "createPipelineRequest"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js var require_pipeline = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createEmptyPipeline = createEmptyPipeline; var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); var HttpPipeline = class _HttpPipeline { static { __name(this, "HttpPipeline"); } _policies = []; _orderedPolicies; constructor(policies) { this._policies = policies?.slice(0) ?? []; this._orderedPolicies = void 0; } addPolicy(policy, options = {}) { if (options.phase && options.afterPhase) { throw new Error("Policies inside a phase cannot specify afterPhase."); } if (options.phase && !ValidPhaseNames.has(options.phase)) { throw new Error(`Invalid phase name: ${options.phase}`); } if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); } this._policies.push({ policy, options }); this._orderedPolicies = void 0; } removePolicy(options) { const removedPolicies = []; this._policies = this._policies.filter((policyDescriptor) => { if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { removedPolicies.push(policyDescriptor.policy); return false; } else { return true; } }); this._orderedPolicies = void 0; return removedPolicies; } sendRequest(httpClient, request) { const policies = this.getOrderedPolicies(); const pipeline = policies.reduceRight((next, policy) => { return (req) => { return policy.sendRequest(req, next); }; }, (req) => httpClient.sendRequest(req)); return pipeline(request); } getOrderedPolicies() { if (!this._orderedPolicies) { this._orderedPolicies = this.orderPolicies(); } return this._orderedPolicies; } clone() { return new _HttpPipeline(this._policies); } static create() { return new _HttpPipeline(); } orderPolicies() { const result = []; const policyMap = /* @__PURE__ */ new Map(); function createPhase(name) { return { name, policies: /* @__PURE__ */ new Set(), hasRun: false, hasAfterPolicies: false }; } __name(createPhase, "createPhase"); const serializePhase = createPhase("Serialize"); const noPhase = createPhase("None"); const deserializePhase = createPhase("Deserialize"); const retryPhase = createPhase("Retry"); const signPhase = createPhase("Sign"); const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; function getPhase(phase) { if (phase === "Retry") { return retryPhase; } else if (phase === "Serialize") { return serializePhase; } else if (phase === "Deserialize") { return deserializePhase; } else if (phase === "Sign") { return signPhase; } else { return noPhase; } } __name(getPhase, "getPhase"); for (const descriptor of this._policies) { const policy = descriptor.policy; const options = descriptor.options; const policyName = policy.name; if (policyMap.has(policyName)) { throw new Error("Duplicate policy names not allowed in pipeline"); } const node = { policy, dependsOn: /* @__PURE__ */ new Set(), dependants: /* @__PURE__ */ new Set() }; if (options.afterPhase) { node.afterPhase = getPhase(options.afterPhase); node.afterPhase.hasAfterPolicies = true; } policyMap.set(policyName, node); const phase = getPhase(options.phase); phase.policies.add(node); } for (const descriptor of this._policies) { const { policy, options } = descriptor; const policyName = policy.name; const node = policyMap.get(policyName); if (!node) { throw new Error(`Missing node for policy ${policyName}`); } if (options.afterPolicies) { for (const afterPolicyName of options.afterPolicies) { const afterNode = policyMap.get(afterPolicyName); if (afterNode) { node.dependsOn.add(afterNode); afterNode.dependants.add(node); } } } if (options.beforePolicies) { for (const beforePolicyName of options.beforePolicies) { const beforeNode = policyMap.get(beforePolicyName); if (beforeNode) { beforeNode.dependsOn.add(node); node.dependants.add(beforeNode); } } } } function walkPhase(phase) { phase.hasRun = true; for (const node of phase.policies) { if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { continue; } if (node.dependsOn.size === 0) { result.push(node.policy); for (const dependant of node.dependants) { dependant.dependsOn.delete(node); } policyMap.delete(node.policy.name); phase.policies.delete(node); } } } __name(walkPhase, "walkPhase"); function walkPhases() { for (const phase of orderedPhases) { walkPhase(phase); if (phase.policies.size > 0 && phase !== noPhase) { if (!noPhase.hasRun) { walkPhase(noPhase); } return; } if (phase.hasAfterPolicies) { walkPhase(noPhase); } } } __name(walkPhases, "walkPhases"); let iteration = 0; while (policyMap.size > 0) { iteration++; const initialResultLength = result.length; walkPhases(); if (result.length <= initialResultLength && iteration > 1) { throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); } } return result; } }; function createEmptyPipeline() { return HttpPipeline.create(); } __name(createEmptyPipeline, "createEmptyPipeline"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js var require_object = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isObject = isObject; function isObject(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } __name(isObject, "isObject"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js var require_error = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isError = isError; var object_js_1 = require_object(); function isError(e) { if ((0, object_js_1.isObject)(e)) { const hasName = typeof e.name === "string"; const hasMessage = typeof e.message === "string"; return hasName && hasMessage; } return false; } __name(isError, "isError"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js var require_inspect = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.custom = void 0; var node_util_1 = require("node:util"); exports2.custom = node_util_1.inspect.custom; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js var require_sanitizer = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Sanitizer = void 0; var object_js_1 = require_object(); var RedactedString = "REDACTED"; var 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" ]; var defaultAllowedQueryParameters = ["api-version"]; var Sanitizer = class { static { __name(this, "Sanitizer"); } allowedHeaderNames; allowedQueryParameters; constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); } /** * Sanitizes an object for logging. * @param obj - The object to sanitize * @returns - The sanitized object as a string */ sanitize(obj) { const seen = /* @__PURE__ */ new Set(); return JSON.stringify(obj, (key, value) => { if (value instanceof Error) { return { ...value, name: value.name, message: value.message }; } if (key === "headers") { return this.sanitizeHeaders(value); } else if (key === "url") { return this.sanitizeUrl(value); } else if (key === "query") { return this.sanitizeQuery(value); } else if (key === "body") { return void 0; } else if (key === "response") { return void 0; } else if (key === "operationSpec") { return void 0; } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { if (seen.has(value)) { return "[Circular]"; } seen.add(value); } return value; }, 2); } /** * Sanitizes a URL for logging. * @param value - The URL to sanitize * @returns - The sanitized URL as a string */ sanitizeUrl(value) { if (typeof value !== "string" || value === null || value === "") { return value; } const url = new URL(value); if (!url.search) { return value; } for (const [key] of url.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { url.searchParams.set(key, RedactedString); } } return url.toString(); } sanitizeHeaders(obj) { const sanitized = {}; for (const key of Object.keys(obj)) { if (this.allowedHeaderNames.has(key.toLowerCase())) { sanitized[key] = obj[key]; } else { sanitized[key] = RedactedString; } } return sanitized; } sanitizeQuery(value) { if (typeof value !== "object" || value === null) { return value; } const sanitized = {}; for (const k of Object.keys(value)) { if (this.allowedQueryParameters.has(k.toLowerCase())) { sanitized[k] = value[k]; } else { sanitized[k] = RedactedString; } } return sanitized; } }; exports2.Sanitizer = Sanitizer; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js var require_restError = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; var error_js_1 = require_error(); var inspect_js_1 = require_inspect(); var sanitizer_js_1 = require_sanitizer(); var errorSanitizer = new sanitizer_js_1.Sanitizer(); var RestError = class _RestError extends Error { static { __name(this, "RestError"); } /** * Something went wrong when making the request. * This means the actual request failed for some reason, * such as a DNS issue or the connection being lost. */ static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; /** * This means that parsing the response from the server failed. * It may have been malformed. */ static PARSE_ERROR = "PARSE_ERROR"; /** * The code of the error itself (use statics on RestError if possible.) */ code; /** * The HTTP status code of the request (if applicable.) */ statusCode; /** * The request that was made. * This property is non-enumerable. */ request; /** * The response received (if any.) * This property is non-enumerable. */ response; /** * Bonus property set by the throw site. */ details; constructor(message, options = {}) { super(message); this.name = "RestError"; this.code = options.code; this.statusCode = options.statusCode; Object.defineProperty(this, "request", { value: options.request, enumerable: false }); Object.defineProperty(this, "response", { value: options.response, enumerable: false }); const agent = this.request?.agent ? { maxFreeSockets: this.request.agent.maxFreeSockets, maxSockets: this.request.agent.maxSockets } : void 0; Object.defineProperty(this, inspect_js_1.custom, { value: () => { return `RestError: ${this.message} ${errorSanitizer.sanitize({ ...this, request: { ...this.request, agent }, response: this.response })}`; }, enumerable: false }); Object.setPrototypeOf(this, _RestError.prototype); } }; exports2.RestError = RestError; function isRestError(e) { if (e instanceof RestError) { return true; } return (0, error_js_1.isError)(e) && e.name === "RestError"; } __name(isRestError, "isRestError"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js var require_bytesEncoding = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uint8ArrayToString = uint8ArrayToString; exports2.stringToUint8Array = stringToUint8Array; function uint8ArrayToString(bytes, format) { return Buffer.from(bytes).toString(format); } __name(uint8ArrayToString, "uint8ArrayToString"); function stringToUint8Array(value, format) { return Buffer.from(value, format); } __name(stringToUint8Array, "stringToUint8Array"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js var require_log2 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_js_1 = require_logger(); exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js var require_nodeHttpClient = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBodyLength = getBodyLength; exports2.createNodeHttpClient = createNodeHttpClient; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var node_http_1 = tslib_1.__importDefault(require("node:http")); var node_https_1 = tslib_1.__importDefault(require("node:https")); var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); var node_stream_1 = require("node:stream"); var AbortError_js_1 = require_AbortError(); var httpHeaders_js_1 = require_httpHeaders(); var restError_js_1 = require_restError(); var log_js_1 = require_log2(); var sanitizer_js_1 = require_sanitizer(); var DEFAULT_TLS_SETTINGS = {}; function isReadableStream(body) { return body && typeof body.pipe === "function"; } __name(isReadableStream, "isReadableStream"); function isStreamComplete(stream) { if (stream.readable === false) { return Promise.resolve(); } return new Promise((resolve) => { const handler = /* @__PURE__ */ __name(() => { resolve(); stream.removeListener("close", handler); stream.removeListener("end", handler); stream.removeListener("error", handler); }, "handler"); stream.on("close", handler); stream.on("end", handler); stream.on("error", handler); }); } __name(isStreamComplete, "isStreamComplete"); function isArrayBuffer(body) { return body && typeof body.byteLength === "number"; } __name(isArrayBuffer, "isArrayBuffer"); var ReportTransform = class extends node_stream_1.Transform { static { __name(this, "ReportTransform"); } loadedBytes = 0; progressCallback; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type _transform(chunk, _encoding, callback) { this.push(chunk); this.loadedBytes += chunk.length; try { this.progressCallback({ loadedBytes: this.loadedBytes }); callback(); } catch (e) { callback(e); } } constructor(progressCallback) { super(); this.progressCallback = progressCallback; } }; var NodeHttpClient = class { static { __name(this, "NodeHttpClient"); } cachedHttpAgent; cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); /** * Makes a request over an underlying transport layer and returns the response. * @param request - The request to be made. */ async sendRequest(request) { const abortController = new AbortController(); let abortListener; if (request.abortSignal) { if (request.abortSignal.aborted) { throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); } abortListener = /* @__PURE__ */ __name((event) => { if (event.type === "abort") { abortController.abort(); } }, "abortListener"); request.abortSignal.addEventListener("abort", abortListener); } let timeoutId; if (request.timeout > 0) { timeoutId = setTimeout(() => { const sanitizer = new sanitizer_js_1.Sanitizer(); log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); abortController.abort(); }, request.timeout); } const acceptEncoding = request.headers.get("Accept-Encoding"); const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); let body = typeof request.body === "function" ? request.body() : request.body; if (body && !request.headers.has("Content-Length")) { const bodyLength = getBodyLength(body); if (bodyLength !== null) { request.headers.set("Content-Length", bodyLength); } } let responseStream; try { if (body && request.onUploadProgress) { const onUploadProgress = request.onUploadProgress; const uploadReportStream = new ReportTransform(onUploadProgress); uploadReportStream.on("error", (e) => { log_js_1.logger.error("Error in upload progress", e); }); if (isReadableStream(body)) { body.pipe(uploadReportStream); } else { uploadReportStream.end(body); } body = uploadReportStream; } const res = await this.makeRequest(request, abortController, body); if (timeoutId !== void 0) { clearTimeout(timeoutId); } const headers = getResponseHeaders(res); const status = res.statusCode ?? 0; const response = { status, headers, request }; if (request.method === "HEAD") { res.resume(); return response; } responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; const onDownloadProgress = request.onDownloadProgress; if (onDownloadProgress) { const downloadReportStream = new ReportTransform(onDownloadProgress); downloadReportStream.on("error", (e) => { log_js_1.logger.error("Error in download progress", e); }); responseStream.pipe(downloadReportStream); responseStream = downloadReportStream; } if ( // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) ) { response.readableStreamBody = responseStream; } else { response.bodyAsText = await streamToText(responseStream); } return response; } finally { if (request.abortSignal && abortListener) { let uploadStreamDone = Promise.resolve(); if (isReadableStream(body)) { uploadStreamDone = isStreamComplete(body); } let downloadStreamDone = Promise.resolve(); if (isReadableStream(responseStream)) { downloadStreamDone = isStreamComplete(responseStream); } Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { if (abortListener) { request.abortSignal?.removeEventListener("abort", abortListener); } }).catch((e) => { log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); }); } } } makeRequest(request, abortController, body) { const url = new URL(request.url); const isInsecure = url.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); const options = { agent, hostname: url.hostname, path: `${url.pathname}${url.search}`, port: url.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }), ...request.requestOverrides }; return new Promise((resolve, reject) => { const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); }); abortController.signal.addEventListener("abort", () => { const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); req.destroy(abortError); reject(abortError); }); if (body && isReadableStream(body)) { body.pipe(req); } else if (body) { if (typeof body === "string" || Buffer.isBuffer(body)) { req.end(body); } else if (isArrayBuffer(body)) { req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); } else { log_js_1.logger.error("Unrecognized body type", body); reject(new restError_js_1.RestError("Unrecognized body type")); } } else { req.end(); } }); } getOrCreateAgent(request, isInsecure) { const disableKeepAlive = request.disableKeepAlive; if (isInsecure) { if (disableKeepAlive) { return node_http_1.default.globalAgent; } if (!this.cachedHttpAgent) { this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); } return this.cachedHttpAgent; } else { if (disableKeepAlive && !request.tlsSettings) { return node_https_1.default.globalAgent; } const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; let agent = this.cachedHttpsAgents.get(tlsSettings); if (agent && agent.options.keepAlive === !disableKeepAlive) { return agent; } log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); agent = new node_https_1.default.Agent({ // keepAlive is true if disableKeepAlive is false. keepAlive: !disableKeepAlive, // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. ...tlsSettings }); this.cachedHttpsAgents.set(tlsSettings, agent); return agent; } } }; function getResponseHeaders(res) { const headers = (0, httpHeaders_js_1.createHttpHeaders)(); for (const header of Object.keys(res.headers)) { const value = res.headers[header]; if (Array.isArray(value)) { if (value.length > 0) { headers.set(header, value[0]); } } else if (value) { headers.set(header, value); } } return headers; } __name(getResponseHeaders, "getResponseHeaders"); function getDecodedResponseStream(stream, headers) { const contentEncoding = headers.get("Content-Encoding"); if (contentEncoding === "gzip") { const unzip = node_zlib_1.default.createGunzip(); stream.pipe(unzip); return unzip; } else if (contentEncoding === "deflate") { const inflate = node_zlib_1.default.createInflate(); stream.pipe(inflate); return inflate; } return stream; } __name(getDecodedResponseStream, "getDecodedResponseStream"); function streamToText(stream) { return new Promise((resolve, reject) => { const buffer = []; stream.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { buffer.push(chunk); } else { buffer.push(Buffer.from(chunk)); } }); stream.on("end", () => { resolve(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { if (e && e?.name === "AbortError") { reject(e); } else { reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { code: restError_js_1.RestError.PARSE_ERROR })); } }); }); } __name(streamToText, "streamToText"); function getBodyLength(body) { if (!body) { return 0; } else if (Buffer.isBuffer(body)) { return body.length; } else if (isReadableStream(body)) { return null; } else if (isArrayBuffer(body)) { return body.byteLength; } else if (typeof body === "string") { return Buffer.from(body).length; } else { return null; } } __name(getBodyLength, "getBodyLength"); function createNodeHttpClient() { return new NodeHttpClient(); } __name(createNodeHttpClient, "createNodeHttpClient"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js var require_defaultHttpClient = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; var nodeHttpClient_js_1 = require_nodeHttpClient(); function createDefaultHttpClient() { return (0, nodeHttpClient_js_1.createNodeHttpClient)(); } __name(createDefaultHttpClient, "createDefaultHttpClient"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js var require_logPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logPolicyName = void 0; exports2.logPolicy = logPolicy; var log_js_1 = require_log2(); var sanitizer_js_1 = require_sanitizer(); exports2.logPolicyName = "logPolicy"; function logPolicy(options = {}) { const logger = options.logger ?? log_js_1.logger.info; const sanitizer = new sanitizer_js_1.Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); return { name: exports2.logPolicyName, async sendRequest(request, next) { if (!logger.enabled) { return next(request); } logger(`Request: ${sanitizer.sanitize(request)}`); const response = await next(request); logger(`Response status code: ${response.status}`); logger(`Headers: ${sanitizer.sanitize(response.headers)}`); return response; } }; } __name(logPolicy, "logPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js var require_redirectPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.redirectPolicyName = void 0; exports2.redirectPolicy = redirectPolicy; exports2.redirectPolicyName = "redirectPolicy"; var allowedRedirect = ["GET", "HEAD"]; function redirectPolicy(options = {}) { const { maxRetries = 20 } = options; return { name: exports2.redirectPolicyName, async sendRequest(request, next) { const response = await next(request); return handleRedirect(next, response, maxRetries); } }; } __name(redirectPolicy, "redirectPolicy"); async function handleRedirect(next, response, maxRetries, currentRetries = 0) { const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { const url = new URL(locationHeader, request.url); request.url = url.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); delete request.body; } request.headers.delete("Authorization"); const res = await next(request); return handleRedirect(next, res, maxRetries, currentRetries + 1); } return response; } __name(handleRedirect, "handleRedirect"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js var require_userAgentPlatform = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getHeaderName = getHeaderName; exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var node_os_1 = tslib_1.__importDefault(require("node:os")); var node_process_1 = tslib_1.__importDefault(require("node:process")); function getHeaderName() { return "User-Agent"; } __name(getHeaderName, "getHeaderName"); async function setPlatformSpecificData(map) { if (node_process_1.default && node_process_1.default.versions) { const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; const versions = node_process_1.default.versions; if (versions.bun) { map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { map.set("Node", `${versions.node} (${osInfo})`); } } } __name(setPlatformSpecificData, "setPlatformSpecificData"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js var require_constants8 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; exports2.SDK_VERSION = "0.3.2"; exports2.DEFAULT_RETRY_POLICY_COUNT = 3; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js var require_userAgent = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); var constants_js_1 = require_constants8(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { const token = value ? `${key}/${value}` : key; parts.push(token); } return parts.join(" "); } __name(getUserAgentString, "getUserAgentString"); function getUserAgentHeaderName() { return (0, userAgentPlatform_js_1.getHeaderName)(); } __name(getUserAgentHeaderName, "getUserAgentHeaderName"); async function getUserAgentValue(prefix) { const runtimeInfo = /* @__PURE__ */ new Map(); runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); const defaultAgent = getUserAgentString(runtimeInfo); const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; return userAgentValue; } __name(getUserAgentValue, "getUserAgentValue"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js var require_userAgentPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.userAgentPolicyName = void 0; exports2.userAgentPolicy = userAgentPolicy; var userAgent_js_1 = require_userAgent(); var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); exports2.userAgentPolicyName = "userAgentPolicy"; function userAgentPolicy(options = {}) { const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); return { name: exports2.userAgentPolicyName, async sendRequest(request, next) { if (!request.headers.has(UserAgentHeaderName)) { request.headers.set(UserAgentHeaderName, await userAgentValue); } return next(request); } }; } __name(userAgentPolicy, "userAgentPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js var require_decompressResponsePolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.decompressResponsePolicyName = void 0; exports2.decompressResponsePolicy = decompressResponsePolicy; exports2.decompressResponsePolicyName = "decompressResponsePolicy"; function decompressResponsePolicy() { return { name: exports2.decompressResponsePolicyName, async sendRequest(request, next) { if (request.method !== "HEAD") { request.headers.set("Accept-Encoding", "gzip,deflate"); } return next(request); } }; } __name(decompressResponsePolicy, "decompressResponsePolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js var require_random = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; function getRandomIntegerInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); const offset = Math.floor(Math.random() * (max - min + 1)); return offset + min; } __name(getRandomIntegerInclusive, "getRandomIntegerInclusive"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js var require_delay = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.calculateRetryDelay = calculateRetryDelay; var random_js_1 = require_random(); function calculateRetryDelay(retryAttempt, config) { const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); return { retryAfterInMs }; } __name(calculateRetryDelay, "calculateRetryDelay"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js var require_helpers = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.delay = delay; exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; var AbortError_js_1 = require_AbortError(); var StandardAbortMessage = "The operation was aborted."; function delay(delayInMs, value, options) { return new Promise((resolve, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = /* @__PURE__ */ __name(() => { return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); }, "rejectOnAbort"); const removeListeners = /* @__PURE__ */ __name(() => { if (options?.abortSignal && onAborted) { options.abortSignal.removeEventListener("abort", onAborted); } }, "removeListeners"); onAborted = /* @__PURE__ */ __name(() => { if (timer) { clearTimeout(timer); } removeListeners(); return rejectOnAbort(); }, "onAborted"); if (options?.abortSignal && options.abortSignal.aborted) { return rejectOnAbort(); } timer = setTimeout(() => { removeListeners(); resolve(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); } }); } __name(delay, "delay"); function parseHeaderValueAsNumber(response, headerName) { const value = response.headers.get(headerName); if (!value) return; const valueAsNum = Number(value); if (Number.isNaN(valueAsNum)) return; return valueAsNum; } __name(parseHeaderValueAsNumber, "parseHeaderValueAsNumber"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js var require_throttlingRetryStrategy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; exports2.throttlingRetryStrategy = throttlingRetryStrategy; var helpers_js_1 = require_helpers(); var RetryAfterHeader = "Retry-After"; var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; function getRetryAfterInMs(response) { if (!(response && [429, 503].includes(response.status))) return void 0; try { for (const header of AllRetryAfterHeaders) { const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); if (retryAfterValue === 0 || retryAfterValue) { const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; return retryAfterValue * multiplyingFactor; } } const retryAfterHeader = response.headers.get(RetryAfterHeader); if (!retryAfterHeader) return; const date = Date.parse(retryAfterHeader); const diff = date - Date.now(); return Number.isFinite(diff) ? Math.max(0, diff) : void 0; } catch { return void 0; } } __name(getRetryAfterInMs, "getRetryAfterInMs"); function isThrottlingRetryResponse(response) { return Number.isFinite(getRetryAfterInMs(response)); } __name(isThrottlingRetryResponse, "isThrottlingRetryResponse"); function throttlingRetryStrategy() { return { name: "throttlingRetryStrategy", retry({ response }) { const retryAfterInMs = getRetryAfterInMs(response); if (!Number.isFinite(retryAfterInMs)) { return { skipStrategy: true }; } return { retryAfterInMs }; } }; } __name(throttlingRetryStrategy, "throttlingRetryStrategy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js var require_exponentialRetryStrategy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryStrategy = exponentialRetryStrategy; exports2.isExponentialRetryResponse = isExponentialRetryResponse; exports2.isSystemError = isSystemError; var delay_js_1 = require_delay(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; function exponentialRetryStrategy(options = {}) { const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; return { name: "exponentialRetryStrategy", retry({ retryCount, response, responseError }) { const matchedSystemError = isSystemError(responseError); const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; const isExponential = isExponentialRetryResponse(response); const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { return { skipStrategy: true }; } if (responseError && !matchedSystemError && !isExponential) { return { errorToThrow: responseError }; } return (0, delay_js_1.calculateRetryDelay)(retryCount, { retryDelayInMs: retryInterval, maxRetryDelayInMs: maxRetryInterval }); } }; } __name(exponentialRetryStrategy, "exponentialRetryStrategy"); function isExponentialRetryResponse(response) { return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); } __name(isExponentialRetryResponse, "isExponentialRetryResponse"); function isSystemError(err) { if (!err) { return false; } return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; } __name(isSystemError, "isSystemError"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js var require_retryPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryPolicy = retryPolicy; var helpers_js_1 = require_helpers(); var AbortError_js_1 = require_AbortError(); var logger_js_1 = require_logger(); var constants_js_1 = require_constants8(); var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { const logger = options.logger || retryPolicyLogger; return { name: retryPolicyName, async sendRequest(request, next) { let response; let responseError; let retryCount = -1; retryRequest: while (true) { retryCount += 1; response = void 0; responseError = void 0; try { logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); response = await next(request); logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); } catch (e) { logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); responseError = e; if (!e || responseError.name !== "RestError") { throw e; } response = responseError.response; } if (request.abortSignal?.aborted) { logger.error(`Retry ${retryCount}: Request aborted.`); const abortError = new AbortError_js_1.AbortError(); throw abortError; } if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) { throw responseError; } else if (response) { return response; } else { throw new Error("Maximum retries reached with no response or error to throw"); } } logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); strategiesLoop: for (const strategy of strategies) { const strategyLogger = strategy.logger || logger; strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); const modifiers = strategy.retry({ retryCount, response, responseError }); if (modifiers.skipStrategy) { strategyLogger.info(`Retry ${retryCount}: Skipped.`); continue strategiesLoop; } const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; if (errorToThrow) { strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); throw errorToThrow; } if (retryAfterInMs || retryAfterInMs === 0) { strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); continue retryRequest; } if (redirectTo) { strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); request.url = redirectTo; continue retryRequest; } } if (responseError) { logger.info(`None of the retry strategies could work with the received error. Throwing it.`); throw responseError; } if (response) { logger.info(`None of the retry strategies could work with the received response. Returning it.`); return response; } } } }; } __name(retryPolicy, "retryPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js var require_defaultRetryPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.defaultRetryPolicyName = void 0; exports2.defaultRetryPolicy = defaultRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); var constants_js_1 = require_constants8(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { return { name: exports2.defaultRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } __name(defaultRetryPolicy, "defaultRetryPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js var require_checkEnvironment = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; var bytesEncoding_js_1 = require_bytesEncoding(); var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { const formDataMap = {}; for (const [key, value] of formData.entries()) { formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; } __name(formDataToFormDataMap, "formDataToFormDataMap"); function formDataPolicy() { return { name: exports2.formDataPolicyName, async sendRequest(request, next) { if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } if (request.formData) { const contentType = request.headers.get("Content-Type"); if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { request.body = wwwFormUrlEncode(request.formData); } else { await prepareFormData(request.formData, request); } request.formData = void 0; } return next(request); } }; } __name(formDataPolicy, "formDataPolicy"); function wwwFormUrlEncode(formData) { const urlSearchParams = new URLSearchParams(); for (const [key, value] of Object.entries(formData)) { if (Array.isArray(value)) { for (const subValue of value) { urlSearchParams.append(key, subValue.toString()); } } else { urlSearchParams.append(key, value.toString()); } } return urlSearchParams.toString(); } __name(wwwFormUrlEncode, "wwwFormUrlEncode"); async function prepareFormData(formData, request) { const contentType = request.headers.get("Content-Type"); if (contentType && !contentType.startsWith("multipart/form-data")) { return; } request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { if (typeof value === "string") { parts.push({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); } else { const fileName = value.name || "blob"; const headers = (0, httpHeaders_js_1.createHttpHeaders)(); headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); headers.set("Content-Type", value.type || "application/octet-stream"); parts.push({ headers, body: value }); } } } request.multipartBody = { parts }; } __name(prepareFormData, "prepareFormData"); } }); // node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse(val); } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n * y; case "weeks": case "week": case "w": return n * w; case "days": case "day": case "d": return n * d; case "hours": case "hour": case "hrs": case "hr": case "h": return n * h; case "minutes": case "minute": case "mins": case "min": case "m": return n * m; case "seconds": case "second": case "secs": case "sec": case "s": return n * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n; default: return void 0; } } __name(parse, "parse"); function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + "d"; } if (msAbs >= h) { return Math.round(ms / h) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } __name(fmtShort, "fmtShort"); function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, "day"); } if (msAbs >= h) { return plural(ms, msAbs, h, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } __name(fmtLong, "fmtLong"); function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } __name(plural, "plural"); } }); // node_modules/debug/src/common.js var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } __name(selectColor, "selectColor"); createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug(...args) { if (!debug.enabled) { return; } const self2 = debug; const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; self2.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self2, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self2, args); const logFn = self2.log || createDebug.log; logFn.apply(self2, args); } __name(debug, "debug"); debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; Object.defineProperty(debug, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug); } return debug; } __name(createDebug, "createDebug"); function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } __name(extend, "extend"); function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); for (const ns of split) { if (ns[0] === "-") { createDebug.skips.push(ns.slice(1)); } else { createDebug.names.push(ns); } } } __name(enable, "enable"); function matchesTemplate(search, template) { let searchIndex = 0; let templateIndex = 0; let starIndex = -1; let matchIndex = 0; while (searchIndex < search.length) { if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { if (template[templateIndex] === "*") { starIndex = templateIndex; matchIndex = searchIndex; templateIndex++; } else { searchIndex++; templateIndex++; } } else if (starIndex !== -1) { templateIndex = starIndex + 1; matchIndex++; searchIndex = matchIndex; } else { return false; } } while (templateIndex < template.length && template[templateIndex] === "*") { templateIndex++; } return templateIndex === template.length; } __name(matchesTemplate, "matchesTemplate"); function disable() { const namespaces = [ ...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } __name(disable, "disable"); function enabled(name) { for (const skip of createDebug.skips) { if (matchesTemplate(name, skip)) { return false; } } for (const ns of createDebug.names) { if (matchesTemplate(name, ns)) { return true; } } return false; } __name(enabled, "enabled"); function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } __name(coerce, "coerce"); function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } __name(destroy, "destroy"); createDebug.enable(createDebug.load()); return createDebug; } __name(setup, "setup"); module2.exports = setup; } }); // node_modules/debug/src/browser.js var require_browser = __commonJS({ "node_modules/debug/src/browser.js"(exports2, module2) { exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; exports2.storage = localstorage(); exports2.destroy = /* @__PURE__ */ (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports2.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" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } let m; return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } __name(useColors, "useColors"); function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c); } __name(formatArgs, "formatArgs"); exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports2.storage.setItem("debug", namespaces); } else { exports2.storage.removeItem("debug"); } } catch (error) { } } __name(save, "save"); function load() { let r; try { r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; } return r; } __name(load, "load"); function localstorage() { try { return localStorage; } catch (error) { } } __name(localstorage, "localstorage"); module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // node_modules/has-flag/index.js var require_has_flag = __commonJS({ "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; } }); // node_modules/supports-color/index.js var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; var os2 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env } = process; var forceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { forceColor = 0; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = 1; } if ("FORCE_COLOR" in env) { if (env.FORCE_COLOR === "true") { forceColor = 1; } else if (env.FORCE_COLOR === "false") { forceColor = 0; } else { forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } __name(translateLevel, "translateLevel"); function supportsColor(haveStream, streamIsTTY) { if (forceColor === 0) { return 0; } if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { return 3; } if (hasFlag("color=256")) { return 2; } if (haveStream && !streamIsTTY && forceColor === void 0) { return 0; } const min = forceColor || 0; if (env.TERM === "dumb") { return min; } if (process.platform === "win32") { const osRelease = os2.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ("CI" in env) { if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { return 1; } return min; } if ("TEAMCITY_VERSION" in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if (env.COLORTERM === "truecolor") { return 3; } if ("TERM_PROGRAM" in env) { const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": return version >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ("COLORTERM" in env) { return 1; } return min; } __name(supportsColor, "supportsColor"); function getSupportLevel(stream) { const level = supportsColor(stream, stream && stream.isTTY); return translateLevel(level); } __name(getSupportLevel, "getSupportLevel"); module2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, tty.isatty(1))), stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; } }); // node_modules/debug/src/node.js var require_node = __commonJS({ "node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); var util = require("util"); exports2.init = init; exports2.log = log; exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; exports2.destroy = util.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); exports2.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports2.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 (error) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === "null") { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); function useColors() { return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); } __name(useColors, "useColors"); function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); const prefix = ` ${colorCode};1m${name} \x1B[0m`; args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + " " + args[0]; } } __name(formatArgs, "formatArgs"); function getDate() { if (exports2.inspectOpts.hideDate) { return ""; } return (/* @__PURE__ */ new Date()).toISOString() + " "; } __name(getDate, "getDate"); function log(...args) { return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } __name(log, "log"); function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { delete process.env.DEBUG; } } __name(save, "save"); function load() { return process.env.DEBUG; } __name(load, "load"); function init(debug) { debug.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } __name(init, "init"); module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; } }); // node_modules/debug/src/index.js var require_src = __commonJS({ "node_modules/debug/src/index.js"(exports2, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { module2.exports = require_node(); } } }); // node_modules/agent-base/dist/helpers.js var require_helpers2 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; var http = __importStar2(require("http")); var https = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; for await (const chunk of stream) { length += chunk.length; chunks.push(chunk); } return Buffer.concat(chunks, length); } __name(toBuffer, "toBuffer"); exports2.toBuffer = toBuffer; async function json(stream) { const buf = await toBuffer(stream); const str = buf.toString("utf8"); try { return JSON.parse(str); } catch (_err) { const err = _err; err.message += ` (input: ${str})`; throw err; } } __name(json, "json"); exports2.json = json; function req(url, opts = {}) { const href = typeof url === "string" ? url : url.href; const req2 = (href.startsWith("https:") ? https : http).request(url, opts); const promise = new Promise((resolve, reject) => { req2.once("response", resolve).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; } __name(req, "req"); exports2.req = req; } }); // node_modules/agent-base/dist/index.js var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; var net = __importStar2(require("net")); var http = __importStar2(require("http")); var https_1 = require("https"); __exportStar2(require_helpers2(), exports2); var INTERNAL = Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { static { __name(this, "Agent"); } constructor(opts) { super(opts); this[INTERNAL] = {}; } /** * Determine whether this is an `http` or `https` request. */ isSecureEndpoint(options) { if (options) { if (typeof options.secureEndpoint === "boolean") { return options.secureEndpoint; } if (typeof options.protocol === "string") { return options.protocol === "https:"; } } const { stack } = new Error(); if (typeof stack !== "string") return false; return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); } // In order to support async signatures in `connect()` and Node's native // connection pooling in `http.Agent`, the array of sockets for each origin // has to be updated synchronously. This is so the length of the array is // accurate when `addRequest()` is next called. We achieve this by creating a // fake socket and adding it to `sockets[origin]` and incrementing // `totalSocketCount`. incrementSockets(name) { if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { return null; } if (!this.sockets[name]) { this.sockets[name] = []; } const fakeSocket = new net.Socket({ writable: false }); this.sockets[name].push(fakeSocket); this.totalSocketCount++; return fakeSocket; } decrementSockets(name, socket) { if (!this.sockets[name] || socket === null) { return; } const sockets = this.sockets[name]; const index = sockets.indexOf(socket); if (index !== -1) { sockets.splice(index, 1); this.totalSocketCount--; if (sockets.length === 0) { delete this.sockets[name]; } } } // In order to properly update the socket pool, we need to call `getName()` on // the core `https.Agent` if it is a secureEndpoint. getName(options) { const secureEndpoint = this.isSecureEndpoint(options); if (secureEndpoint) { return https_1.Agent.prototype.getName.call(this, options); } return super.getName(options); } createSocket(req, options, cb) { const connectOpts = { ...options, secureEndpoint: this.isSecureEndpoint(options) }; const name = this.getName(connectOpts); const fakeSocket = this.incrementSockets(name); Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { this.decrementSockets(name, fakeSocket); if (socket instanceof http.Agent) { try { return socket.addRequest(req, connectOpts); } catch (err) { return cb(err); } } this[INTERNAL].currentSocket = socket; super.createSocket(req, options, cb); }, (err) => { this.decrementSockets(name, fakeSocket); cb(err); }); } createConnection() { const socket = this[INTERNAL].currentSocket; this[INTERNAL].currentSocket = void 0; if (!socket) { throw new Error("No socket was returned in the `connect()` function"); } return socket; } get defaultPort() { return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); } set defaultPort(v) { if (this[INTERNAL]) { this[INTERNAL].defaultPort = v; } } get protocol() { return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); } set protocol(v) { if (this[INTERNAL]) { this[INTERNAL].protocol = v; } } }; exports2.Agent = Agent; } }); // node_modules/https-proxy-agent/dist/parse-proxy-response.js var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; var debug_1 = __importDefault2(require_src()); var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve, reject) => { let buffersLength = 0; const buffers = []; function read() { const b = socket.read(); if (b) ondata(b); else socket.once("readable", read); } __name(read, "read"); function cleanup() { socket.removeListener("end", onend); socket.removeListener("error", onerror); socket.removeListener("readable", read); } __name(cleanup, "cleanup"); function onend() { cleanup(); debug("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } __name(onend, "onend"); function onerror(err) { cleanup(); debug("onerror %o", err); reject(err); } __name(onerror, "onerror"); function ondata(b) { buffers.push(b); buffersLength += b.length; const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { debug("have not received end of HTTP headers yet..."); read(); return; } const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n"); const firstLine = headerParts.shift(); if (!firstLine) { socket.destroy(); return reject(new Error("No header received from proxy CONNECT response")); } const firstLineParts = firstLine.split(" "); const statusCode = +firstLineParts[1]; const statusText = firstLineParts.slice(2).join(" "); const headers = {}; for (const header of headerParts) { if (!header) continue; const firstColon = header.indexOf(":"); if (firstColon === -1) { socket.destroy(); return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); } const key = header.slice(0, firstColon).toLowerCase(); const value = header.slice(firstColon + 1).trimStart(); const current = headers[key]; if (typeof current === "string") { headers[key] = [current, value]; } else if (Array.isArray(current)) { current.push(value); } else { headers[key] = value; } } debug("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { statusCode, statusText, headers }, buffered }); } __name(ondata, "ondata"); socket.on("error", onerror); socket.on("end", onend); read(); }); } __name(parseProxyResponse, "parseProxyResponse"); exports2.parseProxyResponse = parseProxyResponse; } }); // node_modules/https-proxy-agent/dist/index.js var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; var net = __importStar2(require("net")); var tls = __importStar2(require("tls")); var assert_1 = __importDefault2(require("assert")); var debug_1 = __importDefault2(require_src()); var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug = (0, debug_1.default)("https-proxy-agent"); var setServernameFromNonIpHost = /* @__PURE__ */ __name((options) => { if (options.servername === void 0 && options.host && !net.isIP(options.host)) { return { ...options, servername: options.host }; } return options; }, "setServernameFromNonIpHost"); var HttpsProxyAgent = class extends agent_base_1.Agent { static { __name(this, "HttpsProxyAgent"); } constructor(proxy, opts) { super(opts); this.options = { path: void 0 }; this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { // Attempt to negotiate http/1.1 for proxy servers that support http/2 ALPNProtocols: ["http/1.1"], ...opts ? omit(opts, "headers") : null, host, port }; } /** * Called when the node-core HTTP client library is creating a * new HTTP request. */ async connect(req, opts) { const { proxy } = this; if (!opts.host) { throw new TypeError('No "host" provided'); } let socket; if (proxy.protocol === "https:") { debug("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); } else { debug("Creating `net.Socket`: %o", this.connectOpts); socket = net.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r `; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; } headers.Host = `${host}:${opts.port}`; if (!headers["Proxy-Connection"]) { headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; } for (const name of Object.keys(headers)) { payload += `${name}: ${headers[name]}\r `; } const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); socket.write(`${payload}\r `); const { connect, buffered } = await proxyResponsePromise; req.emit("proxyConnect", connect); this.emit("proxyConnect", connect, req); if (connect.statusCode === 200) { req.once("socket", resume); if (opts.secureEndpoint) { debug("Upgrading socket connection to TLS"); return tls.connect({ ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"), socket }); } return socket; } socket.destroy(); const fakeSocket = new net.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { debug("Replaying proxy buffer for failed request"); (0, assert_1.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); }); return fakeSocket; } }; HttpsProxyAgent.protocols = ["http", "https"]; exports2.HttpsProxyAgent = HttpsProxyAgent; function resume(socket) { socket.resume(); } __name(resume, "resume"); function omit(obj, ...keys) { const ret = {}; let key; for (key in obj) { if (!keys.includes(key)) { ret[key] = obj[key]; } } return ret; } __name(omit, "omit"); } }); // node_modules/http-proxy-agent/dist/index.js var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; var net = __importStar2(require("net")); var tls = __importStar2(require("tls")); var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); var agent_base_1 = require_dist(); var url_1 = require("url"); var debug = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { static { __name(this, "HttpProxyAgent"); } constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; debug("Creating new HttpProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { ...opts ? omit(opts, "headers") : null, host, port }; } addRequest(req, opts) { req._header = null; this.setRequestProps(req, opts); super.addRequest(req, opts); } setRequestProps(req, opts) { const { proxy } = this; const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; const url = new url_1.URL(req.path, base); if (opts.port !== 80) { url.port = String(opts.port); } req.path = String(url); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; } if (!headers["Proxy-Connection"]) { headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; } for (const name of Object.keys(headers)) { const value = headers[name]; if (value) { req.setHeader(name, value); } } } async connect(req, opts) { req._header = null; if (!req.path.includes("://")) { this.setRequestProps(req, opts); } let first; let endOfHeaders; debug("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { debug("Patching connection write() output buffer with updated header"); first = req.outputData[0].data; endOfHeaders = first.indexOf("\r\n\r\n") + 4; req.outputData[0].data = req._header + first.substring(endOfHeaders); debug("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { debug("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(this.connectOpts); } else { debug("Creating `net.Socket`: %o", this.connectOpts); socket = net.connect(this.connectOpts); } await (0, events_1.once)(socket, "connect"); return socket; } }; HttpProxyAgent.protocols = ["http", "https"]; exports2.HttpProxyAgent = HttpProxyAgent; function omit(obj, ...keys) { const ret = {}; let key; for (key in obj) { if (!keys.includes(key)) { ret[key] = obj[key]; } } return ret; } __name(omit, "omit"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; var https_proxy_agent_1 = require_dist2(); var http_proxy_agent_1 = require_dist3(); var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; var NO_PROXY = "NO_PROXY"; exports2.proxyPolicyName = "proxyPolicy"; exports2.globalNoProxyList = []; var noProxyListLoaded = false; var globalBypassedMap = /* @__PURE__ */ new Map(); function getEnvironmentValue(name) { if (process.env[name]) { return process.env[name]; } else if (process.env[name.toLowerCase()]) { return process.env[name.toLowerCase()]; } return void 0; } __name(getEnvironmentValue, "getEnvironmentValue"); function loadEnvironmentProxyValue() { if (!process) { return void 0; } const httpsProxy = getEnvironmentValue(HTTPS_PROXY); const allProxy = getEnvironmentValue(ALL_PROXY); const httpProxy = getEnvironmentValue(HTTP_PROXY); return httpsProxy || allProxy || httpProxy; } __name(loadEnvironmentProxyValue, "loadEnvironmentProxyValue"); function isBypassed(uri, noProxyList, bypassedMap) { if (noProxyList.length === 0) { return false; } const host = new URL(uri).hostname; if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; for (const pattern of noProxyList) { if (pattern[0] === ".") { if (host.endsWith(pattern)) { isBypassedFlag = true; } else { if (host.length === pattern.length - 1 && host === pattern.slice(1)) { isBypassedFlag = true; } } } else { if (host === pattern) { isBypassedFlag = true; } } } bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } __name(isBypassed, "isBypassed"); function loadNoProxy() { const noProxy = getEnvironmentValue(NO_PROXY); noProxyListLoaded = true; if (noProxy) { return noProxy.split(",").map((item) => item.trim()).filter((item) => item.length); } return []; } __name(loadNoProxy, "loadNoProxy"); function getDefaultProxySettings(proxyUrl) { if (!proxyUrl) { proxyUrl = loadEnvironmentProxyValue(); if (!proxyUrl) { return void 0; } } const parsedUrl = new URL(proxyUrl); const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { host: schema + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password }; } __name(getDefaultProxySettings, "getDefaultProxySettings"); function getDefaultProxySettingsInternal() { const envProxy = loadEnvironmentProxyValue(); return envProxy ? new URL(envProxy) : void 0; } __name(getDefaultProxySettingsInternal, "getDefaultProxySettingsInternal"); function getUrlFromProxySettings(settings) { let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); if (settings.username) { parsedProxyUrl.username = settings.username; } if (settings.password) { parsedProxyUrl.password = settings.password; } return parsedProxyUrl; } __name(getUrlFromProxySettings, "getUrlFromProxySettings"); function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { if (request.agent) { return; } const url = new URL(request.url); const isInsecure = url.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } const headers = request.headers.toJSON(); if (isInsecure) { if (!cachedAgents.httpProxyAgent) { cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); } request.agent = cachedAgents.httpProxyAgent; } else { if (!cachedAgents.httpsProxyAgent) { cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); } request.agent = cachedAgents.httpsProxyAgent; } } __name(setProxyAgentOnRequest, "setProxyAgentOnRequest"); function proxyPolicy(proxySettings, options) { if (!noProxyListLoaded) { exports2.globalNoProxyList.push(...loadNoProxy()); } const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); const cachedAgents = {}; return { name: exports2.proxyPolicyName, async sendRequest(request, next) { if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); } return next(request); } }; } __name(proxyPolicy, "proxyPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js var require_agentPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentPolicyName = void 0; exports2.agentPolicy = agentPolicy; exports2.agentPolicyName = "agentPolicy"; function agentPolicy(agent) { return { name: exports2.agentPolicyName, sendRequest: async (req, next) => { if (!req.agent) { req.agent = agent; } return next(req); } }; } __name(agentPolicy, "agentPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js var require_tlsPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; exports2.tlsPolicyName = "tlsPolicy"; function tlsPolicy(tlsSettings) { return { name: exports2.tlsPolicyName, sendRequest: async (req, next) => { if (!req.tlsSettings) { req.tlsSettings = tlsSettings; } return next(req); } }; } __name(tlsPolicy, "tlsPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js var require_typeGuards = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isNodeReadableStream = isNodeReadableStream; exports2.isWebReadableStream = isWebReadableStream; exports2.isBinaryBody = isBinaryBody; exports2.isReadableStream = isReadableStream; exports2.isBlob = isBlob; function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } __name(isNodeReadableStream, "isNodeReadableStream"); function isWebReadableStream(x) { return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); } __name(isWebReadableStream, "isWebReadableStream"); function isBinaryBody(body) { return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); } __name(isBinaryBody, "isBinaryBody"); function isReadableStream(x) { return isNodeReadableStream(x) || isWebReadableStream(x); } __name(isReadableStream, "isReadableStream"); function isBlob(x) { return typeof x.stream === "function"; } __name(isBlob, "isBlob"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js var require_concat = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.concat = concat; var stream_1 = require("stream"); var typeGuards_js_1 = require_typeGuards(); async function* streamAsyncIterator() { const reader = this.getReader(); try { while (true) { const { done, value } = await reader.read(); if (done) { return; } yield value; } } finally { reader.releaseLock(); } } __name(streamAsyncIterator, "streamAsyncIterator"); function makeAsyncIterable(webStream) { if (!webStream[Symbol.asyncIterator]) { webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); } if (!webStream.values) { webStream.values = streamAsyncIterator.bind(webStream); } } __name(makeAsyncIterable, "makeAsyncIterable"); function ensureNodeStream(stream) { if (stream instanceof ReadableStream) { makeAsyncIterable(stream); return stream_1.Readable.fromWeb(stream); } else { return stream; } } __name(ensureNodeStream, "ensureNodeStream"); function toStream(source) { if (source instanceof Uint8Array) { return stream_1.Readable.from(Buffer.from(source)); } else if ((0, typeGuards_js_1.isBlob)(source)) { return ensureNodeStream(source.stream()); } else { return ensureNodeStream(source); } } __name(toStream, "toStream"); async function concat(sources) { return function() { const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); return stream_1.Readable.from(async function* () { for (const stream of streams) { for await (const chunk of stream) { yield chunk; } } }()); }; } __name(concat, "concat"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js var require_multipartPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.multipartPolicyName = void 0; exports2.multipartPolicy = multipartPolicy; var bytesEncoding_js_1 = require_bytesEncoding(); var typeGuards_js_1 = require_typeGuards(); var uuidUtils_js_1 = require_uuidUtils(); var concat_js_1 = require_concat(); function generateBoundary() { return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; } __name(generateBoundary, "generateBoundary"); function encodeHeaders(headers) { let result = ""; for (const [key, value] of headers) { result += `${key}: ${value}\r `; } return result; } __name(encodeHeaders, "encodeHeaders"); function getLength(source) { if (source instanceof Uint8Array) { return source.byteLength; } else if ((0, typeGuards_js_1.isBlob)(source)) { return source.size === -1 ? void 0 : source.size; } else { return void 0; } } __name(getLength, "getLength"); function getTotalLength(sources) { let total = 0; for (const source of sources) { const partLength = getLength(source); if (partLength === void 0) { return void 0; } else { total += partLength; } } return total; } __name(getTotalLength, "getTotalLength"); async function buildRequestBody(request, parts, boundary) { const sources = [ (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), ...parts.flatMap((part) => [ (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), part.body, (0, bytesEncoding_js_1.stringToUint8Array)(`\r --${boundary}`, "utf-8") ]), (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") ]; const contentLength = getTotalLength(sources); if (contentLength) { request.headers.set("Content-Length", contentLength); } request.body = await (0, concat_js_1.concat)(sources); } __name(buildRequestBody, "buildRequestBody"); exports2.multipartPolicyName = "multipartPolicy"; var maxBoundaryLength = 70; var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); function assertValidBoundary(boundary) { if (boundary.length > maxBoundaryLength) { throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); } if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); } } __name(assertValidBoundary, "assertValidBoundary"); function multipartPolicy() { return { name: exports2.multipartPolicyName, async sendRequest(request, next) { if (!request.multipartBody) { return next(request); } if (request.body) { throw new Error("multipartBody and regular body cannot be set at the same time"); } let boundary = request.multipartBody.boundary; const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); if (!parsedHeader) { throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); } const [, contentType, parsedBoundary] = parsedHeader; if (parsedBoundary && boundary && parsedBoundary !== boundary) { throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); } boundary ??= parsedBoundary; if (boundary) { assertValidBoundary(boundary); } else { boundary = generateBoundary(); } request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); await buildRequestBody(request, request.multipartBody.parts, boundary); request.multipartBody = void 0; return next(request); } }; } __name(multipartPolicy, "multipartPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js var require_createPipelineFromOptions = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; var logPolicy_js_1 = require_logPolicy(); var pipeline_js_1 = require_pipeline(); var redirectPolicy_js_1 = require_redirectPolicy(); var userAgentPolicy_js_1 = require_userAgentPolicy(); var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); var formDataPolicy_js_1 = require_formDataPolicy(); var checkEnvironment_js_1 = require_checkEnvironment(); var proxyPolicy_js_1 = require_proxyPolicy(); var agentPolicy_js_1 = require_agentPolicy(); var tlsPolicy_js_1 = require_tlsPolicy(); var multipartPolicy_js_1 = require_multipartPolicy(); function createPipelineFromOptions(options) { const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (checkEnvironment_js_1.isNodeLike) { if (options.agent) { pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); if (checkEnvironment_js_1.isNodeLike) { pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); } pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); return pipeline; } __name(createPipelineFromOptions, "createPipelineFromOptions"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js var require_apiVersionPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.apiVersionPolicyName = void 0; exports2.apiVersionPolicy = apiVersionPolicy; exports2.apiVersionPolicyName = "ApiVersionPolicy"; function apiVersionPolicy(options) { return { name: exports2.apiVersionPolicyName, sendRequest: (req, next) => { const url = new URL(req.url); if (!url.searchParams.get("api-version") && options.apiVersion) { req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; } return next(req); } }; } __name(apiVersionPolicy, "apiVersionPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js var require_credentials = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; exports2.isBearerTokenCredential = isBearerTokenCredential; exports2.isBasicCredential = isBasicCredential; exports2.isApiKeyCredential = isApiKeyCredential; function isOAuth2TokenCredential(credential) { return "getOAuth2Token" in credential; } __name(isOAuth2TokenCredential, "isOAuth2TokenCredential"); function isBearerTokenCredential(credential) { return "getBearerToken" in credential; } __name(isBearerTokenCredential, "isBearerTokenCredential"); function isBasicCredential(credential) { return "username" in credential && "password" in credential; } __name(isBasicCredential, "isBasicCredential"); function isApiKeyCredential(credential) { return "key" in credential; } __name(isApiKeyCredential, "isApiKeyCredential"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js var require_checkInsecureConnection = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ensureSecureConnection = ensureSecureConnection; var log_js_1 = require_log2(); var insecureConnectionWarningEmmitted = false; function allowInsecureConnection(request, options) { if (options.allowInsecureConnection && request.allowInsecureConnection) { const url = new URL(request.url); if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { return true; } } return false; } __name(allowInsecureConnection, "allowInsecureConnection"); function emitInsecureConnectionWarning() { const warning = "Sending token over insecure transport. Assume any token issued is compromised."; log_js_1.logger.warning(warning); if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { insecureConnectionWarningEmmitted = true; process.emitWarning(warning); } } __name(emitInsecureConnectionWarning, "emitInsecureConnectionWarning"); function ensureSecureConnection(request, options) { if (!request.url.toLowerCase().startsWith("https://")) { if (allowInsecureConnection(request, options)) { emitInsecureConnectionWarning(); } else { throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); } } } __name(ensureSecureConnection, "ensureSecureConnection"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js var require_apiKeyAuthenticationPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.apiKeyAuthenticationPolicyName = void 0; exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; var checkInsecureConnection_js_1 = require_checkInsecureConnection(); exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; function apiKeyAuthenticationPolicy(options) { return { name: exports2.apiKeyAuthenticationPolicyName, async sendRequest(request, next) { (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); if (!scheme) { return next(request); } if (scheme.apiKeyLocation !== "header") { throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); } request.headers.set(scheme.name, options.credential.key); return next(request); } }; } __name(apiKeyAuthenticationPolicy, "apiKeyAuthenticationPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js var require_basicAuthenticationPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.basicAuthenticationPolicyName = void 0; exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; var bytesEncoding_js_1 = require_bytesEncoding(); var checkInsecureConnection_js_1 = require_checkInsecureConnection(); exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; function basicAuthenticationPolicy(options) { return { name: exports2.basicAuthenticationPolicyName, async sendRequest(request, next) { (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); if (!scheme) { return next(request); } const { username, password } = options.credential; const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); request.headers.set("Authorization", `Basic ${headerValue}`); return next(request); } }; } __name(basicAuthenticationPolicy, "basicAuthenticationPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js var require_bearerAuthenticationPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerAuthenticationPolicyName = void 0; exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; var checkInsecureConnection_js_1 = require_checkInsecureConnection(); exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; function bearerAuthenticationPolicy(options) { return { name: exports2.bearerAuthenticationPolicyName, async sendRequest(request, next) { (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); if (!scheme) { return next(request); } const token = await options.credential.getBearerToken({ abortSignal: request.abortSignal }); request.headers.set("Authorization", `Bearer ${token}`); return next(request); } }; } __name(bearerAuthenticationPolicy, "bearerAuthenticationPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js var require_oauth2AuthenticationPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.oauth2AuthenticationPolicyName = void 0; exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; var checkInsecureConnection_js_1 = require_checkInsecureConnection(); exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; function oauth2AuthenticationPolicy(options) { return { name: exports2.oauth2AuthenticationPolicyName, async sendRequest(request, next) { (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); if (!scheme) { return next(request); } const token = await options.credential.getOAuth2Token(scheme.flows, { abortSignal: request.abortSignal }); request.headers.set("Authorization", `Bearer ${token}`); return next(request); } }; } __name(oauth2AuthenticationPolicy, "oauth2AuthenticationPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js var require_clientHelpers = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultPipeline = createDefaultPipeline; exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; var defaultHttpClient_js_1 = require_defaultHttpClient(); var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); var apiVersionPolicy_js_1 = require_apiVersionPolicy(); var credentials_js_1 = require_credentials(); var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); var cachedHttpClient; function createDefaultPipeline(options = {}) { const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); const { credential, authSchemes, allowInsecureConnection } = options; if (credential) { if ((0, credentials_js_1.isApiKeyCredential)(credential)) { pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isBasicCredential)(credential)) { pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } } return pipeline; } __name(createDefaultPipeline, "createDefaultPipeline"); function getCachedDefaultHttpsClient() { if (!cachedHttpClient) { cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); } return cachedHttpClient; } __name(getCachedDefaultHttpsClient, "getCachedDefaultHttpsClient"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js var require_multipart2 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.buildBodyPart = buildBodyPart; exports2.buildMultipartBody = buildMultipartBody; var restError_js_1 = require_restError(); var httpHeaders_js_1 = require_httpHeaders(); var bytesEncoding_js_1 = require_bytesEncoding(); var typeGuards_js_1 = require_typeGuards(); function getHeaderValue(descriptor, headerName) { if (descriptor.headers) { const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); if (actualHeaderName) { return descriptor.headers[actualHeaderName]; } } return void 0; } __name(getHeaderValue, "getHeaderValue"); function getPartContentType(descriptor) { const contentTypeHeader = getHeaderValue(descriptor, "content-type"); if (contentTypeHeader) { return contentTypeHeader; } if (descriptor.contentType === null) { return void 0; } if (descriptor.contentType) { return descriptor.contentType; } const { body } = descriptor; if (body === null || body === void 0) { return void 0; } if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { return "text/plain; charset=UTF-8"; } if (body instanceof Blob) { return body.type || "application/octet-stream"; } if ((0, typeGuards_js_1.isBinaryBody)(body)) { return "application/octet-stream"; } return "application/json"; } __name(getPartContentType, "getPartContentType"); function escapeDispositionField(value) { return JSON.stringify(value); } __name(escapeDispositionField, "escapeDispositionField"); function getContentDisposition(descriptor) { const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); if (contentDispositionHeader) { return contentDispositionHeader; } if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { return void 0; } const dispositionType = descriptor.dispositionType ?? "form-data"; let disposition = dispositionType; if (descriptor.name) { disposition += `; name=${escapeDispositionField(descriptor.name)}`; } let filename = void 0; if (descriptor.filename) { filename = descriptor.filename; } else if (typeof File !== "undefined" && descriptor.body instanceof File) { const filenameFromFile = descriptor.body.name; if (filenameFromFile !== "") { filename = filenameFromFile; } } if (filename) { disposition += `; filename=${escapeDispositionField(filename)}`; } return disposition; } __name(getContentDisposition, "getContentDisposition"); function normalizeBody(body, contentType) { if (body === void 0) { return new Uint8Array([]); } if ((0, typeGuards_js_1.isBinaryBody)(body)) { return body; } if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); } if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); } throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); } __name(normalizeBody, "normalizeBody"); function buildBodyPart(descriptor) { const contentType = getPartContentType(descriptor); const contentDisposition = getContentDisposition(descriptor); const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); if (contentType) { headers.set("content-type", contentType); } if (contentDisposition) { headers.set("content-disposition", contentDisposition); } const body = normalizeBody(descriptor.body, contentType); return { headers, body }; } __name(buildBodyPart, "buildBodyPart"); function buildMultipartBody(parts) { return { parts: parts.map(buildBodyPart) }; } __name(buildMultipartBody, "buildMultipartBody"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js var require_sendRequest = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.sendRequest = sendRequest; var restError_js_1 = require_restError(); var httpHeaders_js_1 = require_httpHeaders(); var pipelineRequest_js_1 = require_pipelineRequest(); var clientHelpers_js_1 = require_clientHelpers(); var typeGuards_js_1 = require_typeGuards(); var multipart_js_1 = require_multipart2(); async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); const request = buildPipelineRequest(method, url, options); try { const response = await pipeline.sendRequest(httpClient, request); const headers = response.headers.toJSON(); const stream = response.readableStreamBody ?? response.browserStreamBody; const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); const body = stream ?? parsedBody; if (options?.onResponse) { options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); } return { request, headers, status: `${response.status}`, body }; } catch (e) { if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { const { response } = e; const rawHeaders = response.headers.toJSON(); options?.onResponse({ ...response, request, rawHeaders }, e); } throw e; } } __name(sendRequest, "sendRequest"); function getRequestContentType(options = {}) { return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); } __name(getRequestContentType, "getRequestContentType"); function getContentType(body) { if (ArrayBuffer.isView(body)) { return "application/octet-stream"; } if (typeof body === "string") { try { JSON.parse(body); return "application/json"; } catch (error) { return void 0; } } return "application/json"; } __name(getContentType, "getContentType"); function buildPipelineRequest(method, url, options = {}) { const requestContentType = getRequestContentType(options); const { body, multipartBody } = getRequestBody(options.body, requestContentType); const hasContent = body !== void 0 || multipartBody !== void 0; const headers = (0, httpHeaders_js_1.createHttpHeaders)({ ...options.headers ? options.headers : {}, accept: options.accept ?? options.headers?.accept ?? "application/json", ...hasContent && requestContentType && { "content-type": requestContentType } }); return (0, pipelineRequest_js_1.createPipelineRequest)({ url, method, body, multipartBody, headers, allowInsecureConnection: options.allowInsecureConnection, abortSignal: options.abortSignal, onUploadProgress: options.onUploadProgress, onDownloadProgress: options.onDownloadProgress, timeout: options.timeout, enableBrowserStreams: true, streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 }); } __name(buildPipelineRequest, "buildPipelineRequest"); function getRequestBody(body, contentType = "") { if (body === void 0) { return { body: void 0 }; } if (typeof FormData !== "undefined" && body instanceof FormData) { return { body }; } if ((0, typeGuards_js_1.isReadableStream)(body)) { return { body }; } if (ArrayBuffer.isView(body)) { return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; } const firstType = contentType.split(";")[0]; switch (firstType) { case "application/json": return { body: JSON.stringify(body) }; case "multipart/form-data": if (Array.isArray(body)) { return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; } return { body: JSON.stringify(body) }; case "text/plain": return { body: String(body) }; default: if (typeof body === "string") { return { body }; } return { body: JSON.stringify(body) }; } } __name(getRequestBody, "getRequestBody"); function getResponseBody(response) { const contentType = response.headers.get("content-type") ?? ""; const firstType = contentType.split(";")[0]; const bodyToParse = response.bodyAsText ?? ""; if (firstType === "text/plain") { return String(bodyToParse); } try { return bodyToParse ? JSON.parse(bodyToParse) : void 0; } catch (error) { if (firstType === "application/json") { throw createParseError(response, error); } return String(bodyToParse); } } __name(getResponseBody, "getResponseBody"); function createParseError(response, err) { const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; return new restError_js_1.RestError(msg, { code: errCode, statusCode: response.status, request: response.request, response }); } __name(createParseError, "createParseError"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js var require_urlHelpers = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.buildRequestUrl = buildRequestUrl; exports2.buildBaseUrl = buildBaseUrl; exports2.replaceAll = replaceAll; function isQueryParameterWithOptions(x) { const value = x.value; return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; } __name(isQueryParameterWithOptions, "isQueryParameterWithOptions"); function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { if (routePath.startsWith("https://") || routePath.startsWith("http://")) { return routePath; } endpoint = buildBaseUrl(endpoint, options); routePath = buildRoutePath(routePath, pathParameters, options); const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); const url = new URL(requestUrl); return url.toString().replace(/([^:]\/)\/+/g, "$1"); } __name(buildRequestUrl, "buildRequestUrl"); function getQueryParamValue(key, allowReserved, style, param) { let separator; if (style === "pipeDelimited") { separator = "|"; } else if (style === "spaceDelimited") { separator = "%20"; } else { separator = ","; } let paramValues; if (Array.isArray(param)) { paramValues = param; } else if (typeof param === "object" && param.toString === Object.prototype.toString) { paramValues = Object.entries(param).flat(); } else { paramValues = [param]; } const value = paramValues.map((p) => { if (p === null || p === void 0) { return ""; } if (!p.toString || typeof p.toString !== "function") { throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); } const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); return allowReserved ? rawValue : encodeURIComponent(rawValue); }).join(separator); return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; } __name(getQueryParamValue, "getQueryParamValue"); function appendQueryParams(url, options = {}) { if (!options.queryParameters) { return url; } const parsedUrl = new URL(url); const queryParams = options.queryParameters; const paramStrings = []; for (const key of Object.keys(queryParams)) { const param = queryParams[key]; if (param === void 0 || param === null) { continue; } const hasMetadata = isQueryParameterWithOptions(param); const rawValue = hasMetadata ? param.value : param; const explode = hasMetadata ? param.explode ?? false : false; const style = hasMetadata && param.style ? param.style : "form"; if (explode) { if (Array.isArray(rawValue)) { for (const item of rawValue) { paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); } } else if (typeof rawValue === "object") { for (const [actualKey, value] of Object.entries(rawValue)) { paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); } } else { throw new Error("explode can only be set to true for objects and arrays"); } } else { paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); } } if (parsedUrl.search !== "") { parsedUrl.search += "&"; } parsedUrl.search += paramStrings.join("&"); return parsedUrl.toString(); } __name(appendQueryParams, "appendQueryParams"); function buildBaseUrl(endpoint, options) { if (!options.pathParameters) { return endpoint; } const pathParams = options.pathParameters; for (const [key, param] of Object.entries(pathParams)) { if (param === void 0 || param === null) { throw new Error(`Path parameters ${key} must not be undefined or null`); } if (!param.toString || typeof param.toString !== "function") { throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); } let value = param.toISOString !== void 0 ? param.toISOString() : String(param); if (!options.skipUrlEncoding) { value = encodeURIComponent(param); } endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; } return endpoint; } __name(buildBaseUrl, "buildBaseUrl"); function buildRoutePath(routePath, pathParameters, options = {}) { for (const pathParam of pathParameters) { const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); let value = typeof pathParam === "object" ? pathParam.value : pathParam; if (!options.skipUrlEncoding && !allowReserved) { value = encodeURIComponent(value); } routePath = routePath.replace(/\{[\w-]+\}/, String(value)); } return routePath; } __name(buildRoutePath, "buildRoutePath"); function replaceAll(value, searchValue, replaceValue) { return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); } __name(replaceAll, "replaceAll"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js var require_getClient = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getClient = getClient; var clientHelpers_js_1 = require_clientHelpers(); var sendRequest_js_1 = require_sendRequest(); var urlHelpers_js_1 = require_urlHelpers(); var checkEnvironment_js_1 = require_checkEnvironment(); function getClient(endpoint, clientOptions = {}) { const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); if (clientOptions.additionalPolicies?.length) { for (const { policy, position } of clientOptions.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; pipeline.addPolicy(policy, { afterPhase }); } } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint; const client = /* @__PURE__ */ __name((path2, ...args) => { const getUrl = /* @__PURE__ */ __name((requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path2, args, { allowInsecureConnection, ...requestOptions }), "getUrl"); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, post: (requestOptions = {}) => { return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, put: (requestOptions = {}) => { return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, patch: (requestOptions = {}) => { return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, delete: (requestOptions = {}) => { return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, head: (requestOptions = {}) => { return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, options: (requestOptions = {}) => { return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); }, trace: (requestOptions = {}) => { return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); } }; }, "client"); return { path: client, pathUnchecked: client, pipeline }; } __name(getClient, "getClient"); function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; return { then: function(onFulfilled, onrejected) { return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); }, async asBrowserStream() { if (checkEnvironment_js_1.isNodeLike) { throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } }, async asNodeStream() { if (checkEnvironment_js_1.isNodeLike) { return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } else { throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } } }; } __name(buildOperation, "buildOperation"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js var require_operationOptionHelpers = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; function operationOptionsToRequestParameters(options) { return { allowInsecureConnection: options.requestOptions?.allowInsecureConnection, timeout: options.requestOptions?.timeout, skipUrlEncoding: options.requestOptions?.skipUrlEncoding, abortSignal: options.abortSignal, onUploadProgress: options.requestOptions?.onUploadProgress, onDownloadProgress: options.requestOptions?.onDownloadProgress, headers: { ...options.requestOptions?.headers }, onResponse: options.onResponse }; } __name(operationOptionsToRequestParameters, "operationOptionsToRequestParameters"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js var require_restError2 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createRestError = createRestError; var restError_js_1 = require_restError(); var httpHeaders_js_1 = require_httpHeaders(); function createRestError(messageOrResponse, response) { const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; const internalError = resp.body?.error ?? resp.body; const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; return new restError_js_1.RestError(message, { statusCode: statusCodeToNumber(resp.status), code: internalError?.code, request: resp.request, response: toPipelineResponse(resp) }); } __name(createRestError, "createRestError"); function toPipelineResponse(response) { return { headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), request: response.request, status: statusCodeToNumber(response.status) ?? -1 }; } __name(toPipelineResponse, "toPipelineResponse"); function statusCodeToNumber(statusCode) { const status = Number.parseInt(statusCode); return Number.isNaN(status) ? void 0 : status; } __name(statusCodeToNumber, "statusCodeToNumber"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js var require_commonjs = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var AbortError_js_1 = require_AbortError(); Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { return AbortError_js_1.AbortError; } }); var logger_js_1 = require_logger(); Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { return logger_js_1.createClientLogger; } }); Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { return logger_js_1.getLogLevel; } }); Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { return logger_js_1.setLogLevel; } }); Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { return logger_js_1.TypeSpecRuntimeLogger; } }); var httpHeaders_js_1 = require_httpHeaders(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); tslib_1.__exportStar(require_schemes(), exports2); tslib_1.__exportStar(require_oauth2Flows(), exports2); var pipelineRequest_js_1 = require_pipelineRequest(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); var pipeline_js_1 = require_pipeline(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); var restError_js_1 = require_restError(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); var bytesEncoding_js_1 = require_bytesEncoding(); Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { return bytesEncoding_js_1.stringToUint8Array; } }); Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { return bytesEncoding_js_1.uint8ArrayToString; } }); var defaultHttpClient_js_1 = require_defaultHttpClient(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); var getClient_js_1 = require_getClient(); Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { return getClient_js_1.getClient; } }); var operationOptionHelpers_js_1 = require_operationOptionHelpers(); Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } }); var restError_js_2 = require_restError2(); Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { return restError_js_2.createRestError; } }); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js var require_pipeline2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createEmptyPipeline = createEmptyPipeline; var ts_http_runtime_1 = require_commonjs(); function createEmptyPipeline() { return (0, ts_http_runtime_1.createEmptyPipeline)(); } __name(createEmptyPipeline, "createEmptyPipeline"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js var require_internal = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createLoggerContext = void 0; var logger_js_1 = require_logger(); Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { return logger_js_1.createLoggerContext; } }); } }); // node_modules/@azure/logger/dist/commonjs/index.js var require_commonjs2 = __commonJS({ "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureLogger = void 0; exports2.setLogLevel = setLogLevel; exports2.getLogLevel = getLogLevel; exports2.createClientLogger = createClientLogger; var logger_1 = require_internal(); var context = (0, logger_1.createLoggerContext)({ logLevelEnvVarName: "AZURE_LOG_LEVEL", namespace: "azure" }); exports2.AzureLogger = context.logger; function setLogLevel(level) { context.setLogLevel(level); } __name(setLogLevel, "setLogLevel"); function getLogLevel() { return context.getLogLevel(); } __name(getLogLevel, "getLogLevel"); function createClientLogger(namespace) { return context.createClientLogger(namespace); } __name(createClientLogger, "createClientLogger"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js var require_log3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js var require_exponentialRetryPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); var constants_js_1 = require_constants8(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { return (0, retryPolicy_js_1.retryPolicy)([ (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ ...options, ignoreSystemErrors: true }) ], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }); } __name(exponentialRetryPolicy, "exponentialRetryPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js var require_systemErrorRetryPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); var constants_js_1 = require_constants8(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { return { name: exports2.systemErrorRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([ (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ ...options, ignoreHttpStatusCodes: true }) ], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } __name(systemErrorRetryPolicy, "systemErrorRetryPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js var require_throttlingRetryPolicy = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); var constants_js_1 = require_constants8(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { return { name: exports2.throttlingRetryPolicyName, sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } __name(throttlingRetryPolicy, "throttlingRetryPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js var require_internal2 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; var agentPolicy_js_1 = require_agentPolicy(); Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { return agentPolicy_js_1.agentPolicy; } }); Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { return agentPolicy_js_1.agentPolicyName; } }); var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicyName; } }); var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } }); var retryPolicy_js_1 = require_retryPolicy(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); var formDataPolicy_js_1 = require_formDataPolicy(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicyName; } }); var logPolicy_js_1 = require_logPolicy(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); var multipartPolicy_js_1 = require_multipartPolicy(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); var proxyPolicy_js_1 = require_proxyPolicy(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicyName; } }); Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); var redirectPolicy_js_1 = require_redirectPolicy(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); var tlsPolicy_js_1 = require_tlsPolicy(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); var userAgentPolicy_js_1 = require_userAgentPolicy(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js var require_logPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logPolicyName = void 0; exports2.logPolicy = logPolicy; var log_js_1 = require_log3(); var policies_1 = require_internal2(); exports2.logPolicyName = policies_1.logPolicyName; function logPolicy(options = {}) { return (0, policies_1.logPolicy)({ logger: log_js_1.logger.info, ...options }); } __name(logPolicy, "logPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js var require_redirectPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.redirectPolicyName = void 0; exports2.redirectPolicy = redirectPolicy; var policies_1 = require_internal2(); exports2.redirectPolicyName = policies_1.redirectPolicyName; function redirectPolicy(options = {}) { return (0, policies_1.redirectPolicy)(options); } __name(redirectPolicy, "redirectPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js var require_userAgentPlatform2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getHeaderName = getHeaderName; exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var node_os_1 = tslib_1.__importDefault(require("node:os")); var node_process_1 = tslib_1.__importDefault(require("node:process")); function getHeaderName() { return "User-Agent"; } __name(getHeaderName, "getHeaderName"); async function setPlatformSpecificData(map) { if (node_process_1.default && node_process_1.default.versions) { const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; const versions = node_process_1.default.versions; if (versions.bun) { map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { map.set("Node", `${versions.node} (${osInfo})`); } } } __name(setPlatformSpecificData, "setPlatformSpecificData"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js var require_constants9 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; exports2.SDK_VERSION = "1.22.2"; exports2.DEFAULT_RETRY_POLICY_COUNT = 3; } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js var require_userAgent2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform2(); var constants_js_1 = require_constants9(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { const token = value ? `${key}/${value}` : key; parts.push(token); } return parts.join(" "); } __name(getUserAgentString, "getUserAgentString"); function getUserAgentHeaderName() { return (0, userAgentPlatform_js_1.getHeaderName)(); } __name(getUserAgentHeaderName, "getUserAgentHeaderName"); async function getUserAgentValue(prefix) { const runtimeInfo = /* @__PURE__ */ new Map(); runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); const defaultAgent = getUserAgentString(runtimeInfo); const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; return userAgentValue; } __name(getUserAgentValue, "getUserAgentValue"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js var require_userAgentPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.userAgentPolicyName = void 0; exports2.userAgentPolicy = userAgentPolicy; var userAgent_js_1 = require_userAgent2(); var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); exports2.userAgentPolicyName = "userAgentPolicy"; function userAgentPolicy(options = {}) { const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); return { name: exports2.userAgentPolicyName, async sendRequest(request, next) { if (!request.headers.has(UserAgentHeaderName)) { request.headers.set(UserAgentHeaderName, await userAgentValue); } return next(request); } }; } __name(userAgentPolicy, "userAgentPolicy"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js var require_sha256 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.computeSha256Hmac = computeSha256Hmac; exports2.computeSha256Hash = computeSha256Hash; var node_crypto_1 = require("node:crypto"); async function computeSha256Hmac(key, stringToSign, encoding) { const decodedKey = Buffer.from(key, "base64"); return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); } __name(computeSha256Hmac, "computeSha256Hmac"); async function computeSha256Hash(content, encoding) { return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); } __name(computeSha256Hash, "computeSha256Hash"); } }); // node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js var require_internal3 = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; var delay_js_1 = require_delay(); Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { return delay_js_1.calculateRetryDelay; } }); var random_js_1 = require_random(); Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { return random_js_1.getRandomIntegerInclusive; } }); var object_js_1 = require_object(); Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); var sha256_js_1 = require_sha256(); Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { return sha256_js_1.computeSha256Hash; } }); Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { return sha256_js_1.computeSha256Hmac; } }); var uuidUtils_js_1 = require_uuidUtils(); Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { return uuidUtils_js_1.randomUUID; } }); var checkEnvironment_js_1 = require_checkEnvironment(); Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { return checkEnvironment_js_1.isBrowser; } }); Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { return checkEnvironment_js_1.isBun; } }); Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { return checkEnvironment_js_1.isNodeLike; } }); Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { return checkEnvironment_js_1.isNodeRuntime; } }); Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { return checkEnvironment_js_1.isDeno; } }); Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { return checkEnvironment_js_1.isReactNative; } }); Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { return checkEnvironment_js_1.isWebWorker; } }); var bytesEncoding_js_1 = require_bytesEncoding(); Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { return bytesEncoding_js_1.stringToUint8Array; } }); Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { return bytesEncoding_js_1.uint8ArrayToString; } }); var sanitizer_js_1 = require_sanitizer(); Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { return sanitizer_js_1.Sanitizer; } }); } }); // node_modules/@azure/core-util/dist/commonjs/aborterUtils.js var require_aborterUtils = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.cancelablePromiseRace = cancelablePromiseRace; async function cancelablePromiseRace(abortablePromiseBuilders, options) { const aborter = new AbortController(); function abortHandler() { aborter.abort(); } __name(abortHandler, "abortHandler"); options?.abortSignal?.addEventListener("abort", abortHandler); try { return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); } finally { aborter.abort(); options?.abortSignal?.removeEventListener("abort", abortHandler); } } __name(cancelablePromiseRace, "cancelablePromiseRace"); } }); // node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError2 = __commonJS({ "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError = class extends Error { static { __name(this, "AbortError"); } constructor(message) { super(message); this.name = "AbortError"; } }; exports2.AbortError = AbortError; } }); // node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js var require_commonjs3 = __commonJS({ "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError_js_1 = require_AbortError2(); Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { return AbortError_js_1.AbortError; } }); } }); // node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js var require_createAbortablePromise = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createAbortablePromise = createAbortablePromise; var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; return new Promise((resolve, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } __name(rejectOnAbort, "rejectOnAbort"); function removeListeners() { abortSignal?.removeEventListener("abort", onAbort); } __name(removeListeners, "removeListeners"); function onAbort() { cleanupBeforeAbort?.(); removeListeners(); rejectOnAbort(); } __name(onAbort, "onAbort"); if (abortSignal?.aborted) { return rejectOnAbort(); } try { buildPromise((x) => { removeListeners(); resolve(x); }, (x) => { removeListeners(); reject(x); }); } catch (err) { reject(err); } abortSignal?.addEventListener("abort", onAbort); }); } __name(createAbortablePromise, "createAbortablePromise"); } }); // node_modules/@azure/core-util/dist/commonjs/delay.js var require_delay2 = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.delay = delay; exports2.calculateRetryDelay = calculateRetryDelay; var createAbortablePromise_js_1 = require_createAbortablePromise(); var util_1 = require_internal3(); var StandardAbortMessage = "The delay was aborted."; function delay(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { token = setTimeout(resolve, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, abortErrorMsg: abortErrorMsg ?? StandardAbortMessage }); } __name(delay, "delay"); function calculateRetryDelay(retryAttempt, config) { const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); return { retryAfterInMs }; } __name(calculateRetryDelay, "calculateRetryDelay"); } }); // node_modules/@azure/core-util/dist/commonjs/error.js var require_error2 = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getErrorMessage = getErrorMessage; var util_1 = require_internal3(); function getErrorMessage(e) { if ((0, util_1.isError)(e)) { return e.message; } else { let stringified; try { if (typeof e === "object" && e) { stringified = JSON.stringify(e); } else { stringified = String(e); } } catch (err) { stringified = "[unable to stringify input]"; } return `Unknown error ${stringified}`; } } __name(getErrorMessage, "getErrorMessage"); } }); // node_modules/@azure/core-util/dist/commonjs/typeGuards.js var require_typeGuards2 = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isDefined = isDefined; exports2.isObjectWithProperties = isObjectWithProperties; exports2.objectHasProperty = objectHasProperty; function isDefined(thing) { return typeof thing !== "undefined" && thing !== null; } __name(isDefined, "isDefined"); function isObjectWithProperties(thing, properties) { if (!isDefined(thing) || typeof thing !== "object") { return false; } for (const property of properties) { if (!objectHasProperty(thing, property)) { return false; } } return true; } __name(isObjectWithProperties, "isObjectWithProperties"); function objectHasProperty(thing, property) { return isDefined(thing) && typeof thing === "object" && property in thing; } __name(objectHasProperty, "objectHasProperty"); } }); // node_modules/@azure/core-util/dist/commonjs/index.js var require_commonjs4 = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; exports2.calculateRetryDelay = calculateRetryDelay; exports2.computeSha256Hash = computeSha256Hash; exports2.computeSha256Hmac = computeSha256Hmac; exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; exports2.isError = isError; exports2.isObject = isObject; exports2.randomUUID = randomUUID; exports2.uint8ArrayToString = uint8ArrayToString; exports2.stringToUint8Array = stringToUint8Array; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var tspRuntime = tslib_1.__importStar(require_internal3()); var aborterUtils_js_1 = require_aborterUtils(); Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { return aborterUtils_js_1.cancelablePromiseRace; } }); var createAbortablePromise_js_1 = require_createAbortablePromise(); Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { return createAbortablePromise_js_1.createAbortablePromise; } }); var delay_js_1 = require_delay2(); Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { return delay_js_1.delay; } }); var error_js_1 = require_error2(); Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { return error_js_1.getErrorMessage; } }); var typeGuards_js_1 = require_typeGuards2(); Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { return typeGuards_js_1.isDefined; } }); Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { return typeGuards_js_1.isObjectWithProperties; } }); Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { return typeGuards_js_1.objectHasProperty; } }); function calculateRetryDelay(retryAttempt, config) { return tspRuntime.calculateRetryDelay(retryAttempt, config); } __name(calculateRetryDelay, "calculateRetryDelay"); function computeSha256Hash(content, encoding) { return tspRuntime.computeSha256Hash(content, encoding); } __name(computeSha256Hash, "computeSha256Hash"); function computeSha256Hmac(key, stringToSign, encoding) { return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); } __name(computeSha256Hmac, "computeSha256Hmac"); function getRandomIntegerInclusive(min, max) { return tspRuntime.getRandomIntegerInclusive(min, max); } __name(getRandomIntegerInclusive, "getRandomIntegerInclusive"); function isError(e) { return tspRuntime.isError(e); } __name(isError, "isError"); function isObject(input) { return tspRuntime.isObject(input); } __name(isObject, "isObject"); function randomUUID() { return tspRuntime.randomUUID(); } __name(randomUUID, "randomUUID"); exports2.isBrowser = tspRuntime.isBrowser; exports2.isBun = tspRuntime.isBun; exports2.isDeno = tspRuntime.isDeno; exports2.isNode = tspRuntime.isNodeLike; exports2.isNodeLike = tspRuntime.isNodeLike; exports2.isNodeRuntime = tspRuntime.isNodeRuntime; exports2.isReactNative = tspRuntime.isReactNative; exports2.isWebWorker = tspRuntime.isWebWorker; function uint8ArrayToString(bytes, format) { return tspRuntime.uint8ArrayToString(bytes, format); } __name(uint8ArrayToString, "uint8ArrayToString"); function stringToUint8Array(value, format) { return tspRuntime.stringToUint8Array(value, format); } __name(stringToUint8Array, "stringToUint8Array"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js var require_file2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasRawContent = hasRawContent; exports2.getRawContent = getRawContent; exports2.createFileFromStream = createFileFromStream; exports2.createFile = createFile; var core_util_1 = require_commonjs4(); function isNodeReadableStream(x) { return Boolean(x && typeof x["pipe"] === "function"); } __name(isNodeReadableStream, "isNodeReadableStream"); var unimplementedMethods = { arrayBuffer: () => { throw new Error("Not implemented"); }, bytes: () => { throw new Error("Not implemented"); }, slice: () => { throw new Error("Not implemented"); }, text: () => { throw new Error("Not implemented"); } }; var rawContent = Symbol("rawContent"); function hasRawContent(x) { return typeof x[rawContent] === "function"; } __name(hasRawContent, "hasRawContent"); function getRawContent(blob) { if (hasRawContent(blob)) { return blob[rawContent](); } else { return blob; } } __name(getRawContent, "getRawContent"); function createFileFromStream(stream, name, options = {}) { return { ...unimplementedMethods, type: options.type ?? "", lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: options.webkitRelativePath ?? "", size: options.size ?? -1, name, stream: () => { const s = stream(); if (isNodeReadableStream(s)) { throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); } return s; }, [rawContent]: stream }; } __name(createFileFromStream, "createFileFromStream"); function createFile(content, name, options = {}) { if (core_util_1.isNodeLike) { return { ...unimplementedMethods, type: options.type ?? "", lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: options.webkitRelativePath ?? "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([toArrayBuffer(content)]).stream(), [rawContent]: () => content }; } else { return new File([toArrayBuffer(content)], name, options); } } __name(createFile, "createFile"); function toArrayBuffer(source) { if ("resize" in source.buffer) { return source; } return source.map((x) => x); } __name(toArrayBuffer, "toArrayBuffer"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js var require_multipartPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.multipartPolicyName = void 0; exports2.multipartPolicy = multipartPolicy; var policies_1 = require_internal2(); var file_js_1 = require_file2(); exports2.multipartPolicyName = policies_1.multipartPolicyName; function multipartPolicy() { const tspPolicy = (0, policies_1.multipartPolicy)(); return { name: exports2.multipartPolicyName, sendRequest: async (request, next) => { if (request.multipartBody) { for (const part of request.multipartBody.parts) { if ((0, file_js_1.hasRawContent)(part.body)) { part.body = (0, file_js_1.getRawContent)(part.body); } } } return tspPolicy.sendRequest(request, next); } }; } __name(multipartPolicy, "multipartPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js var require_decompressResponsePolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.decompressResponsePolicyName = void 0; exports2.decompressResponsePolicy = decompressResponsePolicy; var policies_1 = require_internal2(); exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; function decompressResponsePolicy() { return (0, policies_1.decompressResponsePolicy)(); } __name(decompressResponsePolicy, "decompressResponsePolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js var require_defaultRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.defaultRetryPolicyName = void 0; exports2.defaultRetryPolicy = defaultRetryPolicy; var policies_1 = require_internal2(); exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; function defaultRetryPolicy(options = {}) { return (0, policies_1.defaultRetryPolicy)(options); } __name(defaultRetryPolicy, "defaultRetryPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; var policies_1 = require_internal2(); exports2.formDataPolicyName = policies_1.formDataPolicyName; function formDataPolicy() { return (0, policies_1.formDataPolicy)(); } __name(formDataPolicy, "formDataPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.proxyPolicyName = void 0; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; var policies_1 = require_internal2(); exports2.proxyPolicyName = policies_1.proxyPolicyName; function getDefaultProxySettings(proxyUrl) { return (0, policies_1.getDefaultProxySettings)(proxyUrl); } __name(getDefaultProxySettings, "getDefaultProxySettings"); function proxyPolicy(proxySettings, options) { return (0, policies_1.proxyPolicy)(proxySettings, options); } __name(proxyPolicy, "proxyPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.setClientRequestIdPolicyName = void 0; exports2.setClientRequestIdPolicy = setClientRequestIdPolicy; exports2.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { return { name: exports2.setClientRequestIdPolicyName, async sendRequest(request, next) { if (!request.headers.has(requestIdHeaderName)) { request.headers.set(requestIdHeaderName, request.requestId); } return next(request); } }; } __name(setClientRequestIdPolicy, "setClientRequestIdPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js var require_agentPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentPolicyName = void 0; exports2.agentPolicy = agentPolicy; var policies_1 = require_internal2(); exports2.agentPolicyName = policies_1.agentPolicyName; function agentPolicy(agent) { return (0, policies_1.agentPolicy)(agent); } __name(agentPolicy, "agentPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; var policies_1 = require_internal2(); exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { return (0, policies_1.tlsPolicy)(tlsSettings); } __name(tlsPolicy, "tlsPolicy"); } }); // node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TracingContextImpl = exports2.knownContextKeys = void 0; exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: Symbol.for("@azure/core-tracing span"), namespace: Symbol.for("@azure/core-tracing namespace") }; function createTracingContext(options = {}) { let context = new TracingContextImpl(options.parentContext); if (options.span) { context = context.setValue(exports2.knownContextKeys.span, options.span); } if (options.namespace) { context = context.setValue(exports2.knownContextKeys.namespace, options.namespace); } return context; } __name(createTracingContext, "createTracingContext"); var TracingContextImpl = class _TracingContextImpl { static { __name(this, "TracingContextImpl"); } _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } setValue(key, value) { const newContext = new _TracingContextImpl(this); newContext._contextMap.set(key, value); return newContext; } getValue(key) { return this._contextMap.get(key); } deleteValue(key) { const newContext = new _TracingContextImpl(this); newContext._contextMap.delete(key); return newContext; } }; exports2.TracingContextImpl = TracingContextImpl; } }); // node_modules/@azure/core-tracing/dist/commonjs/state.js var require_state = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.state = void 0; exports2.state = { instrumenterImplementation: void 0 }; } }); // node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultTracingSpan = createDefaultTracingSpan; exports2.createDefaultInstrumenter = createDefaultInstrumenter; exports2.useInstrumenter = useInstrumenter; exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { return { end: () => { }, isRecording: () => false, recordException: () => { }, setAttribute: () => { }, setStatus: () => { }, addEvent: () => { } }; } __name(createDefaultTracingSpan, "createDefaultTracingSpan"); function createDefaultInstrumenter() { return { createRequestHeaders: () => { return {}; }, parseTraceparentHeader: () => { return void 0; }, startSpan: (_name, spanOptions) => { return { span: createDefaultTracingSpan(), tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }) }; }, withContext(_context, callback, ...callbackArgs) { return callback(...callbackArgs); } }; } __name(createDefaultInstrumenter, "createDefaultInstrumenter"); function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } __name(useInstrumenter, "useInstrumenter"); function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } __name(getInstrumenter, "getInstrumenter"); } }); // node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { ...spanOptions, packageName, packageVersion, tracingContext: operationOptions?.tracingOptions?.tracingContext }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, updatedOptions }; } __name(startSpan, "startSpan"); async function withSpan(name, operationOptions, callback, spanOptions) { const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); try { const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); span.setStatus({ status: "success" }); return result; } catch (err) { span.setStatus({ status: "error", error: err }); throw err; } finally { span.end(); } } __name(withSpan, "withSpan"); function withContext(context, callback, ...callbackArgs) { return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); } __name(withContext, "withContext"); function parseTraceparentHeader(traceparentHeader) { return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); } __name(parseTraceparentHeader, "parseTraceparentHeader"); function createRequestHeaders(tracingContext) { return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); } __name(createRequestHeaders, "createRequestHeaders"); return { startSpan, withSpan, withContext, parseTraceparentHeader, createRequestHeaders }; } __name(createTracingClient, "createTracingClient"); } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTracingClient = exports2.useInstrumenter = void 0; var instrumenter_js_1 = require_instrumenter(); Object.defineProperty(exports2, "useInstrumenter", { enumerable: true, get: function() { return instrumenter_js_1.useInstrumenter; } }); var tracingClient_js_1 = require_tracingClient(); Object.defineProperty(exports2, "createTracingClient", { enumerable: true, get: function() { return tracingClient_js_1.createTracingClient; } }); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; var ts_http_runtime_1 = require_commonjs(); exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { return (0, ts_http_runtime_1.isRestError)(e); } __name(isRestError, "isRestError"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js var require_tracingPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tracingPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs5(); var constants_js_1 = require_constants9(); var userAgent_js_1 = require_userAgent2(); var log_js_1 = require_log3(); var core_util_1 = require_commonjs4(); var restError_js_1 = require_restError3(); var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { if (!tracingClient) { return next(request); } const userAgent = await userAgentPromise; const spanAttributes = { "http.url": sanitizer.sanitizeUrl(request.url), "http.method": request.method, "http.user_agent": userAgent, requestId: request.requestId }; if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } try { const response = await tracingClient.withContext(tracingContext, next, request); tryProcessResponse(span, response); return response; } catch (err) { tryProcessError(span, err); throw err; } } }; } __name(tracingPolicy, "tracingPolicy"); function tryCreateTracingClient() { try { return (0, core_tracing_1.createTracingClient)({ namespace: "", packageName: "@azure/core-rest-pipeline", packageVersion: constants_js_1.SDK_VERSION }); } catch (e) { log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); return void 0; } } __name(tryCreateTracingClient, "tryCreateTracingClient"); function tryCreateSpan(tracingClient, request, spanAttributes) { try { const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { spanKind: "client", spanAttributes }); if (!span.isRecording()) { span.end(); return void 0; } const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); for (const [key, value] of Object.entries(headers)) { request.headers.set(key, value); } return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; } catch (e) { log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); return void 0; } } __name(tryCreateSpan, "tryCreateSpan"); function tryProcessError(span, error) { try { span.setStatus({ status: "error", error: (0, core_util_1.isError)(error) ? error : void 0 }); if ((0, restError_js_1.isRestError)(error) && error.statusCode) { span.setAttribute("http.status_code", error.statusCode); } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } } __name(tryProcessError, "tryProcessError"); function tryProcessResponse(span, response) { try { span.setAttribute("http.status_code", response.status); const serviceRequestId = response.headers.get("x-ms-request-id"); if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } if (response.status >= 400) { span.setStatus({ status: "error" }); } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } } __name(tryProcessResponse, "tryProcessResponse"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js var require_wrapAbortSignal = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.wrapAbortSignalLike = wrapAbortSignalLike; function wrapAbortSignalLike(abortSignalLike) { if (abortSignalLike instanceof AbortSignal) { return { abortSignal: abortSignalLike }; } if (abortSignalLike.aborted) { return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; } const controller = new AbortController(); let needsCleanup = true; function cleanup() { if (needsCleanup) { abortSignalLike.removeEventListener("abort", listener); needsCleanup = false; } } __name(cleanup, "cleanup"); function listener() { controller.abort(abortSignalLike.reason); cleanup(); } __name(listener, "listener"); abortSignalLike.addEventListener("abort", listener); return { abortSignal: controller.signal, cleanup }; } __name(wrapAbortSignalLike, "wrapAbortSignalLike"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js var require_wrapAbortSignalLikePolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.wrapAbortSignalLikePolicyName = void 0; exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; var wrapAbortSignal_js_1 = require_wrapAbortSignal(); exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; function wrapAbortSignalLikePolicy() { return { name: exports2.wrapAbortSignalLikePolicyName, sendRequest: async (request, next) => { if (!request.abortSignal) { return next(request); } const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); request.abortSignal = abortSignal; try { return await next(request); } finally { cleanup?.(); } } }; } __name(wrapAbortSignalLikePolicy, "wrapAbortSignalLikePolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; var logPolicy_js_1 = require_logPolicy2(); var pipeline_js_1 = require_pipeline2(); var redirectPolicy_js_1 = require_redirectPolicy2(); var userAgentPolicy_js_1 = require_userAgentPolicy2(); var multipartPolicy_js_1 = require_multipartPolicy2(); var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); var formDataPolicy_js_1 = require_formDataPolicy2(); var core_util_1 = require_commonjs4(); var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); var agentPolicy_js_1 = require_agentPolicy2(); var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { if (options.agent) { pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); } pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); return pipeline; } __name(createPipelineFromOptions, "createPipelineFromOptions"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; var ts_http_runtime_1 = require_commonjs(); var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); return { async sendRequest(request) { const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; try { request.abortSignal = abortSignal; return await client.sendRequest(request); } finally { cleanup?.(); } } }; } __name(createDefaultHttpClient, "createDefaultHttpClient"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js var require_httpHeaders2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; var ts_http_runtime_1 = require_commonjs(); function createHttpHeaders(rawHeaders) { return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } __name(createHttpHeaders, "createHttpHeaders"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { return (0, ts_http_runtime_1.createPipelineRequest)(options); } __name(createPipelineRequest, "createPipelineRequest"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; var policies_1 = require_internal2(); exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { return (0, policies_1.exponentialRetryPolicy)(options); } __name(exponentialRetryPolicy, "exponentialRetryPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var policies_1 = require_internal2(); exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { return (0, policies_1.systemErrorRetryPolicy)(options); } __name(systemErrorRetryPolicy, "systemErrorRetryPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; var policies_1 = require_internal2(); exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { return (0, policies_1.throttlingRetryPolicy)(options); } __name(throttlingRetryPolicy, "throttlingRetryPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js var require_retryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryPolicy = retryPolicy; var logger_1 = require_commonjs2(); var constants_js_1 = require_constants9(); var policies_1 = require_internal2(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { return (0, policies_1.retryPolicy)(strategies, { logger: retryPolicyLogger, ...options }); } __name(retryPolicy, "retryPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js var require_tokenCycler = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires retryIntervalInMs: 3e3, // Allow refresh attempts every 3s refreshWindowInMs: 1e3 * 60 * 2 // Start refreshing 2m before expiry }; async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { async function tryGetAccessToken() { if (Date.now() < refreshTimeout) { try { return await getAccessToken(); } catch { return null; } } else { const finalToken = await getAccessToken(); if (finalToken === null) { throw new Error("Failed to refresh access token."); } return finalToken; } } __name(tryGetAccessToken, "tryGetAccessToken"); let token = await tryGetAccessToken(); while (token === null) { await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; } __name(beginRefresh, "beginRefresh"); function createTokenCycler(credential, tokenCyclerOptions) { let refreshWorker = null; let token = null; let tenantId; const options = { ...exports2.DEFAULT_CYCLER_OPTIONS, ...tokenCyclerOptions }; const cycler = { /** * Produces true if a refresh job is currently in progress. */ get isRefreshing() { return refreshWorker !== null; }, /** * Produces true if the cycler SHOULD refresh (we are within the refresh * window and not already refreshing) */ get shouldRefresh() { if (cycler.isRefreshing) { return false; } if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired * token). */ get mustRefresh() { return token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now(); } }; function refresh(scopes, getTokenOptions) { if (!cycler.isRefreshing) { const tryGetAccessToken = /* @__PURE__ */ __name(() => credential.getToken(scopes, getTokenOptions), "tryGetAccessToken"); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; tenantId = getTokenOptions.tenantId; return token; }).catch((reason) => { refreshWorker = null; token = null; tenantId = void 0; throw reason; }); } return refreshWorker; } __name(refresh, "refresh"); return async (scopes, tokenOptions) => { const hasClaimChallenge = Boolean(tokenOptions.claims); const tenantIdChanged = tenantId !== tokenOptions.tenantId; if (hasClaimChallenge) { token = null; } const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; if (mustRefresh) { return refresh(scopes, tokenOptions); } if (cycler.shouldRefresh) { refresh(scopes, tokenOptions); } return token; }; } __name(createTokenCycler, "createTokenCycler"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js var require_bearerTokenAuthenticationPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); var log_js_1 = require_log3(); var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; async function trySendRequest(request, next) { try { return [await next(request), void 0]; } catch (e) { if ((0, restError_js_1.isRestError)(e) && e.response) { return [e.response, e]; } else { throw e; } } } __name(trySendRequest, "trySendRequest"); async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions, enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } __name(defaultAuthorizeRequest, "defaultAuthorizeRequest"); function isChallengeResponse(response) { return response.status === 401 && response.headers.has("WWW-Authenticate"); } __name(isChallengeResponse, "isChallengeResponse"); async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { const { scopes } = onChallengeOptions; const accessToken = await onChallengeOptions.getAccessToken(scopes, { enableCae: true, claims: caeClaims }); if (!accessToken) { return false; } onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } __name(authorizeRequestOnCaeChallenge, "authorizeRequestOnCaeChallenge"); function bearerTokenAuthenticationPolicy(options) { const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; const callbacks = { authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ ) : () => Promise.resolve(null); return { name: exports2.bearerTokenAuthenticationPolicyName, /** * If there's no challenge parameter: * - It will try to retrieve the token using the cache, or the credential's getToken. * - Then it will try the next policy with or without the retrieved token. * * It uses the challenge parameters to: * - Skip a first attempt to get the token from the credential if there's no cached token, * since it expects the token to be retrievable only after the challenge. * - Prepare the outgoing request if the `prepareRequest` method has been provided. * - Send an initial request to receive the challenge if it fails. * - Process a challenge if the response contains it. * - Retrieve a token with the challenge information, then re-send the request. */ async sendRequest(request, next) { if (!request.url.toLowerCase().startsWith("https://")) { throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); } await callbacks.authorizeRequest({ scopes: Array.isArray(scopes) ? scopes : [scopes], request, getAccessToken, logger }); let response; let error; let shouldSendRequest; [response, error] = await trySendRequest(request, next); if (isChallengeResponse(response)) { let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); if (claims) { let parsedClaim; try { parsedClaim = atob(claims); } catch (e) { logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); return response; } shouldSendRequest = await authorizeRequestOnCaeChallenge({ scopes: Array.isArray(scopes) ? scopes : [scopes], response, request, getAccessToken, logger }, parsedClaim); if (shouldSendRequest) { [response, error] = await trySendRequest(request, next); } } else if (callbacks.authorizeRequestOnChallenge) { shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ scopes: Array.isArray(scopes) ? scopes : [scopes], request, response, getAccessToken, logger }); if (shouldSendRequest) { [response, error] = await trySendRequest(request, next); } if (isChallengeResponse(response)) { claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); if (claims) { let parsedClaim; try { parsedClaim = atob(claims); } catch (e) { logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); return response; } shouldSendRequest = await authorizeRequestOnCaeChallenge({ scopes: Array.isArray(scopes) ? scopes : [scopes], response, request, getAccessToken, logger }, parsedClaim); if (shouldSendRequest) { [response, error] = await trySendRequest(request, next); } } } } } if (error) { throw error; } else { return response; } } }; } __name(bearerTokenAuthenticationPolicy, "bearerTokenAuthenticationPolicy"); function parseChallenges(challenges) { const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; const paramRegex = /(\w+)="([^"]*)"/g; const parsedChallenges = []; let match; while ((match = challengeRegex.exec(challenges)) !== null) { const scheme = match[1]; const paramsString = match[2]; const params = {}; let paramMatch; while ((paramMatch = paramRegex.exec(paramsString)) !== null) { params[paramMatch[1]] = paramMatch[2]; } parsedChallenges.push({ scheme, params }); } return parsedChallenges; } __name(parseChallenges, "parseChallenges"); function getCaeChallengeClaims(challenges) { if (!challenges) { return; } const parsedChallenges = parseChallenges(challenges); return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; } __name(getCaeChallengeClaims, "getCaeChallengeClaims"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js var require_ndJsonPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/ndJsonPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ndJsonPolicyName = void 0; exports2.ndJsonPolicy = ndJsonPolicy; exports2.ndJsonPolicyName = "ndJsonPolicy"; function ndJsonPolicy() { return { name: exports2.ndJsonPolicyName, async sendRequest(request, next) { if (typeof request.body === "string" && request.body.startsWith("[")) { const body = JSON.parse(request.body); if (Array.isArray(body)) { request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); } } return next(request); } }; } __name(ndJsonPolicy, "ndJsonPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/auxiliaryAuthenticationHeaderPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } __name(sendAuthorizeRequest, "sendAuthorizeRequest"); function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; const logger = options.logger || log_js_1.logger; const tokenCyclerMap = /* @__PURE__ */ new WeakMap(); return { name: exports2.auxiliaryAuthenticationHeaderPolicyName, async sendRequest(request, next) { if (!request.url.toLowerCase().startsWith("https://")) { throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); } if (!credentials || credentials.length === 0) { logger.info(`${exports2.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); return next(request); } const tokenPromises = []; for (const credential of credentials) { let getAccessToken = tokenCyclerMap.get(credential); if (!getAccessToken) { getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); tokenCyclerMap.set(credential, getAccessToken); } tokenPromises.push(sendAuthorizeRequest({ scopes: Array.isArray(scopes) ? scopes : [scopes], request, getAccessToken, logger })); } const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); if (auxiliaryTokens.length === 0) { logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); return next(request); } request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); return next(request); } }; } __name(auxiliaryAuthenticationHeaderPolicy, "auxiliaryAuthenticationHeaderPolicy"); } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } }); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); Object.defineProperty(exports2, "setClientRequestIdPolicy", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } }); Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicyName; } }); Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); var tracingPolicy_js_1 = require_tracingPolicy(); Object.defineProperty(exports2, "tracingPolicy", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicy; } }); Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicyName; } }); var bearerTokenAuthenticationPolicy_js_1 = require_bearerTokenAuthenticationPolicy(); Object.defineProperty(exports2, "bearerTokenAuthenticationPolicy", { enumerable: true, get: function() { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } }); Object.defineProperty(exports2, "bearerTokenAuthenticationPolicyName", { enumerable: true, get: function() { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } }); var ndJsonPolicy_js_1 = require_ndJsonPolicy(); Object.defineProperty(exports2, "ndJsonPolicy", { enumerable: true, get: function() { return ndJsonPolicy_js_1.ndJsonPolicy; } }); Object.defineProperty(exports2, "ndJsonPolicyName", { enumerable: true, get: function() { return ndJsonPolicy_js_1.ndJsonPolicyName; } }); var auxiliaryAuthenticationHeaderPolicy_js_1 = require_auxiliaryAuthenticationHeaderPolicy(); Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicy", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } }); Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); var agentPolicy_js_1 = require_agentPolicy2(); Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { return agentPolicy_js_1.agentPolicy; } }); Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { return agentPolicy_js_1.agentPolicyName; } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; } }); Object.defineProperty(exports2, "createFileFromStream", { enumerable: true, get: function() { return file_js_1.createFileFromStream; } }); } }); // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { static { __name(this, "AzureKeyCredential"); } _key; /** * The value of the key to be used in authentication */ get key() { return this._key; } /** * Create an instance of an AzureKeyCredential for use * with a service client. * * @param key - The initial value of the key to use in authentication */ constructor(key) { if (!key) { throw new Error("key must be a non-empty string"); } this._key = key; } /** * Change the value of the key. * * Updates will take effect upon the next request after * updating the key value. * * @param newKey - The new key value to be used */ update(newKey) { this._key = newKey; } }; exports2.AzureKeyCredential = AzureKeyCredential; } }); // node_modules/@azure/core-auth/dist/commonjs/keyCredential.js var require_keyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/keyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } __name(isKeyCredential, "isKeyCredential"); } }); // node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js var require_azureNamedKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { static { __name(this, "AzureNamedKeyCredential"); } _key; _name; /** * The value of the key to be used in authentication. */ get key() { return this._key; } /** * The value of the name to be used in authentication. */ get name() { return this._name; } /** * Create an instance of an AzureNamedKeyCredential for use * with a service client. * * @param name - The initial value of the name to use in authentication. * @param key - The initial value of the key to use in authentication. */ constructor(name, key) { if (!name || !key) { throw new TypeError("name and key must be non-empty strings"); } this._name = name; this._key = key; } /** * Change the value of the key. * * Updates will take effect upon the next request after * updating the key value. * * @param newName - The new name value to be used. * @param newKey - The new key value to be used. */ update(newName, newKey) { if (!newName || !newKey) { throw new TypeError("newName and newKey must be non-empty strings"); } this._name = newName; this._key = newKey; } }; exports2.AzureNamedKeyCredential = AzureNamedKeyCredential; function isNamedKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && typeof credential.key === "string" && typeof credential.name === "string"; } __name(isNamedKeyCredential, "isNamedKeyCredential"); } }); // node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js var require_azureSASCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; var core_util_1 = require_commonjs4(); var AzureSASCredential = class { static { __name(this, "AzureSASCredential"); } _signature; /** * The value of the shared access signature to be used in authentication */ get signature() { return this._signature; } /** * Create an instance of an AzureSASCredential for use * with a service client. * * @param signature - The initial value of the shared access signature to use in authentication */ constructor(signature) { if (!signature) { throw new Error("shared access signature must be a non-empty string"); } this._signature = signature; } /** * Change the value of the signature. * * Updates will take effect upon the next request after * updating the signature value. * * @param newSignature - The new shared access signature value to be used */ update(newSignature) { if (!newSignature) { throw new Error("shared access signature must be a non-empty string"); } this._signature = newSignature; } }; exports2.AzureSASCredential = AzureSASCredential; function isSASCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"; } __name(isSASCredential, "isSASCredential"); } }); // node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isBearerToken = isBearerToken; exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; function isBearerToken(accessToken) { return !accessToken.tokenType || accessToken.tokenType === "Bearer"; } __name(isBearerToken, "isBearerToken"); function isPopToken(accessToken) { return accessToken.tokenType === "pop"; } __name(isPopToken, "isPopToken"); function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); } __name(isTokenCredential, "isTokenCredential"); } }); // node_modules/@azure/core-auth/dist/commonjs/index.js var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isTokenCredential = exports2.isSASCredential = exports2.AzureSASCredential = exports2.isNamedKeyCredential = exports2.AzureNamedKeyCredential = exports2.isKeyCredential = exports2.AzureKeyCredential = void 0; var azureKeyCredential_js_1 = require_azureKeyCredential(); Object.defineProperty(exports2, "AzureKeyCredential", { enumerable: true, get: function() { return azureKeyCredential_js_1.AzureKeyCredential; } }); var keyCredential_js_1 = require_keyCredential(); Object.defineProperty(exports2, "isKeyCredential", { enumerable: true, get: function() { return keyCredential_js_1.isKeyCredential; } }); var azureNamedKeyCredential_js_1 = require_azureNamedKeyCredential(); Object.defineProperty(exports2, "AzureNamedKeyCredential", { enumerable: true, get: function() { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } }); Object.defineProperty(exports2, "isNamedKeyCredential", { enumerable: true, get: function() { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } }); var azureSASCredential_js_1 = require_azureSASCredential(); Object.defineProperty(exports2, "AzureSASCredential", { enumerable: true, get: function() { return azureSASCredential_js_1.AzureSASCredential; } }); Object.defineProperty(exports2, "isSASCredential", { enumerable: true, get: function() { return azureSASCredential_js_1.isSASCredential; } }); var tokenCredential_js_1 = require_tokenCredential(); Object.defineProperty(exports2, "isTokenCredential", { enumerable: true, get: function() { return tokenCredential_js_1.isTokenCredential; } }); } }); // node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.disableKeepAlivePolicyName = void 0; exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { name: exports2.disableKeepAlivePolicyName, async sendRequest(request, next) { request.disableKeepAlive = true; return next(request); } }; } __name(createDisableKeepAlivePolicy, "createDisableKeepAlivePolicy"); function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } __name(pipelineContainsDisableKeepAlivePolicy, "pipelineContainsDisableKeepAlivePolicy"); } }); // node_modules/@azure/core-client/dist/commonjs/base64.js var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.encodeString = encodeString; exports2.encodeByteArray = encodeByteArray; exports2.decodeString = decodeString; exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } __name(encodeString, "encodeString"); function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } __name(encodeByteArray, "encodeByteArray"); function decodeString(value) { return Buffer.from(value, "base64"); } __name(decodeString, "decodeString"); function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } __name(decodeStringToString, "decodeStringToString"); } }); // node_modules/@azure/core-client/dist/commonjs/interfaces.js var require_interfaces = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaces.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.XML_CHARKEY = exports2.XML_ATTRKEY = void 0; exports2.XML_ATTRKEY = "$"; exports2.XML_CHARKEY = "_"; } }); // node_modules/@azure/core-client/dist/commonjs/utils.js var require_utils3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isPrimitiveBody = isPrimitiveBody; exports2.isDuration = isDuration; exports2.isValidUuid = isValidUuid; exports2.flattenResponse = flattenResponse; function isPrimitiveBody(value, mapperTypeName) { return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); } __name(isPrimitiveBody, "isPrimitiveBody"); var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } __name(isDuration, "isDuration"); var 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; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } __name(isValidUuid, "isValidUuid"); function handleNullableResponseAndWrappableBody(responseObject) { const combinedHeadersAndBody = { ...responseObject.headers, ...responseObject.body }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { return responseObject.shouldWrapBody ? { ...responseObject.headers, body: responseObject.body } : combinedHeadersAndBody; } } __name(handleNullableResponseAndWrappableBody, "handleNullableResponseAndWrappableBody"); function flattenResponse(fullResponse, responseSpec) { const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { return { ...parsedHeaders, body: fullResponse.parsedBody }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; const isNullable = Boolean(bodyMapper?.nullable); const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { return { ...parsedHeaders, blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { for (const key of Object.keys(parsedHeaders)) { arrayResponse[key] = parsedHeaders[key]; } } return isNullable && !fullResponse.parsedBody && !parsedHeaders && Object.getOwnPropertyNames(modelProperties).length === 0 ? null : arrayResponse; } return handleNullableResponseAndWrappableBody({ body: fullResponse.parsedBody, headers: parsedHeaders, hasNullableType: isNullable, shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } __name(flattenResponse, "flattenResponse"); } }); // node_modules/@azure/core-client/dist/commonjs/serializer.js var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MapperTypeNames = void 0; exports2.createSerializer = createSerializer; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); var utils_js_1 = require_utils3(); var SerializerImpl = class { static { __name(this, "SerializerImpl"); } modelMappers; isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; } /** * @deprecated Removing the constraints validation on client side. */ validateConstraints(mapper, value, objectName) { const failValidation = /* @__PURE__ */ __name((constraintName, constraintValue) => { throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); }, "failValidation"); if (mapper.constraints && value !== void 0 && value !== null) { const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems } = mapper.constraints; if (ExclusiveMaximum !== void 0 && value >= ExclusiveMaximum) { failValidation("ExclusiveMaximum", ExclusiveMaximum); } if (ExclusiveMinimum !== void 0 && value <= ExclusiveMinimum) { failValidation("ExclusiveMinimum", ExclusiveMinimum); } if (InclusiveMaximum !== void 0 && value > InclusiveMaximum) { failValidation("InclusiveMaximum", InclusiveMaximum); } if (InclusiveMinimum !== void 0 && value < InclusiveMinimum) { failValidation("InclusiveMinimum", InclusiveMinimum); } if (MaxItems !== void 0 && value.length > MaxItems) { failValidation("MaxItems", MaxItems); } if (MaxLength !== void 0 && value.length > MaxLength) { failValidation("MaxLength", MaxLength); } if (MinItems !== void 0 && value.length < MinItems) { failValidation("MinItems", MinItems); } if (MinLength !== void 0 && value.length < MinLength) { failValidation("MinLength", MinLength); } if (MultipleOf !== void 0 && value % MultipleOf !== 0) { failValidation("MultipleOf", MultipleOf); } if (Pattern) { const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; if (typeof value !== "string" || value.match(pattern) === null) { failValidation("Pattern", Pattern); } } if (UniqueItems && value.some((item, i, ar) => ar.indexOf(item) !== i)) { failValidation("UniqueItems", UniqueItems); } } } /** * Serialize the given object based on its metadata defined in the mapper * * @param mapper - The mapper which defines the metadata of the serializable object * * @param object - A valid Javascript object to be serialized * * @param objectName - Name of the serialized object * * @param options - additional options to serialization * * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { const updatedOptions = { xml: { rootName: options.xml.rootName ?? "", includeRoot: options.xml.includeRoot ?? false, xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; const mapperType = mapper.type.name; if (!objectName) { objectName = mapper.serializedName; } if (mapperType.match(/^Sequence$/i) !== null) { payload = []; } if (mapper.isConstant) { object = mapper.defaultValue; } const { required, nullable } = mapper; if (required && nullable && object === void 0) { throw new Error(`${objectName} cannot be undefined.`); } if (required && !nullable && (object === void 0 || object === null)) { throw new Error(`${objectName} cannot be null or undefined.`); } if (!required && nullable === false && object === null) { throw new Error(`${objectName} cannot be null.`); } if (object === void 0 || object === null) { payload = object; } else { if (mapperType.match(/^any$/i) !== null) { payload = object; } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { payload = serializeBasicTypes(mapperType, objectName, object); } else if (mapperType.match(/^Enum$/i) !== null) { const enumMapper = mapper; payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { payload = serializeDateTypes(mapperType, object, objectName); } else if (mapperType.match(/^ByteArray$/i) !== null) { payload = serializeByteArrayType(objectName, object); } else if (mapperType.match(/^Base64Url$/i) !== null) { payload = serializeBase64UrlType(objectName, object); } else if (mapperType.match(/^Sequence$/i) !== null) { payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); } else if (mapperType.match(/^Dictionary$/i) !== null) { payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); } else if (mapperType.match(/^Composite$/i) !== null) { payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); } } return payload; } /** * Deserialize the given object based on its metadata defined in the mapper * * @param mapper - The mapper which defines the metadata of the serializable object * * @param responseBody - A valid Javascript entity to be deserialized * * @param objectName - Name of the deserialized object * * @param options - Controls behavior of XML parser and builder. * * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { const updatedOptions = { xml: { rootName: options.xml.rootName ?? "", includeRoot: options.xml.includeRoot ?? false, xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { responseBody = []; } if (mapper.defaultValue !== void 0) { responseBody = mapper.defaultValue; } return responseBody; } let payload; const mapperType = mapper.type.name; if (!objectName) { objectName = mapper.serializedName; } if (mapperType.match(/^Composite$/i) !== null) { payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); } else { if (this.isXML) { const xmlCharKey = updatedOptions.xml.xmlCharKey; if (responseBody[interfaces_js_1.XML_ATTRKEY] !== void 0 && responseBody[xmlCharKey] !== void 0) { responseBody = responseBody[xmlCharKey]; } } if (mapperType.match(/^Number$/i) !== null) { payload = parseFloat(responseBody); if (isNaN(payload)) { payload = responseBody; } } else if (mapperType.match(/^Boolean$/i) !== null) { if (responseBody === "true") { payload = true; } else if (responseBody === "false") { payload = false; } else { payload = responseBody; } } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { payload = responseBody; } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { payload = new Date(responseBody); } else if (mapperType.match(/^UnixTime$/i) !== null) { payload = unixTimeToDate(responseBody); } else if (mapperType.match(/^ByteArray$/i) !== null) { payload = base64.decodeString(responseBody); } else if (mapperType.match(/^Base64Url$/i) !== null) { payload = base64UrlToByteArray(responseBody); } else if (mapperType.match(/^Sequence$/i) !== null) { payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); } else if (mapperType.match(/^Dictionary$/i) !== null) { payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); } } if (mapper.isConstant) { payload = mapper.defaultValue; } return payload; } }; function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } __name(createSerializer, "createSerializer"); function trimEnd(str, ch) { let len = str.length; while (len - 1 >= 0 && str[len - 1] === ch) { --len; } return str.substr(0, len); } __name(trimEnd, "trimEnd"); function bufferToBase64Url(buffer) { if (!buffer) { return void 0; } if (!(buffer instanceof Uint8Array)) { throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); } const str = base64.encodeByteArray(buffer); return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } __name(bufferToBase64Url, "bufferToBase64Url"); function base64UrlToByteArray(str) { if (!str) { return void 0; } if (str && typeof str.valueOf() !== "string") { throw new Error("Please provide an input of type string for converting to Uint8Array"); } str = str.replace(/-/g, "+").replace(/_/g, "/"); return base64.decodeString(str); } __name(base64UrlToByteArray, "base64UrlToByteArray"); function splitSerializeName(prop) { const classes = []; let partialclass = ""; if (prop) { const subwords = prop.split("."); for (const item of subwords) { if (item.charAt(item.length - 1) === "\\") { partialclass += item.substr(0, item.length - 1) + "."; } else { partialclass += item; classes.push(partialclass); partialclass = ""; } } } return classes; } __name(splitSerializeName, "splitSerializeName"); function dateToUnixTime(d) { if (!d) { return void 0; } if (typeof d.valueOf() === "string") { d = new Date(d); } return Math.floor(d.getTime() / 1e3); } __name(dateToUnixTime, "dateToUnixTime"); function unixTimeToDate(n) { if (!n) { return void 0; } return new Date(n * 1e3); } __name(unixTimeToDate, "unixTimeToDate"); function serializeBasicTypes(typeName, objectName, value) { if (value !== null && value !== void 0) { if (typeName.match(/^Number$/i) !== null) { if (typeof value !== "number") { throw new Error(`${objectName} with value ${value} must be of type number.`); } } else if (typeName.match(/^String$/i) !== null) { if (typeof value.valueOf() !== "string") { throw new Error(`${objectName} with value "${value}" must be of type string.`); } } else if (typeName.match(/^Uuid$/i) !== null) { if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); } } else if (typeName.match(/^Boolean$/i) !== null) { if (typeof value !== "boolean") { throw new Error(`${objectName} with value ${value} must be of type boolean.`); } } else if (typeName.match(/^Stream$/i) !== null) { const objectType = typeof value; if (objectType !== "string" && typeof value.pipe !== "function" && // NodeJS.ReadableStream typeof value.tee !== "function" && // browser ReadableStream !(value instanceof ArrayBuffer) && !ArrayBuffer.isView(value) && // File objects count as a type of Blob, so we want to use instanceof explicitly !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && objectType !== "function") { throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); } } } return value; } __name(serializeBasicTypes, "serializeBasicTypes"); function serializeEnumType(objectName, allowedValues, value) { if (!allowedValues) { throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); } const isPresent = allowedValues.some((item) => { if (typeof item.valueOf() === "string") { return item.toLowerCase() === value.toLowerCase(); } return item === value; }); if (!isPresent) { throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); } return value; } __name(serializeEnumType, "serializeEnumType"); function serializeByteArrayType(objectName, value) { if (value !== void 0 && value !== null) { if (!(value instanceof Uint8Array)) { throw new Error(`${objectName} must be of type Uint8Array.`); } value = base64.encodeByteArray(value); } return value; } __name(serializeByteArrayType, "serializeByteArrayType"); function serializeBase64UrlType(objectName, value) { if (value !== void 0 && value !== null) { if (!(value instanceof Uint8Array)) { throw new Error(`${objectName} must be of type Uint8Array.`); } value = bufferToBase64Url(value); } return value; } __name(serializeBase64UrlType, "serializeBase64UrlType"); function serializeDateTypes(typeName, value, objectName) { if (value !== void 0 && value !== null) { if (typeName.match(/^Date$/i) !== null) { if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); } value = value instanceof Date ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); } else if (typeName.match(/^DateTime$/i) !== null) { if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); } value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); } else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); } value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); } else if (typeName.match(/^UnixTime$/i) !== null) { if (!(value instanceof Date || typeof value.valueOf() === "string" && !isNaN(Date.parse(value)))) { throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`); } value = dateToUnixTime(value); } else if (typeName.match(/^TimeSpan$/i) !== null) { if (!(0, utils_js_1.isDuration)(value)) { throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); } } } return value; } __name(serializeDateTypes, "serializeDateTypes"); function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } let elementType = mapper.type.element; if (!elementType || typeof elementType !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { const serializedValue = serializer.serialize(elementType, object[i], objectName, options); if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; tempArray[i][options.xml.xmlCharKey] = serializedValue; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } } else { tempArray[i] = serializedValue; } } return tempArray; } __name(serializeSequenceType, "serializeSequenceType"); function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { if (typeof object !== "object") { throw new Error(`${objectName} must be of type object.`); } const valueType = mapper.type.value; if (!valueType || typeof valueType !== "object") { throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); } const tempDictionary = {}; for (const key of Object.keys(object)) { const serializedValue = serializer.serialize(valueType, object[key], objectName, options); tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); } if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; const result = tempDictionary; result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; return result; } return tempDictionary; } __name(serializeDictionaryType, "serializeDictionaryType"); function resolveAdditionalProperties(serializer, mapper, objectName) { const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); return modelMapper?.type.additionalProperties; } return additionalProperties; } __name(resolveAdditionalProperties, "resolveAdditionalProperties"); function resolveReferencedMapper(serializer, mapper, objectName) { const className = mapper.type.className; if (!className) { throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, void 0, 2)}".`); } return serializer.modelMappers[className]; } __name(resolveReferencedMapper, "resolveReferencedMapper"); function resolveModelProperties(serializer, mapper, objectName) { let modelProps = mapper.type.modelProperties; if (!modelProps) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } } return modelProps; } __name(resolveModelProperties, "resolveModelProperties"); function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); } if (object !== void 0 && object !== null) { const payload = {}; const modelProps = resolveModelProperties(serializer, mapper, objectName); for (const key of Object.keys(modelProps)) { const propertyMapper = modelProps[key]; if (propertyMapper.readOnly) { continue; } let propName; let parentObject = payload; if (serializer.isXML) { if (propertyMapper.xmlIsWrapped) { propName = propertyMapper.xmlName; } else { propName = propertyMapper.xmlElementName || propertyMapper.xmlName; } } else { const paths = splitSerializeName(propertyMapper.serializedName); propName = paths.pop(); for (const pathName of paths) { const childObject = parentObject[pathName]; if ((childObject === void 0 || childObject === null) && (object[key] !== void 0 && object[key] !== null || propertyMapper.defaultValue !== void 0)) { parentObject[pathName] = {}; } parentObject = parentObject[pathName]; } } if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; parentObject[interfaces_js_1.XML_ATTRKEY] = { ...parentObject[interfaces_js_1.XML_ATTRKEY], [xmlnsKey]: mapper.xmlNamespace }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && (toSerialize === void 0 || toSerialize === null)) { toSerialize = mapper.serializedName; } const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); if (serializedValue !== void 0 && propName !== void 0 && propName !== null) { const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); if (isXml && propertyMapper.xmlIsAttribute) { parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; } else if (isXml && propertyMapper.xmlIsWrapped) { parentObject[propName] = { [propertyMapper.xmlElementName]: value }; } else { parentObject[propName] = value; } } } } const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); if (additionalPropertiesMapper) { const propNames = Object.keys(modelProps); for (const clientPropName in object) { const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); if (isAdditionalProperty) { payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); } } } return payload; } return object; } __name(serializeCompositeType, "serializeCompositeType"); function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { if (!isXml || !propertyMapper.xmlNamespace) { return serializedValue; } const xmlnsKey = propertyMapper.xmlNamespacePrefix ? `xmlns:${propertyMapper.xmlNamespacePrefix}` : "xmlns"; const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; if (["Composite"].includes(propertyMapper.type.name)) { if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } } const result = {}; result[options.xml.xmlCharKey] = serializedValue; result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result; } __name(getXmlObjectValue, "getXmlObjectValue"); function isSpecialXmlProperty(propertyName, options) { return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } __name(isSpecialXmlProperty, "isSpecialXmlProperty"); function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } const modelProps = resolveModelProperties(serializer, mapper, objectName); let instance = {}; const handledPropertyNames = []; for (const key of Object.keys(modelProps)) { const propertyMapper = modelProps[key]; const paths = splitSerializeName(modelProps[key].serializedName); handledPropertyNames.push(paths[0]); const { serializedName, xmlName, xmlElementName } = propertyMapper; let propertyObjectName = objectName; if (serializedName !== "" && serializedName !== void 0) { propertyObjectName = objectName + "." + serializedName; } const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; if (headerCollectionPrefix) { const dictionary = {}; for (const headerKey of Object.keys(responseBody)) { if (headerKey.startsWith(headerCollectionPrefix)) { dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); } handledPropertyNames.push(headerKey); } instance[key] = dictionary; } else if (serializer.isXML) { if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); } else if (propertyMapper.xmlIsMsText) { if (responseBody[xmlCharKey] !== void 0) { instance[key] = responseBody[xmlCharKey]; } else if (typeof responseBody === "string") { instance[key] = responseBody; } } else { const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { const property = responseBody[propertyName]; instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); handledPropertyNames.push(propertyName); } } } else { let propertyInstance; let res = responseBody; let steps = 0; for (const item of paths) { if (!res) break; steps++; res = res[item]; } if (res === null && steps < paths.length) { res = void 0; } propertyInstance = res; const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && (propertyInstance === void 0 || propertyInstance === null)) { propertyInstance = mapper.serializedName; } let serializedValue; if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { propertyInstance = responseBody[key]; const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); for (const [k, v] of Object.entries(instance)) { if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { arrayInstance[k] = v; } } instance = arrayInstance; } else if (propertyInstance !== void 0 || propertyMapper.defaultValue !== void 0) { serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); instance[key] = serializedValue; } } } const additionalPropertiesMapper = mapper.type.additionalProperties; if (additionalPropertiesMapper) { const isAdditionalProperty = /* @__PURE__ */ __name((responsePropName) => { for (const clientPropName in modelProps) { const paths = splitSerializeName(modelProps[clientPropName].serializedName); if (paths[0] === responsePropName) { return false; } } return true; }, "isAdditionalProperty"); for (const responsePropName in responseBody) { if (isAdditionalProperty(responsePropName)) { instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); } } } else if (responseBody && !options.ignoreUnknownProperties) { for (const key of Object.keys(responseBody)) { if (instance[key] === void 0 && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key, options)) { instance[key] = responseBody[key]; } } } return instance; } __name(deserializeCompositeType, "deserializeCompositeType"); function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { const value = mapper.type.value; if (!value || typeof value !== "object") { throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}`); } if (responseBody) { const tempDictionary = {}; for (const key of Object.keys(responseBody)) { tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); } return tempDictionary; } return responseBody; } __name(deserializeDictionaryType, "deserializeDictionaryType"); function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); } if (responseBody) { if (!Array.isArray(responseBody)) { responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); } return tempArray; } return responseBody; } __name(deserializeSequenceType, "deserializeSequenceType"); function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { const typeNamesToCheck = [typeName]; while (typeNamesToCheck.length) { const currentName = typeNamesToCheck.shift(); const indexDiscriminator = discriminatorValue === currentName ? discriminatorValue : currentName + "." + discriminatorValue; if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { return discriminators[indexDiscriminator]; } else { for (const [name, mapper] of Object.entries(discriminators)) { if (name.startsWith(currentName + ".") && mapper.type.uberParent === currentName && mapper.type.className) { typeNamesToCheck.push(mapper.type.className); } } } } return void 0; } __name(getIndexDiscriminator, "getIndexDiscriminator"); function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; if (discriminatorName) { if (polymorphicPropertyName === "serializedName") { discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { mapper = polymorphicMapper; } } } } return mapper; } __name(getPolymorphicMapper, "getPolymorphicMapper"); function getPolymorphicDiscriminatorRecursively(serializer, mapper) { return mapper.type.polymorphicDiscriminator || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); } __name(getPolymorphicDiscriminatorRecursively, "getPolymorphicDiscriminatorRecursively"); function getPolymorphicDiscriminatorSafely(serializer, typeName) { return typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator; } __name(getPolymorphicDiscriminatorSafely, "getPolymorphicDiscriminatorSafely"); exports2.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" }; } }); // node_modules/@azure/core-client/dist/commonjs/state.js var require_state2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.state = void 0; exports2.state = { operationRequestMap: /* @__PURE__ */ new WeakMap() }; } }); // node_modules/@azure/core-client/dist/commonjs/operationHelpers.js var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; const parameterMapper = parameter.mapper; let value; if (typeof parameterPath === "string") { parameterPath = [parameterPath]; } if (Array.isArray(parameterPath)) { if (parameterPath.length > 0) { if (parameterMapper.isConstant) { value = parameterMapper.defaultValue; } else { let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); if (!propertySearchResult.propertyFound && fallbackObject) { propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); } let useDefaultValue = false; if (!propertySearchResult.propertyFound) { useDefaultValue = parameterMapper.required || parameterPath[0] === "options" && parameterPath.length === 2; } value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; } } } else { if (parameterMapper.required) { value = {}; } for (const propertyName in parameterPath) { const propertyMapper = parameterMapper.type.modelProperties[propertyName]; const propertyPath = parameterPath[propertyName]; const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { parameterPath: propertyPath, mapper: propertyMapper }, fallbackObject); if (propertyValue !== void 0) { if (!value) { value = {}; } value[propertyName] = propertyValue; } } } return value; } __name(getOperationArgumentValueFromParameter, "getOperationArgumentValueFromParameter"); function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; for (; i < parameterPath.length; ++i) { const parameterPathPart = parameterPath[i]; if (parent && parameterPathPart in parent) { parent = parent[parameterPathPart]; } else { break; } } if (i === parameterPath.length) { result.propertyValue = parent; result.propertyFound = true; } return result; } __name(getPropertyFromParameterPath, "getPropertyFromParameterPath"); var originalRequestSymbol = Symbol.for("@azure/core-client original request"); function hasOriginalRequest(request) { return originalRequestSymbol in request; } __name(hasOriginalRequest, "hasOriginalRequest"); function getOperationRequestInfo(request) { if (hasOriginalRequest(request)) { return getOperationRequestInfo(request[originalRequestSymbol]); } let info = state_js_1.state.operationRequestMap.get(request); if (!info) { info = {}; state_js_1.state.operationRequestMap.set(request, info); } return info; } __name(getOperationRequestInfo, "getOperationRequestInfo"); } }); // node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.deserializationPolicyName = void 0; exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { rootName: serializerOptions?.xml.rootName ?? "", includeRoot: serializerOptions?.xml.includeRoot ?? false, xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { name: exports2.deserializationPolicyName, async sendRequest(request, next) { const response = await next(request); return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); } }; } __name(deserializationPolicy, "deserializationPolicy"); function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); const operationSpec = operationInfo?.operationSpec; if (operationSpec) { if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; } __name(getOperationResponseMap, "getOperationResponseMap"); function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; } else if (typeof shouldDeserialize === "boolean") { result = shouldDeserialize; } else { result = shouldDeserialize(parsedResponse); } return result; } __name(shouldDeserializeResponse, "shouldDeserializeResponse"); async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); if (!shouldDeserializeResponse(parsedResponse)) { return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } const responseSpec = getOperationResponseMap(parsedResponse); const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); if (error) { throw error; } else if (shouldReturnResponse) { return parsedResponse; } if (responseSpec) { if (responseSpec.bodyMapper) { let valueToDeserialize = parsedResponse.parsedBody; if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; } try { parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); } catch (deserializeError) { const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); throw restError; } } else if (operationSpec.httpMethod === "HEAD") { parsedResponse.parsedBody = response.status >= 200 && response.status < 300; } if (responseSpec.headersMapper) { parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); } } return parsedResponse; } __name(deserializeResponseBody, "deserializeResponseBody"); function isOperationSpecEmpty(operationSpec) { const expectedStatusCodes = Object.keys(operationSpec.responses); return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } __name(isOperationSpecEmpty, "isOperationSpecEmpty"); function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { if (responseSpec) { if (!responseSpec.isError) { return { error: null, shouldReturnResponse: false }; } } else { return { error: null, shouldReturnResponse: false }; } } const errorResponseSpec = responseSpec ?? operationSpec.responses.default; const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error; } const defaultBodyMapper = errorResponseSpec?.bodyMapper; const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; let deserializedError; if (defaultBodyMapper) { let valueToDeserialize = parsedBody; if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { valueToDeserialize = []; const elementName = defaultBodyMapper.xmlElementName; if (typeof parsedBody === "object" && elementName) { valueToDeserialize = parsedBody[elementName]; } } deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); } const internalError = parsedBody.error || deserializedError || parsedBody; error.code = internalError.code; if (internalError.message) { error.message = internalError.message; } if (defaultBodyMapper) { error.response.parsedBody = deserializedError; } } if (parsedResponse.headers && defaultHeadersMapper) { error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; } return { error, shouldReturnResponse: false }; } __name(handleErrorResponse, "handleErrorResponse"); async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); try { if (contentComponents.length === 0 || contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { operationResponse.parsedBody = JSON.parse(text); return operationResponse; } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { if (!parseXML) { throw new Error("Parsing XML not supported."); } const body = await parseXML(text, opts.xml); operationResponse.parsedBody = body; return operationResponse; } } catch (err) { const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; const e = new core_rest_pipeline_1.RestError(msg, { code: errCode, statusCode: operationResponse.status, request: operationResponse.request, response: operationResponse }); throw e; } } return operationResponse; } __name(parse, "parse"); } }); // node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); for (const statusCode in operationSpec.responses) { const operationResponse = operationSpec.responses[statusCode]; if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { result.add(Number(statusCode)); } } return result; } __name(getStreamingResponseStatusCodes, "getStreamingResponseStatusCodes"); function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; if (typeof parameterPath === "string") { result = parameterPath; } else if (Array.isArray(parameterPath)) { result = parameterPath.join("."); } else { result = mapper.serializedName; } return result; } __name(getPathStringFromParameter, "getPathStringFromParameter"); } }); // node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.serializationPolicyName = void 0; exports2.serializationPolicy = serializationPolicy; exports2.serializeHeaders = serializeHeaders; exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); var interfaceHelpers_js_1 = require_interfaceHelpers(); exports2.serializationPolicyName = "serializationPolicy"; function serializationPolicy(options = {}) { const stringifyXML = options.stringifyXML; return { name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); const operationSpec = operationInfo?.operationSpec; const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); } return next(request); } }; } __name(serializationPolicy, "serializationPolicy"); function serializeHeaders(request, operationArguments, operationSpec) { if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); if (headerValue !== null && headerValue !== void 0 || headerParameter.mapper.required) { headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); const headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; if (headerCollectionPrefix) { for (const key of Object.keys(headerValue)) { request.headers.set(headerCollectionPrefix + key, headerValue[key]); } } else { request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); } } } } const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } __name(serializeHeaders, "serializeHeaders"); function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { rootName: serializerOptions?.xml.rootName ?? "", includeRoot: serializerOptions?.xml.includeRoot ?? false, xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; if (operationSpec.requestBody && operationSpec.requestBody.mapper) { request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); const bodyMapper = operationSpec.requestBody.mapper; const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable } = bodyMapper; const typeName = bodyMapper.type.name; try { if (request.body !== void 0 && request.body !== null || nullable && request.body === null || required) { const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; if (operationSpec.isXML) { const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); if (typeName === serializer_js_1.MapperTypeNames.Sequence) { request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); } else if (!isStream) { request.body = stringifyXML(value, { rootName: xmlName || serializedName, xmlCharKey }); } } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); } } } catch (error) { throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); } } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { request.formData = {}; for (const formDataParameter of operationSpec.formDataParameters) { const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); if (formDataParameterValue !== void 0 && formDataParameterValue !== null) { const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); } } } } __name(serializeRequestBody, "serializeRequestBody"); function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; result[options.xml.xmlCharKey] = serializedValue; result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; return result; } return serializedValue; } __name(getXmlValueWithNamespace, "getXmlValueWithNamespace"); function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { if (!Array.isArray(obj)) { obj = [obj]; } if (!xmlNamespaceKey || !xmlNamespace) { return { [elementName]: obj }; } const result = { [elementName]: obj }; result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; return result; } __name(prepareXMLRootList, "prepareXMLRootList"); } }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, scopes: options.credentialOptions.credentialScopes })); } pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { phase: "Deserialize" }); return pipeline; } __name(createClientPipeline, "createClientPipeline"); } }); // node_modules/@azure/core-client/dist/commonjs/httpClientCache.js var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return cachedHttpClient; } __name(getCachedDefaultHttpClient, "getCachedDefaultHttpClient"); } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRequestUrl = getRequestUrl; exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { CSV: ",", SSV: " ", Multi: "Multi", TSV: " ", Pipes: "|" }; function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { let path2 = replaceAll(operationSpec.path, urlReplacements); if (operationSpec.path === "/{nextLink}" && path2.startsWith("/")) { path2 = path2.substring(1); } if (isAbsoluteUrl(path2)) { requestUrl = path2; isAbsolutePath = true; } else { requestUrl = appendPath(requestUrl, path2); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } __name(getRequestUrl, "getRequestUrl"); function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { result = result.split(searchValue).join(replaceValue); } return result; } __name(replaceAll, "replaceAll"); function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { const result = /* @__PURE__ */ new Map(); if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); if (!urlParameter.skipEncoding) { urlParameterValue = encodeURIComponent(urlParameterValue); } result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); } } return result; } __name(calculateUrlReplacements, "calculateUrlReplacements"); function isAbsoluteUrl(url) { return url.includes("://"); } __name(isAbsoluteUrl, "isAbsoluteUrl"); function appendPath(url, pathToAppend) { if (!pathToAppend) { return url; } const parsedUrl = new URL(url); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; } if (pathToAppend.startsWith("/")) { pathToAppend = pathToAppend.substring(1); } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { const path2 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); newPath = newPath + path2; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } } else { newPath = newPath + pathToAppend; } parsedUrl.pathname = newPath; return parsedUrl.toString(); } __name(appendPath, "appendPath"); function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); } let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); if (queryParameterValue !== void 0 && queryParameterValue !== null || queryParameter.mapper.required) { queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); const delimiter = queryParameter.collectionFormat ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] : ""; if (Array.isArray(queryParameterValue)) { queryParameterValue = queryParameterValue.map((item) => { if (item === null || item === void 0) { return ""; } return item; }); } if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { continue; } else if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { queryParameterValue = queryParameterValue.join(delimiter); } if (!queryParameter.skipEncoding) { if (Array.isArray(queryParameterValue)) { queryParameterValue = queryParameterValue.map((item) => { return encodeURIComponent(item); }); } else { queryParameterValue = encodeURIComponent(queryParameterValue); } } if (Array.isArray(queryParameterValue) && (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { queryParameterValue = queryParameterValue.join(delimiter); } result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); } } } return { queryParams: result, sequenceParams }; } __name(calculateQueryParameters, "calculateQueryParameters"); function simpleParseQueryParams(queryString) { const result = /* @__PURE__ */ new Map(); if (!queryString || queryString[0] !== "?") { return result; } queryString = queryString.slice(1); const pairs = queryString.split("&"); for (const pair of pairs) { const [name, value] = pair.split("=", 2); const existingValue = result.get(name); if (existingValue) { if (Array.isArray(existingValue)) { existingValue.push(value); } else { result.set(name, [existingValue, value]); } } else { result.set(name, value); } } return result; } __name(simpleParseQueryParams, "simpleParseQueryParams"); function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { return url; } const parsedUrl = new URL(url); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); if (Array.isArray(existingValue)) { if (Array.isArray(value)) { existingValue.push(...value); const valueSet = new Set(existingValue); combinedParams.set(name, Array.from(valueSet)); } else { existingValue.push(value); } } else if (existingValue) { if (Array.isArray(value)) { value.unshift(existingValue); } else if (sequenceParams.has(name)) { combinedParams.set(name, [existingValue, value]); } if (!noOverwrite) { combinedParams.set(name, value); } } else { combinedParams.set(name, value); } } const searchPieces = []; for (const [name, value] of combinedParams) { if (typeof value === "string") { searchPieces.push(`${name}=${value}`); } else if (Array.isArray(value)) { for (const subValue of value) { searchPieces.push(`${name}=${subValue}`); } } else { searchPieces.push(`${name}=${value}`); } } parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } __name(appendQueryParams, "appendQueryParams"); } }); // node_modules/@azure/core-client/dist/commonjs/log.js var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); // node_modules/@azure/core-client/dist/commonjs/serviceClient.js var require_serviceClient = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serviceClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs6(); var pipeline_js_1 = require_pipeline3(); var utils_js_1 = require_utils3(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var log_js_1 = require_log4(); var ServiceClient = class { static { __name(this, "ServiceClient"); } /** * If specified, this is the base URI that requests will be made against for this ServiceClient. * If it is not specified, then all OperationSpecs must contain a baseUrl property. */ _endpoint; /** * The default request content type for the service. * Used if no requestContentType is present on an OperationSpec. */ _requestContentType; /** * Set to true if the request is sent over HTTP instead of HTTPS */ _allowInsecureConnection; /** * The HTTP client that will be used to send requests. */ _httpClient; /** * The pipeline used by this client to make requests */ pipeline; /** * The ServiceClient constructor * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { this._requestContentType = options.requestContentType; this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { afterPhase }); } } } /** * Send the provided httpRequest. */ async sendRequest(request) { return this.pipeline.sendRequest(this._httpClient, request); } /** * Send an HTTP request that is populated using the provided OperationSpec. * @typeParam T - The typed result of the request, based on the OperationSpec. * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. * @param operationSpec - The OperationSpec to use to populate the httpRequest. */ async sendOperationRequest(operationArguments, operationSpec) { const endpoint = operationSpec.baseUrl || this._endpoint; if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ url }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); operationInfo.operationSpec = operationSpec; operationInfo.operationArguments = operationArguments; const contentType = operationSpec.contentType || this._requestContentType; if (contentType && operationSpec.requestBody) { request.headers.set("Content-Type", contentType); } const options = operationArguments.options; if (options) { const requestOptions = options.requestOptions; if (requestOptions) { if (requestOptions.timeout) { request.timeout = requestOptions.timeout; } if (requestOptions.onUploadProgress) { request.onUploadProgress = requestOptions.onUploadProgress; } if (requestOptions.onDownloadProgress) { request.onDownloadProgress = requestOptions.onDownloadProgress; } if (requestOptions.shouldDeserialize !== void 0) { operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; } if (requestOptions.allowInsecureConnection) { request.allowInsecureConnection = true; } } if (options.abortSignal) { request.abortSignal = options.abortSignal; } if (options.tracingOptions) { request.tracingOptions = options.tracingOptions; } } if (this._allowInsecureConnection) { request.allowInsecureConnection = true; } if (request.streamResponseStatusCodes === void 0) { request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); } try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error) { if (typeof error === "object" && error?.response) { const rawResponse = error.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); error.details = flatResponse; if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error); } } throw error; } } }; exports2.ServiceClient = ServiceClient; function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; return (0, pipeline_js_1.createClientPipeline)({ ...options, credentialOptions }); } __name(createDefaultPipeline, "createDefaultPipeline"); function getCredentialScopes(options) { if (options.credentialScopes) { return options.credentialScopes; } if (options.endpoint) { return `${options.endpoint}/.default`; } if (options.baseUri) { return `${options.baseUri}/.default`; } if (options.credential && !options.credentialScopes) { throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); } return void 0; } __name(getCredentialScopes, "getCredentialScopes"); } }); // node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseCAEChallenge = parseCAEChallenge; exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } __name(parseCAEChallenge, "parseCAEChallenge"); async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; const challenge = response.headers.get("WWW-Authenticate"); if (!challenge) { logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); return false; } const challenges = parseCAEChallenge(challenge) || []; const parsedChallenge = challenges.find((x) => x.claims); if (!parsedChallenge) { logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); return false; } const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims) }); if (!accessToken) { return false; } onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } __name(authorizeRequestOnClaimChallenge, "authorizeRequestOnClaimChallenge"); } }); // node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js var require_authorizeRequestOnTenantChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnTenantChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.authorizeRequestOnTenantChallenge = void 0; var Constants = { DefaultScope: "/.default", /** * Defines constants for use with HTTP headers. */ HeaderConstants: { /** * The Authorization header. */ AUTHORIZATION: "authorization" } }; function isUuid(text) { 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(text); } __name(isUuid, "isUuid"); var authorizeRequestOnTenantChallenge = /* @__PURE__ */ __name(async (challengeOptions) => { const requestOptions = requestToOptions(challengeOptions.request); const challenge = getChallenge(challengeOptions.response); if (challenge) { const challengeInfo = parseChallenge(challenge); const challengeScopes = buildScopes(challengeOptions, challengeInfo); const tenantId = extractTenantId(challengeInfo); if (!tenantId) { return false; } const accessToken = await challengeOptions.getAccessToken(challengeScopes, { ...requestOptions, tenantId }); if (!accessToken) { return false; } challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; }, "authorizeRequestOnTenantChallenge"); exports2.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; function extractTenantId(challengeInfo) { const parsedAuthUri = new URL(challengeInfo.authorization_uri); const pathSegments = parsedAuthUri.pathname.split("/"); const tenantId = pathSegments[1]; if (tenantId && isUuid(tenantId)) { return tenantId; } return void 0; } __name(extractTenantId, "extractTenantId"); function buildScopes(challengeOptions, challengeInfo) { if (!challengeInfo.resource_id) { return challengeOptions.scopes; } const challengeScopes = new URL(challengeInfo.resource_id); challengeScopes.pathname = Constants.DefaultScope; let scope = challengeScopes.toString(); if (scope === "https://disk.azure.com/.default") { scope = "https://disk.azure.com//.default"; } return [scope]; } __name(buildScopes, "buildScopes"); function getChallenge(response) { const challenge = response.headers.get("WWW-Authenticate"); if (response.status === 401 && challenge) { return challenge; } return; } __name(getChallenge, "getChallenge"); function parseChallenge(challenge) { const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } __name(parseChallenge, "parseChallenge"); function requestToOptions(request) { return { abortSignal: request.abortSignal, requestOptions: { timeout: request.timeout }, tracingOptions: request.tracingOptions }; } __name(requestToOptions, "requestToOptions"); } }); // node_modules/@azure/core-client/dist/commonjs/index.js var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.authorizeRequestOnTenantChallenge = exports2.authorizeRequestOnClaimChallenge = exports2.serializationPolicyName = exports2.serializationPolicy = exports2.deserializationPolicyName = exports2.deserializationPolicy = exports2.XML_CHARKEY = exports2.XML_ATTRKEY = exports2.createClientPipeline = exports2.ServiceClient = exports2.MapperTypeNames = exports2.createSerializer = void 0; var serializer_js_1 = require_serializer(); Object.defineProperty(exports2, "createSerializer", { enumerable: true, get: function() { return serializer_js_1.createSerializer; } }); Object.defineProperty(exports2, "MapperTypeNames", { enumerable: true, get: function() { return serializer_js_1.MapperTypeNames; } }); var serviceClient_js_1 = require_serviceClient(); Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); var interfaces_js_1 = require_interfaces(); Object.defineProperty(exports2, "XML_ATTRKEY", { enumerable: true, get: function() { return interfaces_js_1.XML_ATTRKEY; } }); Object.defineProperty(exports2, "XML_CHARKEY", { enumerable: true, get: function() { return interfaces_js_1.XML_CHARKEY; } }); var deserializationPolicy_js_1 = require_deserializationPolicy(); Object.defineProperty(exports2, "deserializationPolicy", { enumerable: true, get: function() { return deserializationPolicy_js_1.deserializationPolicy; } }); Object.defineProperty(exports2, "deserializationPolicyName", { enumerable: true, get: function() { return deserializationPolicy_js_1.deserializationPolicyName; } }); var serializationPolicy_js_1 = require_serializationPolicy(); Object.defineProperty(exports2, "serializationPolicy", { enumerable: true, get: function() { return serializationPolicy_js_1.serializationPolicy; } }); Object.defineProperty(exports2, "serializationPolicyName", { enumerable: true, get: function() { return serializationPolicy_js_1.serializationPolicyName; } }); var authorizeRequestOnClaimChallenge_js_1 = require_authorizeRequestOnClaimChallenge(); Object.defineProperty(exports2, "authorizeRequestOnClaimChallenge", { enumerable: true, get: function() { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } }); var authorizeRequestOnTenantChallenge_js_1 = require_authorizeRequestOnTenantChallenge(); Object.defineProperty(exports2, "authorizeRequestOnTenantChallenge", { enumerable: true, get: function() { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } }); } }); // node_modules/@azure/core-http-compat/dist/commonjs/util.js var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpHeaders = void 0; exports2.toPipelineRequest = toPipelineRequest; exports2.toWebResourceLike = toWebResourceLike; exports2.toHttpHeadersLike = toHttpHeadersLike; var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = Symbol("Original PipelineRequest"); var originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { const compatWebResource = webResource; const request = compatWebResource[originalRequestSymbol]; const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); if (request) { request.headers = headers; return request; } else { const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ url: webResource.url, method: webResource.method, headers, withCredentials: webResource.withCredentials, timeout: webResource.timeout, requestId: webResource.requestId, abortSignal: webResource.abortSignal, body: webResource.body, formData: webResource.formData, disableKeepAlive: !!webResource.keepAlive, onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, streamResponseStatusCodes: webResource.streamResponseStatusCodes, agent: webResource.agent, requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; } return newRequest; } } __name(toPipelineRequest, "toPipelineRequest"); function toWebResourceLike(request, options) { const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, headers: toHttpHeadersLike(request.headers), withCredentials: request.withCredentials, timeout: request.timeout, requestId: request.headers.get("x-ms-client-request-id") || request.requestId, abortSignal: request.abortSignal, body: request.body, formData: request.formData, keepAlive: !!request.disableKeepAlive, onDownloadProgress: request.onDownloadProgress, onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, agent: request.agent, requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, prepare() { throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); }, validateRequestProperties() { } }; if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { return request; } else if (prop === "clone") { return () => { return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { createProxy: true, originalRequest }); }; } return Reflect.get(target, prop, receiver); }, set(target, prop, value, receiver) { if (prop === "keepAlive") { request.disableKeepAlive = !value; } const passThroughProps = [ "url", "method", "withCredentials", "timeout", "requestId", "abortSignal", "body", "formData", "onDownloadProgress", "onUploadProgress", "proxySettings", "streamResponseStatusCodes", "agent", "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; } return Reflect.set(target, prop, value, receiver); } }); } else { return webResource; } } __name(toWebResourceLike, "toWebResourceLike"); function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } __name(toHttpHeadersLike, "toHttpHeadersLike"); function getHeaderKey(headerName) { return headerName.toLowerCase(); } __name(getHeaderKey, "getHeaderKey"); var HttpHeaders = class _HttpHeaders { static { __name(this, "HttpHeaders"); } _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { for (const headerName in rawHeaders) { this.set(headerName, rawHeaders[headerName]); } } } /** * Set a header in this collection with the provided name and value. The name is * case-insensitive. * @param headerName - The name of the header to set. This value is case-insensitive. * @param headerValue - The value of the header to set. */ set(headerName, headerValue) { this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() }; } /** * Get the header value for the provided header name, or undefined if no header exists in this * collection with the provided name. * @param headerName - The name of the header. */ get(headerName) { const header = this._headersMap[getHeaderKey(headerName)]; return !header ? void 0 : header.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. */ contains(headerName) { return !!this._headersMap[getHeaderKey(headerName)]; } /** * Remove the header with the provided headerName. Return whether or not the header existed and * was removed. * @param headerName - The name of the header to remove. */ remove(headerName) { const result = this.contains(headerName); delete this._headersMap[getHeaderKey(headerName)]; return result; } /** * Get the headers that are contained this collection as an object. */ rawHeaders() { return this.toJson({ preserveCase: true }); } /** * Get the headers that are contained in this collection as an array. */ headersArray() { const headers = []; for (const headerKey in this._headersMap) { headers.push(this._headersMap[headerKey]); } return headers; } /** * Get the header names that are contained in this collection. */ headerNames() { const headerNames = []; const headers = this.headersArray(); for (let i = 0; i < headers.length; ++i) { headerNames.push(headers[i].name); } return headerNames; } /** * Get the header values that are contained in this collection. */ headerValues() { const headerValues = []; const headers = this.headersArray(); for (let i = 0; i < headers.length; ++i) { headerValues.push(headers[i].value); } return headerValues; } /** * Get the JSON object representation of this HTTP header collection. */ toJson(options = {}) { const result = {}; if (options.preserveCase) { for (const headerKey in this._headersMap) { const header = this._headersMap[headerKey]; result[header.name] = header.value; } } else { for (const headerKey in this._headersMap) { const header = this._headersMap[headerKey]; result[getHeaderKey(header.name)] = header.value; } } return result; } /** * Get the string representation of this HTTP header collection. */ toString() { return JSON.stringify(this.toJson({ preserveCase: true })); } /** * Create a deep clone/copy of this HttpHeaders collection. */ clone() { const resultPreservingCasing = {}; for (const headerKey in this._headersMap) { const header = this._headersMap[headerKey]; resultPreservingCasing[header.name] = header.value; } return new _HttpHeaders(resultPreservingCasing); } }; exports2.HttpHeaders = HttpHeaders; } }); // node_modules/@azure/core-http-compat/dist/commonjs/response.js var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toCompatResponse = toCompatResponse; exports2.toPipelineResponse = toPipelineResponse; var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { return headers; } else if (prop === "request") { return request; } else if (prop === originalResponse) { return response; } return Reflect.get(target, prop, receiver); }, set(target, prop, value, receiver) { if (prop === "headers") { headers = value; } else if (prop === "request") { request = value; } return Reflect.set(target, prop, value, receiver); } }); } else { return { ...response, request, headers }; } } __name(toCompatResponse, "toCompatResponse"); function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); if (response) { response.headers = headers; return response; } else { return { ...compatResponse, headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }; } } __name(toPipelineResponse, "toPipelineResponse"); } }); // node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js var require_extendedClient = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/extendedClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); var core_rest_pipeline_1 = require_commonjs6(); var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { static { __name(this, "ExtendedServiceClient"); } constructor(options) { super(options); if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); } } /** * Compatible send operation request function. * * @param operationArguments - Operation arguments * @param operationSpec - Operation Spec * @returns */ async sendOperationRequest(operationArguments, operationSpec) { const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error) { lastResponse = rawResponse; if (userProvidedCallBack) { userProvidedCallBack(rawResponse, flatResponse, error); } } __name(onResponse, "onResponse"); operationArguments.options = { ...operationArguments.options, onResponse }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { value: (0, response_js_1.toCompatResponse)(lastResponse) }); } return result; } }; exports2.ExtendedServiceClient = ExtendedServiceClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; (function(HttpPipelineLogLevel2) { HttpPipelineLogLevel2[HttpPipelineLogLevel2["ERROR"] = 1] = "ERROR"; HttpPipelineLogLevel2[HttpPipelineLogLevel2["INFO"] = 3] = "INFO"; HttpPipelineLogLevel2[HttpPipelineLogLevel2["OFF"] = 0] = "OFF"; HttpPipelineLogLevel2[HttpPipelineLogLevel2["WARNING"] = 2] = "WARNING"; })(HttpPipelineLogLevel || (exports2.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); var mockRequestPolicyOptions = { log(_logLevel, _message) { }, shouldLog(_logLevel) { return false; } }; exports2.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; function createRequestPolicyFactoryPolicy(factories) { const orderedFactories = factories.slice().reverse(); return { name: exports2.requestPolicyFactoryPolicyName, async sendRequest(request, next) { let httpPipeline = { async sendRequest(httpRequest) { const response2 = await next((0, util_js_1.toPipelineRequest)(httpRequest)); return (0, response_js_1.toCompatResponse)(response2, { createProxy: true }); } }; for (const factory of orderedFactories) { httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); } const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); const response = await httpPipeline.sendRequest(webResourceLike); return (0, response_js_1.toPipelineResponse)(response); } }; } __name(createRequestPolicyFactoryPolicy, "createRequestPolicyFactoryPolicy"); } }); // node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { return { sendRequest: async (request) => { const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); return (0, response_js_1.toPipelineResponse)(response); } }; } __name(convertHttpClient, "convertHttpClient"); } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toHttpHeadersLike = exports2.convertHttpClient = exports2.disableKeepAlivePolicyName = exports2.HttpPipelineLogLevel = exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.ExtendedServiceClient = void 0; var extendedClient_js_1 = require_extendedClient(); Object.defineProperty(exports2, "ExtendedServiceClient", { enumerable: true, get: function() { return extendedClient_js_1.ExtendedServiceClient; } }); var requestPolicyFactoryPolicy_js_1 = require_requestPolicyFactoryPolicy(); Object.defineProperty(exports2, "requestPolicyFactoryPolicyName", { enumerable: true, get: function() { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } }); Object.defineProperty(exports2, "createRequestPolicyFactoryPolicy", { enumerable: true, get: function() { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } }); Object.defineProperty(exports2, "HttpPipelineLogLevel", { enumerable: true, get: function() { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } }); var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); Object.defineProperty(exports2, "disableKeepAlivePolicyName", { enumerable: true, get: function() { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } }); var httpClientAdapter_js_1 = require_httpClientAdapter(); Object.defineProperty(exports2, "convertHttpClient", { enumerable: true, get: function() { return httpClientAdapter_js_1.convertHttpClient; } }); var util_js_1 = require_util8(); Object.defineProperty(exports2, "toHttpHeadersLike", { enumerable: true, get: function() { return util_js_1.toHttpHeadersLike; } }); } }); // node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { (() => { "use strict"; var t = { d: (e2, i2) => { for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); } }, e = {}; t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); function s(t2, e2) { const i2 = []; let n2 = e2.exec(t2); for (; n2; ) { const s2 = []; s2.startIndex = e2.lastIndex - n2[0].length; const r2 = n2.length; for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); i2.push(s2), n2 = e2.exec(t2); } return i2; } __name(s, "s"); const r = /* @__PURE__ */ __name(function(t2) { return !(null == n.exec(t2)); }, "r"), o = { allowBooleanAttributes: false, unpairedTags: [] }; function a(t2, e2) { e2 = Object.assign({}, o, e2); const i2 = []; let n2 = false, s2 = false; "\uFEFF" === t2[0] && (t2 = t2.substr(1)); for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; } else { if ("<" !== t2[o2]) { if (l(t2[o2])) continue; return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); } { let a2 = o2; if (o2++, "!" === t2[o2]) { o2 = h(t2, o2); continue; } { let d2 = false; "/" === t2[o2] && (d2 = true, o2++); let p2 = ""; for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { let e3; return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); } const c2 = f(t2, o2); if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); let N2 = c2.value; if (o2 = c2.index, "/" === N2[N2.length - 1]) { const i3 = o2 - N2.length; N2 = N2.substring(0, N2.length - 1); const s3 = g(N2, e2); if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); n2 = true; } else if (d2) { if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); { const e3 = i2.pop(); if (p2 !== e3.tagName) { let i3 = b(t2, e3.tagStartPos); return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); } 0 == i2.length && (s2 = true); } } else { const r2 = g(N2, e2); if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; } for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { if ("!" === t2[o2 + 1]) { o2++, o2 = h(t2, o2); continue; } if ("?" !== t2[o2 + 1]) break; if (o2 = u(t2, ++o2), o2.err) return o2; } else if ("&" === t2[o2]) { const e3 = m(t2, o2); if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); o2 = e3; } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); "<" === t2[o2] && o2--; } } } return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); } __name(a, "a"); function l(t2) { return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; } __name(l, "l"); function u(t2, e2) { const i2 = e2; for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; else { const n2 = t2.substr(i2, e2 - i2); if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); if ("?" == t2[e2] && ">" == t2[e2 + 1]) { e2++; break; } } return e2; } __name(u, "u"); function h(t2, e2) { if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { e2 += 2; break; } } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { let i2 = 1; for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; else if (">" === t2[e2] && (i2--, 0 === i2)) break; } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { e2 += 2; break; } } return e2; } __name(h, "h"); const d = '"', p = "'"; function f(t2, e2) { let i2 = "", n2 = "", s2 = false; for (; e2 < t2.length; e2++) { if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); else if (">" === t2[e2] && "" === n2) { s2 = true; break; } i2 += t2[e2]; } return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; } __name(f, "f"); const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); function g(t2, e2) { const i2 = s(t2, c), n2 = {}; for (let t3 = 0; t3 < i2.length; t3++) { if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); const s2 = i2[t3][2]; if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); n2[s2] = 1; } return true; } __name(g, "g"); function m(t2, e2) { if (";" === t2[++e2]) return -1; if ("#" === t2[e2]) return function(t3, e3) { let i3 = /\d/; for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { if (";" === t3[e3]) return e3; if (!t3[e3].match(i3)) break; } return -1; }(t2, ++e2); let i2 = 0; for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { if (";" === t2[e2]) break; return -1; } return e2; } __name(m, "m"); function x(t2, e2, i2) { return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; } __name(x, "x"); function N(t2) { return r(t2); } __name(N, "N"); function b(t2, e2) { const i2 = t2.substring(0, e2).split(/\r?\n/); return { line: i2.length, col: i2[i2.length - 1].length + 1 }; } __name(b, "b"); function E(t2) { return t2.startIndex + t2[1].length; } __name(E, "E"); const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { return e2; }, attributeValueProcessor: function(t2, e2) { return e2; }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { return t2; }, captureMetaData: false }; let T; T = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata"); class y { static { __name(this, "y"); } constructor(t2) { this.tagname = t2, this.child = [], this[":@"] = {}; } add(t2, e2) { "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); } addChild(t2, e2) { "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); } static getMetaDataSymbol() { return T; } } class w { static { __name(this, "w"); } constructor(t2) { this.suppressValidationErr = !t2; } readDocType(t2, e2) { const i2 = {}; if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); { e2 += 9; let n2 = 1, s2 = false, r2 = false, o2 = ""; for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; else { if (s2 && P(t2, "!ENTITY", e2)) { let n3, s3; e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); } else if (s2 && P(t2, "!ELEMENT", e2)) { e2 += 8; const { index: i3 } = this.readElementExp(t2, e2 + 1); e2 = i3; } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; else if (s2 && P(t2, "!NOTATION", e2)) { e2 += 9; const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); e2 = i3; } else { if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); r2 = true; } n2++, o2 = ""; } if (0 !== n2) throw new Error("Unclosed DOCTYPE"); } return { entities: i2, i: e2 }; } readEntityExp(t2, e2) { e2 = I(t2, e2); let i2 = ""; for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); } let n2 = ""; return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; } readNotationExp(t2, e2) { e2 = I(t2, e2); let i2 = ""; for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; !this.suppressValidationErr && O(i2), e2 = I(t2, e2); const n2 = t2.substring(e2, e2 + 6).toUpperCase(); if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); e2 += n2.length, e2 = I(t2, e2); let s2 = null, r2 = null; if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; } readIdentifierVal(t2, e2, i2) { let n2 = ""; const s2 = t2[e2]; if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); return [++e2, n2]; } readElementExp(t2, e2) { e2 = I(t2, e2); let i2 = ""; for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); let n2 = ""; if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; else if ("(" === t2[e2]) { for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; if (")" !== t2[e2]) throw new Error("Unterminated content model"); } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); return { elementName: i2, contentModel: n2.trim(), index: e2 }; } readAttlistExp(t2, e2) { e2 = I(t2, e2); let i2 = ""; for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; O(i2), e2 = I(t2, e2); let n2 = ""; for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); e2 = I(t2, e2); let s2 = ""; if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); e2++; let i3 = []; for (; e2 < t2.length && ")" !== t2[e2]; ) { let n3 = ""; for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); } if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); e2++, s2 += " (" + i3.join("|") + ")"; } else { for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); } e2 = I(t2, e2); let r2 = ""; return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; } } const I = /* @__PURE__ */ __name((t2, e2) => { for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; return e2; }, "I"); function P(t2, e2, i2) { for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; return true; } __name(P, "P"); function O(t2) { if (r(t2)) return t2; throw new Error(`Invalid entity name ${t2}`); } __name(O, "O"); const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; function $(t2) { return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { for (const i2 of t2) { if ("string" == typeof i2 && e2 === i2) return true; if (i2 instanceof RegExp && i2.test(e2)) return true; } } : () => false; } __name($, "$"); class D { static { __name(this, "D"); } constructor(t2) { if (this.options = t2, 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: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { const e2 = this.options.stopNodes[t3]; "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); } } } } function j(t2) { const e2 = Object.keys(t2); for (let i2 = 0; i2 < e2.length; i2++) { const n2 = e2[i2]; this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; } } __name(j, "j"); function M(t2, e2, i2, n2, s2, r2, o2) { if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { o2 || (t2 = this.replaceEntitiesValue(t2)); const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; } } __name(M, "M"); function F(t2) { if (this.options.removeNSPrefix) { const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; if ("xmlns" === e2[0]) return ""; 2 === e2.length && (t2 = i2 + e2[1]); } return t2; } __name(F, "F"); const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); function k(t2, e2) { if (true !== this.options.ignoreAttributes && "string" == typeof t2) { const i2 = s(t2, _), n2 = i2.length, r2 = {}; for (let t3 = 0; t3 < n2; t3++) { const n3 = this.resolveNameSpace(i2[t3][1]); if (this.ignoreAttributesFn(n3, e2)) continue; let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); const t4 = this.options.attributeValueProcessor(n3, s2, e2); r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); } else this.options.allowBooleanAttributes && (r2[o2] = true); } if (!Object.keys(r2).length) return; if (this.options.attributesGroupName) { const t3 = {}; return t3[this.options.attributesGroupName] = r2, t3; } return r2; } } __name(k, "k"); const L = /* @__PURE__ */ __name(function(t2) { t2 = t2.replace(/\r\n?/g, "\n"); const e2 = new y("!xml"); let i2 = e2, n2 = "", s2 = ""; const r2 = new w(this.options.processEntities); for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { const e3 = G(t2, ">", o2, "Closing Tag is not closed."); let r3 = t2.substring(o2 + 2, e3).trim(); if (this.options.removeNSPrefix) { const t3 = r3.indexOf(":"); -1 !== t3 && (r3 = r3.substr(t3 + 1)); } this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); const a2 = s2.substring(s2.lastIndexOf(".") + 1); if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); let l2 = 0; a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; } else if ("?" === t2[o2 + 1]) { let e3 = X(t2, o2, false, "?>"); if (!e3) throw new Error("Pi Tag is not closed."); if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; else { const t3 = new y(e3.tagName); t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); } o2 = e3.closeIndex + 1; } else if ("!--" === t2.substr(o2 + 1, 3)) { const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); if (this.options.commentPropName) { const r3 = t2.substring(o2 + 4, e3 - 2); n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); } o2 = e3; } else if ("!D" === t2.substr(o2 + 1, 2)) { const e3 = r2.readDocType(t2, o2); this.docTypeEntities = e3.entities, o2 = e3.i; } else if ("![" === t2.substr(o2 + 1, 2)) { const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); n2 = this.saveTextToParentTag(n2, i2, s2); let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; } else { let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; const l2 = r3.rawTagName; let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; if (this.options.transformTagName) { const t3 = this.options.transformTagName(a2); u2 === a2 && (u2 = t3), a2 = t3; } i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); const p2 = i2; p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); const f2 = o2; if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { let e3 = ""; if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; else { const i3 = this.readStopNodeData(t2, l2, d2 + 1); if (!i3) throw new Error(`Unexpected end of ${l2}`); o2 = i3.i, e3 = i3.tagContent; } const n3 = new y(a2); a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); } else { if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { const t4 = this.options.transformTagName(a2); u2 === a2 && (u2 = t4), a2 = t4; } const t3 = new y(a2); a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); } else { const t3 = new y(a2); this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; } n2 = "", o2 = d2; } } else n2 += t2[o2]; return e2.child; }, "L"); function U(t2, e2, i2, n2) { this.options.captureMetaData || (n2 = void 0); const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); } __name(U, "U"); const B = /* @__PURE__ */ __name(function(t2) { if (this.options.processEntities) { for (let e2 in this.docTypeEntities) { const i2 = this.docTypeEntities[e2]; t2 = t2.replace(i2.regx, i2.val); } for (let e2 in this.lastEntities) { const i2 = this.lastEntities[e2]; t2 = t2.replace(i2.regex, i2.val); } if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { const i2 = this.htmlEntities[e2]; t2 = t2.replace(i2.regex, i2.val); } t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); } return t2; }, "B"); function R(t2, e2, i2, n2) { return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; } __name(R, "R"); function Y(t2, e2, i2, n2) { return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); } __name(Y, "Y"); function G(t2, e2, i2, n2) { const s2 = t2.indexOf(e2, i2); if (-1 === s2) throw new Error(n2); return s2 + e2.length - 1; } __name(G, "G"); function X(t2, e2, i2, n2 = ">") { const s2 = function(t3, e3, i3 = ">") { let n3, s3 = ""; for (let r3 = e3; r3 < t3.length; r3++) { let e4 = t3[r3]; if (n3) e4 === n3 && (n3 = ""); else if ('"' === e4 || "'" === e4) n3 = e4; else if (e4 === i3[0]) { if (!i3[1]) return { data: s3, index: r3 }; if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; } else " " === e4 && (e4 = " "); s3 += e4; } }(t2, e2 + 1, n2); if (!s2) return; let r2 = s2.data; const o2 = s2.index, a2 = r2.search(/\s/); let l2 = r2, u2 = true; -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); const h2 = l2; if (i2) { const t3 = l2.indexOf(":"); -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); } return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; } __name(X, "X"); function W(t2, e2, i2) { const n2 = i2; let s2 = 1; for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { const r2 = G(t2, ">", i2, `${e2} is not closed`); if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; i2 = r2; } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; else { const n3 = X(t2, i2, ">"); n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); } } __name(W, "W"); function q(t2, e2, i2) { if (e2 && "string" == typeof t2) { const e3 = t2.trim(); return "true" === e3 || "false" !== e3 && function(t3, e4 = {}) { if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; let i3 = t3.trim(); if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; if ("0" === t3) return 0; if (e4.hex && A.test(i3)) return function(t4) { if (parseInt) return parseInt(t4, 16); if (Number.parseInt) return Number.parseInt(t4, 16); if (window && window.parseInt) return window.parseInt(t4, 16); throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); }(i3); if (-1 !== i3.search(/.+[eE].+/)) return function(t4, e5, i4) { if (!i4.eNotation) return t4; const n3 = e5.match(V); if (n3) { let s2 = n3[1] || ""; const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); } return t4; }(t3, i3, e4); { const s2 = S.exec(i3); if (s2) { const r2 = s2[1] || "", o2 = s2[2]; let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; { const n3 = Number(i3), s3 = String(n3); if (0 === n3 || -0 === n3) return n3; if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; let l3 = o2 ? a2 : i3; return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; } } return t3; } var n2; }(t2, i2); } return void 0 !== t2 ? t2 : ""; } __name(q, "q"); const Z = y.getMetaDataSymbol(); function K(t2, e2) { return Q(t2, e2); } __name(K, "K"); function Q(t2, e2, i2) { let n2; const s2 = {}; for (let r2 = 0; r2 < t2.length; r2++) { const o2 = t2[r2], a2 = z(o2); let l2 = ""; if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; else { if (void 0 === a2) continue; if (o2[a2]) { let t3 = Q(o2[a2], e2, l2); const i3 = H(t3, e2); void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; } } } return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; } __name(Q, "Q"); function z(t2) { const e2 = Object.keys(t2); for (let t3 = 0; t3 < e2.length; t3++) { const i2 = e2[t3]; if (":@" !== i2) return i2; } } __name(z, "z"); function J(t2, e2, i2, n2) { if (e2) { const s2 = Object.keys(e2), r2 = s2.length; for (let o2 = 0; o2 < r2; o2++) { const r3 = s2[o2]; n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; } } } __name(J, "J"); function H(t2, e2) { const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); } __name(H, "H"); class tt { static { __name(this, "tt"); } constructor(t2) { this.externalEntities = {}, this.options = function(t3) { return Object.assign({}, v, t3); }(t2); } parse(t2, e2) { if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); if (e2) { true === e2 && (e2 = {}); const i3 = a(t2, e2); if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); } const i2 = new D(this.options); i2.addExternalEntities(this.externalEntities); const n2 = i2.parseXml(t2); return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); } addEntity(t2, e2) { if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); this.externalEntities[t2] = e2; } static getMetaDataSymbol() { return y.getMetaDataSymbol(); } } function et(t2, e2) { let i2 = ""; return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); } __name(et, "et"); function it(t2, e2, i2, n2) { let s2 = "", r2 = false; for (let o2 = 0; o2 < t2.length; o2++) { const a2 = t2[o2], l2 = nt(a2); if (void 0 === l2) continue; let u2 = ""; if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { let t3 = a2[l2]; rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; continue; } if (l2 === e2.cdataPropName) { r2 && (s2 += n2), s2 += ``, r2 = false; continue; } if (l2 === e2.commentPropName) { s2 += n2 + ``, r2 = true; continue; } if ("?" === l2[0]) { const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; let o3 = a2[l2][0][e2.textNodeName]; o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; continue; } let h2 = n2; "" !== h2 && (h2 += e2.indentBy); const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; } return s2; } __name(it, "it"); function nt(t2) { const e2 = Object.keys(t2); for (let i2 = 0; i2 < e2.length; i2++) { const n2 = e2[i2]; if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; } } __name(nt, "nt"); function st(t2, e2) { let i2 = ""; if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { if (!t2.hasOwnProperty(n2)) continue; let s2 = e2.attributeValueProcessor(n2, t2[n2]); s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; } return i2; } __name(st, "st"); function rt(t2, e2) { let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; return false; } __name(rt, "rt"); function ot(t2, e2) { if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { const n2 = e2.entities[i2]; t2 = t2.replace(n2.regex, n2.val); } return t2; } __name(ot, "ot"); const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { return e2; }, attributeValueProcessor: function(t2, e2) { return e2; }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; function lt(t2) { this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { return false; } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { return ""; }, this.tagEndChar = ">", this.newLine = ""); } __name(lt, "lt"); function ut(t2, e2, i2, n2) { const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); } __name(ut, "ut"); function ht(t2) { return this.options.indentBy.repeat(t2); } __name(ht, "ht"); function dt(t2) { return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); } __name(dt, "dt"); lt.prototype.build = function(t2) { return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); }, lt.prototype.j2x = function(t2, e2, i2) { let n2 = "", s2 = ""; const r2 = i2.join("."); for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); else if ("object" != typeof t2[o2]) { const i3 = this.isAttribute(o2); if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); else if (!i3) if (o2 === this.options.textNodeName) { let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); s2 += this.replaceEntitiesValue(e3); } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); } else if (Array.isArray(t2[o2])) { const n3 = t2[o2].length; let r3 = "", a2 = ""; for (let l2 = 0; l2 < n3; l2++) { const n4 = t2[o2][l2]; if (void 0 === n4) ; else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; else if ("object" == typeof n4) if (this.options.oneListGroup) { const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); else if (this.options.oneListGroup) { let t3 = this.options.tagValueProcessor(o2, n4); t3 = this.replaceEntitiesValue(t3), r3 += t3; } else r3 += this.buildTextValNode(n4, o2, "", e2); } this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { const e3 = Object.keys(t2[o2]), i3 = e3.length; for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); return { attrStr: n2, val: s2 }; }, lt.prototype.buildAttrPairStr = function(t2, e2) { return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; { let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; } }, lt.prototype.closeTag = function(t2) { let e2 = ""; return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; { let s2 = this.options.tagValueProcessor(e2, t2); return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { const i2 = this.options.entities[e2]; t2 = t2.replace(i2.regex, i2.val); } return t2; }; const pt = { validate: a }; module2.exports = e; })(); } }); // node_modules/@azure/core-xml/dist/commonjs/xml.common.js var require_xml_common = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/xml.common.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.XML_CHARKEY = exports2.XML_ATTRKEY = void 0; exports2.XML_ATTRKEY = "$"; exports2.XML_CHARKEY = "_"; } }); // node_modules/@azure/core-xml/dist/commonjs/xml.js var require_xml = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/xml.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stringifyXML = stringifyXML; exports2.parseXML = parseXML; var fast_xml_parser_1 = require_fxp(); var xml_common_js_1 = require_xml_common(); function getCommonOptions(options) { var _a; return { attributesGroupName: xml_common_js_1.XML_ATTRKEY, textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, ignoreAttributes: false, suppressBooleanAttributes: false }; } __name(getCommonOptions, "getCommonOptions"); function getSerializerOptions(options = {}) { var _a, _b; return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } __name(getSerializerOptions, "getSerializerOptions"); function getParserOptions(options = {}) { return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } __name(getParserOptions, "getParserOptions"); function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); const node = { [parserOptions.rootNodeName]: obj }; const xmlData = j2x.build(node); return `${xmlData}`.replace(/\n/g, ""); } __name(stringifyXML, "stringifyXML"); async function parseXML(str, opts = {}) { if (!str) { throw new Error("Document is empty"); } const validation = fast_xml_parser_1.XMLValidator.validate(str); if (validation !== true) { throw validation; } const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); const parsedXml = parser.parse(str); if (parsedXml["?xml"]) { delete parsedXml["?xml"]; } if (!opts.includeRoot) { for (const key of Object.keys(parsedXml)) { const value = parsedXml[key]; return typeof value === "object" ? Object.assign({}, value) : value; } } return parsedXml; } __name(parseXML, "parseXML"); } }); // node_modules/@azure/core-xml/dist/commonjs/index.js var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.XML_CHARKEY = exports2.XML_ATTRKEY = exports2.parseXML = exports2.stringifyXML = void 0; var xml_js_1 = require_xml(); Object.defineProperty(exports2, "stringifyXML", { enumerable: true, get: function() { return xml_js_1.stringifyXML; } }); Object.defineProperty(exports2, "parseXML", { enumerable: true, get: function() { return xml_js_1.parseXML; } }); var xml_common_js_1 = require_xml_common(); Object.defineProperty(exports2, "XML_ATTRKEY", { enumerable: true, get: function() { return xml_common_js_1.XML_ATTRKEY; } }); Object.defineProperty(exports2, "XML_CHARKEY", { enumerable: true, get: function() { return xml_common_js_1.XML_CHARKEY; } }); } }); // node_modules/@azure/storage-blob/dist/commonjs/log.js var require_log5 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); } }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError = class extends Error { static { __name(this, "AbortError"); } constructor(message) { super(message); this.name = "AbortError"; } }; exports2.AbortError = AbortError; } }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError_js_1 = require_AbortError3(); Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { return AbortError_js_1.AbortError; } }); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js var require_RequestPolicy = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { static { __name(this, "BaseRequestPolicy"); } _nextPolicy; _options; /** * The main method to implement that manipulates a request/response. */ constructor(_nextPolicy, _options) { this._nextPolicy = _nextPolicy; this._options = _options; } /** * Get whether or not a log with the provided log level should be logged. * @param logLevel - The log level of the log that will be logged. * @returns Whether or not a log with the provided log level should be logged. */ shouldLog(logLevel) { return this._options.shouldLog(logLevel); } /** * Attempt to log the provided message to the provided logger. If no logger was provided or if * the log level does not meat the logger's threshold, then nothing will be logged. * @param logLevel - The log level of this log. * @param message - The message of this log. */ log(logLevel, message) { this._options.log(logLevel, message); } }; exports2.BaseRequestPolicy = BaseRequestPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js var require_constants10 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; exports2.SDK_VERSION = "12.29.1"; exports2.SERVICE_VERSION = "2025-11-05"; exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; exports2.REQUEST_TIMEOUT = 100 * 1e3; exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", SNAPSHOT: "snapshot", VERSIONID: "versionid", TIMEOUT: "timeout" } }; exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; exports2.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" }; exports2.ETagNone = ""; exports2.ETagAny = "*"; exports2.SIZE_1_MB = 1 * 1024 * 1024; exports2.BATCH_MAX_REQUEST = 256; exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; exports2.HTTP_LINE_ENDING = "\r\n"; exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; exports2.EncryptionAlgorithmAES25 = "AES256"; exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; exports2.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" ]; exports2.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" ]; exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; exports2.PathStylePorts = [ "10000", "10001", "10002", "10003", "10004", "10100", "10101", "10102", "10103", "10104", "11000", "11001", "11002", "11003", "11004", "11100", "11101", "11102", "11103", "11104" ]; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js var require_utils_common = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.escapeURLPath = escapeURLPath; exports2.getValueInConnString = getValueInConnString; exports2.extractConnectionStringParts = extractConnectionStringParts; exports2.appendToURLPath = appendToURLPath; exports2.setURLParameter = setURLParameter; exports2.getURLParameter = getURLParameter; exports2.setURLHost = setURLHost; exports2.getURLPath = getURLPath; exports2.getURLScheme = getURLScheme; exports2.getURLPathAndQuery = getURLPathAndQuery; exports2.getURLQueries = getURLQueries; exports2.appendToURLQuery = appendToURLQuery; exports2.truncatedISO8061Date = truncatedISO8061Date; exports2.base64encode = base64encode; exports2.base64decode = base64decode; exports2.generateBlockID = generateBlockID; exports2.delay = delay; exports2.padStart = padStart; exports2.sanitizeURL = sanitizeURL; exports2.sanitizeHeaders = sanitizeHeaders; exports2.iEqual = iEqual; exports2.getAccountNameFromUrl = getAccountNameFromUrl; exports2.isIpEndpointStyle = isIpEndpointStyle; exports2.toBlobTagsString = toBlobTagsString; exports2.toBlobTags = toBlobTags; exports2.toTags = toTags; exports2.toQuerySerialization = toQuerySerialization; exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; exports2.attachCredential = attachCredential; exports2.httpAuthorizationToString = httpAuthorizationToString; exports2.BlobNameToString = BlobNameToString; exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; exports2.EscapePath = EscapePath; exports2.assertResponse = assertResponse; var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants10(); function escapeURLPath(url) { const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 || "/"; path2 = escape(path2); urlParsed.pathname = path2; return urlParsed.toString(); } __name(escapeURLPath, "escapeURLPath"); function getProxyUriFromDevConnString(connectionString) { let proxyUri = ""; if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { const matchCredentials = connectionString.split(";"); for (const element of matchCredentials) { if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; } } } return proxyUri; } __name(getProxyUriFromDevConnString, "getProxyUriFromDevConnString"); function getValueInConnString(connectionString, argument) { const elements = connectionString.split(";"); for (const element of elements) { if (element.trim().startsWith(argument)) { return element.trim().match(argument + "=(.*)")[1]; } } return ""; } __name(getValueInConnString, "getValueInConnString"); function extractConnectionStringParts(connectionString) { let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { let defaultEndpointsProtocol = ""; let accountName = ""; let accountKey = Buffer.from("accountKey", "base64"); let endpointSuffix = ""; accountName = getValueInConnString(connectionString, "AccountName"); accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); if (!blobEndpoint) { defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); const protocol = defaultEndpointsProtocol.toLowerCase(); if (protocol !== "https" && protocol !== "http") { throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); } endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); if (!endpointSuffix) { throw new Error("Invalid EndpointSuffix in the provided Connection String"); } blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; } if (!accountName) { throw new Error("Invalid AccountName in the provided Connection String"); } else if (accountKey.length === 0) { throw new Error("Invalid AccountKey in the provided Connection String"); } return { kind: "AccountConnString", url: blobEndpoint, accountName, accountKey, proxyUri }; } else { let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); let accountName = getValueInConnString(connectionString, "AccountName"); if (!accountName) { accountName = getAccountNameFromUrl(blobEndpoint); } if (!blobEndpoint) { throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); } else if (!accountSas) { throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); } if (accountSas.startsWith("?")) { accountSas = accountSas.substring(1); } return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } __name(extractConnectionStringParts, "extractConnectionStringParts"); function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } __name(escape, "escape"); function appendToURLPath(url, name) { const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; urlParsed.pathname = path2; return urlParsed.toString(); } __name(appendToURLPath, "appendToURLPath"); function setURLParameter(url, name, value) { const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; const searchPieces = []; for (const pair of searchString.slice(1).split("&")) { if (pair) { const [key] = pair.split("=", 2); if (key !== encodedName) { searchPieces.push(pair); } } } if (encodedValue) { searchPieces.push(`${encodedName}=${encodedValue}`); } urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } __name(setURLParameter, "setURLParameter"); function getURLParameter(url, name) { const urlParsed = new URL(url); return urlParsed.searchParams.get(name) ?? void 0; } __name(getURLParameter, "getURLParameter"); function setURLHost(url, host) { const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } __name(setURLHost, "setURLHost"); function getURLPath(url) { try { const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } __name(getURLPath, "getURLPath"); function getURLScheme(url) { try { const urlParsed = new URL(url); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } __name(getURLScheme, "getURLScheme"); function getURLPathAndQuery(url) { const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); } let queryString = urlParsed.search || ""; queryString = queryString.trim(); if (queryString !== "") { queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; } return `${pathString}${queryString}`; } __name(getURLPathAndQuery, "getURLPathAndQuery"); function getURLQueries(url) { let queryString = new URL(url).search; if (!queryString) { return {}; } queryString = queryString.trim(); queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; let querySubStrings = queryString.split("&"); querySubStrings = querySubStrings.filter((value) => { const indexOfEqual = value.indexOf("="); const lastIndexOfEqual = value.lastIndexOf("="); return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; }); const queries = {}; for (const querySubString of querySubStrings) { const splitResults = querySubString.split("="); const key = splitResults[0]; const value = splitResults[1]; queries[key] = value; } return queries; } __name(getURLQueries, "getURLQueries"); function appendToURLQuery(url, queryParts) { const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; } else { query = queryParts; } urlParsed.search = query; return urlParsed.toString(); } __name(appendToURLQuery, "appendToURLQuery"); function truncatedISO8061Date(date, withMilliseconds = true) { const dateString = date.toISOString(); return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } __name(truncatedISO8061Date, "truncatedISO8061Date"); function base64encode(content) { return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } __name(base64encode, "base64encode"); function base64decode(encodedString) { return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } __name(base64decode, "base64decode"); function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; const maxBlockIndexLength = 6; const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); return base64encode(res); } __name(generateBlockID, "generateBlockID"); async function delay(timeInMs, aborter, abortError) { return new Promise((resolve, reject) => { let timeout; const abortHandler = /* @__PURE__ */ __name(() => { if (timeout !== void 0) { clearTimeout(timeout); } reject(abortError); }, "abortHandler"); const resolveHandler = /* @__PURE__ */ __name(() => { if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } resolve(); }, "resolveHandler"); timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { aborter.addEventListener("abort", abortHandler); } }); } __name(delay, "delay"); function padStart(currentString, targetLength, padString = " ") { if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } padString = padString || " "; if (currentString.length > targetLength) { return currentString; } else { targetLength = targetLength - currentString.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); } return padString.slice(0, targetLength) + currentString; } } __name(padStart, "padStart"); function sanitizeURL(url) { let safeURL = url; if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); } return safeURL; } __name(sanitizeURL, "sanitizeURL"); function sanitizeHeaders(originalHeader) { const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); for (const [name, value] of originalHeader) { if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { headers.set(name, "*****"); } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { headers.set(name, sanitizeURL(value)); } else { headers.set(name, value); } } return headers; } __name(sanitizeHeaders, "sanitizeHeaders"); function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } __name(iEqual, "iEqual"); function getAccountNameFromUrl(url) { const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { accountName = parsedUrl.hostname.split(".")[0]; } else if (isIpEndpointStyle(parsedUrl)) { accountName = parsedUrl.pathname.split("/")[1]; } else { accountName = ""; } return accountName; } catch (error) { throw new Error("Unable to extract accountName with provided information."); } } __name(getAccountNameFromUrl, "getAccountNameFromUrl"); function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; 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(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } __name(isIpEndpointStyle, "isIpEndpointStyle"); function toBlobTagsString(tags) { if (tags === void 0) { return void 0; } const tagPairs = []; for (const key in tags) { if (Object.prototype.hasOwnProperty.call(tags, key)) { const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } __name(toBlobTagsString, "toBlobTagsString"); function toBlobTags(tags) { if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; for (const key in tags) { if (Object.prototype.hasOwnProperty.call(tags, key)) { const value = tags[key]; res.blobTagSet.push({ key, value }); } } return res; } __name(toBlobTags, "toBlobTags"); function toTags(tags) { if (tags === void 0) { return void 0; } const res = {}; for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; } __name(toTags, "toTags"); function toQuerySerialization(textConfiguration) { if (textConfiguration === void 0) { return void 0; } switch (textConfiguration.kind) { case "csv": return { format: { type: "delimited", delimitedTextConfiguration: { columnSeparator: textConfiguration.columnSeparator || ",", fieldQuote: textConfiguration.fieldQuote || "", recordSeparator: textConfiguration.recordSeparator, escapeChar: textConfiguration.escapeCharacter || "", headersPresent: textConfiguration.hasHeaders || false } } }; case "json": return { format: { type: "json", jsonTextConfiguration: { recordSeparator: textConfiguration.recordSeparator } } }; case "arrow": return { format: { type: "arrow", arrowConfiguration: { schema: textConfiguration.schema } } }; case "parquet": return { format: { type: "parquet" } }; default: throw Error("Invalid BlobQueryTextConfiguration."); } } __name(toQuerySerialization, "toQuerySerialization"); function parseObjectReplicationRecord(objectReplicationRecord) { if (!objectReplicationRecord) { return void 0; } if ("policy-id" in objectReplicationRecord) { return void 0; } const orProperties = []; for (const key in objectReplicationRecord) { const ids = key.split("_"); const policyPrefix = "or-"; if (ids[0].startsWith(policyPrefix)) { ids[0] = ids[0].substring(policyPrefix.length); } const rule = { ruleId: ids[1], replicationStatus: objectReplicationRecord[key] }; const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); if (policyIndex > -1) { orProperties[policyIndex].rules.push(rule); } else { orProperties.push({ policyId: ids[0], rules: [rule] }); } } return orProperties; } __name(parseObjectReplicationRecord, "parseObjectReplicationRecord"); function attachCredential(thing, credential) { thing.credential = credential; return thing; } __name(attachCredential, "attachCredential"); function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } __name(httpAuthorizationToString, "httpAuthorizationToString"); function BlobNameToString(name) { if (name.encoded) { return decodeURIComponent(name.content); } else { return name.content; } } __name(BlobNameToString, "BlobNameToString"); function ConvertInternalResponseOfListBlobFlat(internalResponse) { return { ...internalResponse, segment: { blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { const blobItem = { ...blobItemInteral, name: BlobNameToString(blobItemInteral.name) }; return blobItem; }) } }; } __name(ConvertInternalResponseOfListBlobFlat, "ConvertInternalResponseOfListBlobFlat"); function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { return { ...internalResponse, segment: { blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { const blobPrefix = { ...blobPrefixInternal, name: BlobNameToString(blobPrefixInternal.name) }; return blobPrefix; }), blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { const blobItem = { ...blobItemInteral, name: BlobNameToString(blobItemInteral.name) }; return blobItem; }) } }; } __name(ConvertInternalResponseOfListBlobHierarchy, "ConvertInternalResponseOfListBlobHierarchy"); function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; let clearRange = []; if (getPageRangesSegment.pageRange) pageRange = getPageRangesSegment.pageRange; if (getPageRangesSegment.clearRange) clearRange = getPageRangesSegment.clearRange; let pageRangeIndex = 0; let clearRangeIndex = 0; while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { yield { start: pageRange[pageRangeIndex].start, end: pageRange[pageRangeIndex].end, isClear: false }; ++pageRangeIndex; } else { yield { start: clearRange[clearRangeIndex].start, end: clearRange[clearRangeIndex].end, isClear: true }; ++clearRangeIndex; } } for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { yield { start: pageRange[pageRangeIndex].start, end: pageRange[pageRangeIndex].end, isClear: false }; } for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { yield { start: clearRange[clearRangeIndex].start, end: clearRange[clearRangeIndex].end, isClear: true }; } } __name(ExtractPageRangeInfoItems, "ExtractPageRangeInfoItems"); function EscapePath(blobName) { const split = blobName.split("/"); for (let i = 0; i < split.length; i++) { split[i] = encodeURIComponent(split[i]); } return split.join("/"); } __name(EscapePath, "EscapePath"); function assertResponse(response) { if (`_response` in response) { return response; } throw new TypeError(`Unexpected response object ${response}`); } __name(assertResponse, "assertResponse"); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js var require_StorageRetryPolicyType = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js var require_StorageRetryPolicy = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicy = void 0; exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; var abort_controller_1 = require_commonjs11(); var RequestPolicy_js_1 = require_RequestPolicy(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); var log_js_1 = require_log5(); var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); function NewRetryPolicyFactory(retryOptions) { return { create: (nextPolicy, options) => { return new StorageRetryPolicy(nextPolicy, options, retryOptions); } }; } __name(NewRetryPolicyFactory, "NewRetryPolicyFactory"); var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "StorageRetryPolicy"); } /** * RetryOptions. */ retryOptions; /** * Creates an instance of RetryPolicy. * * @param nextPolicy - * @param options - * @param retryOptions - */ constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** * Sends request. * * @param request - */ async sendRequest(request) { return this.attemptSendRequest(request, false, 1); } /** * Decide and perform next retry. Won't mutate request parameter. * * @param request - * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then * the resource was not found. This may be due to replication delay. So, in this * case, we'll never try the secondary again for this operation. * @param attempt - How many retries has been attempted to performed, starting from 1, which includes * the attempt will be performed by this method call. */ async attemptSendRequest(request, secondaryHas404, attempt) { const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } } await this.delay(isPrimaryRetry, attempt, request.abortSignal); return this.attemptSendRequest(request, secondaryHas404, ++attempt); } /** * Decide whether to retry according to last HTTP response and retry counters. * * @param isPrimaryRetry - * @param attempt - * @param response - * @param err - */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", "ECONNRESET", "ENOENT", "ENOTFOUND", "TIMEOUT", "EPIPE", "REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js ]; if (err) { for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } } if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } if (response) { if (response?.status >= 400) { const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); if (copySourceError !== void 0) { switch (copySourceError) { case "InternalError": case "OperationTimedOut": case "ServerBusy": return true; } } } } if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; } /** * Delay a calculated time between retries. * * @param isPrimaryRetry - * @param attempt - * @param abortSignal - */ async delay(isPrimaryRetry, attempt, abortSignal) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; exports2.StorageRetryPolicy = StorageRetryPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js var require_StorageRetryPolicyFactory = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { return StorageRetryPolicy_js_1.StorageRetryPolicy; } }); var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } }); var StorageRetryPolicyFactory = class { static { __name(this, "StorageRetryPolicyFactory"); } retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - */ constructor(retryOptions) { this.retryOptions = retryOptions; } /** * Creates a StorageRetryPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js var require_CredentialPolicy = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CredentialPolicy = void 0; var RequestPolicy_js_1 = require_RequestPolicy(); var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "CredentialPolicy"); } /** * Sends out request. * * @param request - */ sendRequest(request) { return this._nextPolicy.sendRequest(this.signRequest(request)); } /** * Child classes must implement this method with request signing. This method * will be executed in {@link sendRequest}. * * @param request - */ signRequest(request) { return request; } }; exports2.CredentialPolicy = CredentialPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js var require_SharedKeyComparator = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.compareHeader = compareHeader; var 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 ]); var 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 ]); var 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 ]); function compareHeader(lhs, rhs) { if (isLessThan(lhs, rhs)) return -1; return 1; } __name(compareHeader, "compareHeader"); function isLessThan(lhs, rhs) { const tables = [table_lv0, table_lv2, table_lv4]; let curr_level = 0; let i = 0; let j = 0; while (curr_level < tables.length) { if (curr_level === tables.length - 1 && i !== j) { return i > j; } const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; if (weight1 === 1 && weight2 === 1) { i = 0; j = 0; ++curr_level; } else if (weight1 === weight2) { ++i; ++j; } else if (weight1 === 0) { ++i; } else if (weight2 === 0) { ++j; } else { return weight1 < weight2; } } return false; } __name(isLessThan, "isLessThan"); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js var require_StorageSharedKeyCredentialPolicy = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageSharedKeyCredentialPolicy = void 0; var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); var CredentialPolicy_js_1 = require_CredentialPolicy(); var SharedKeyComparator_js_1 = require_SharedKeyComparator(); var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { static { __name(this, "StorageSharedKeyCredentialPolicy"); } /** * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy */ factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - * @param options - * @param factory - */ constructor(nextPolicy, options, factory) { super(nextPolicy, options); this.factory = factory; } /** * Signs request. * * @param request - */ signRequest(request) { request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - */ getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; } /** * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. * 2. Convert each HTTP header name to lowercase. * 3. Sort the headers lexicographically by header name, in ascending order. * Each header may appear only once in the string. * 4. Replace any linear whitespace in the header value with a single space. * 5. Trim any whitespace around the colon in the header. * 6. Finally, append a new-line character to each canonicalized header in the resulting list. * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. * * @param request - */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { return false; } return true; }); let canonicalizedHeadersStringToSign = ""; headersArray.forEach((header) => { canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} `; }); return canonicalizedHeadersStringToSign; } /** * Retrieves the webResource canonicalized resource string. * * @param request - */ getCanonicalizedResourceString(request) { const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path2}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; for (const key in queries) { if (Object.prototype.hasOwnProperty.call(queries, key)) { const lowercaseKey = key.toLowerCase(); lowercaseQueries[lowercaseKey] = queries[key]; queryKeys.push(lowercaseKey); } } queryKeys.sort(); for (const key of queryKeys) { canonicalizedResourceString += ` ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } return canonicalizedResourceString; } }; exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js var require_Credential = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Credential = void 0; var Credential = class { static { __name(this, "Credential"); } /** * Creates a RequestPolicy object. * * @param _nextPolicy - * @param _options - */ create(_nextPolicy, _options) { throw new Error("Method should be implemented in children classes."); } }; exports2.Credential = Credential; } }); // node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js var require_StorageSharedKeyCredential = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageSharedKeyCredential = void 0; var node_crypto_1 = require("node:crypto"); var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); var Credential_js_1 = require_Credential(); var StorageSharedKeyCredential = class extends Credential_js_1.Credential { static { __name(this, "StorageSharedKeyCredential"); } /** * Azure Storage account name; readonly. */ accountName; /** * Azure Storage account key; readonly. */ accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - * @param accountKey - */ constructor(accountName, accountKey) { super(); this.accountName = accountName; this.accountKey = Buffer.from(accountKey, "base64"); } /** * Creates a StorageSharedKeyCredentialPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. * * @param stringToSign - */ computeHMACSHA256(stringToSign) { return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js var require_AnonymousCredentialPolicy = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AnonymousCredentialPolicy = void 0; var CredentialPolicy_js_1 = require_CredentialPolicy(); var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { static { __name(this, "AnonymousCredentialPolicy"); } /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - * @param options - */ // The base class has a protected constructor. Adding a public one to enable constructing of this class. /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ constructor(nextPolicy, options) { super(nextPolicy, options); } }; exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js var require_AnonymousCredential = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AnonymousCredential = void 0; var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); var Credential_js_1 = require_Credential(); var AnonymousCredential = class extends Credential_js_1.Credential { static { __name(this, "AnonymousCredential"); } /** * Creates an {@link AnonymousCredentialPolicy} object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; exports2.AnonymousCredential = AnonymousCredential; } }); // node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js var require_BuffersStream = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BuffersStream = void 0; var node_stream_1 = require("node:stream"); var BuffersStream = class extends node_stream_1.Readable { static { __name(this, "BuffersStream"); } buffers; byteLength; /** * The offset of data to be read in the current buffer. */ byteOffsetInCurrentBuffer; /** * The index of buffer to be read in the array of buffers. */ bufferIndex; /** * The total length of data already read. */ pushedBytesLength; /** * Creates an instance of BuffersStream that will emit the data * contained in the array of buffers. * * @param buffers - Array of buffers containing the data * @param byteLength - The total length of data contained in the buffers */ constructor(buffers, byteLength, options) { super(options); this.buffers = buffers; this.byteLength = byteLength; this.byteOffsetInCurrentBuffer = 0; this.bufferIndex = 0; this.pushedBytesLength = 0; let buffersLength = 0; for (const buf of this.buffers) { buffersLength += buf.byteLength; } if (buffersLength < this.byteLength) { throw new Error("Data size shouldn't be larger than the total length of buffers."); } } /** * Internal _read() that will be called when the stream wants to pull more data in. * * @param size - Optional. The size of data to be read */ _read(size) { if (this.pushedBytesLength >= this.byteLength) { this.push(null); } if (!size) { size = this.readableHighWaterMark; } const outBuffers = []; let i = 0; while (i < size && this.pushedBytesLength < this.byteLength) { const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); if (remaining > size - i) { const end = this.byteOffsetInCurrentBuffer + size - i; outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); this.pushedBytesLength += size - i; this.byteOffsetInCurrentBuffer = end; i = size; break; } else { const end = this.byteOffsetInCurrentBuffer + remaining; outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); if (remaining === remainingCapacityInThisBuffer) { this.byteOffsetInCurrentBuffer = 0; this.bufferIndex++; } else { this.byteOffsetInCurrentBuffer = end; } this.pushedBytesLength += remaining; i += remaining; } } if (outBuffers.length > 1) { this.push(Buffer.concat(outBuffers)); } else if (outBuffers.length === 1) { this.push(outBuffers[0]); } } }; exports2.BuffersStream = BuffersStream; } }); // node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js var require_PooledBuffer = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PooledBuffer = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var BuffersStream_js_1 = require_BuffersStream(); var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; var PooledBuffer = class { static { __name(this, "PooledBuffer"); } /** * Internal buffers used to keep the data. * Each buffer has a length of the maxBufferLength except last one. */ buffers = []; /** * The total size of internal buffers. */ capacity; /** * The total size of data contained in internal buffers. */ _size; /** * The size of the data contained in the pooled buffers. */ get size() { return this._size; } constructor(capacity, buffers, totalLength) { this.capacity = capacity; this._size = 0; const bufferNum = Math.ceil(capacity / maxBufferLength); for (let i = 0; i < bufferNum; i++) { let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; if (len === 0) { len = maxBufferLength; } this.buffers.push(Buffer.allocUnsafe(len)); } if (buffers) { this.fill(buffers, totalLength); } } /** * Fill the internal buffers with data in the input buffers serially * with respect to the total length and the total capacity of the internal buffers. * Data copied will be shift out of the input buffers. * * @param buffers - Input buffers containing the data to be filled in the pooled buffer * @param totalLength - Total length of the data to be filled in. * */ fill(buffers, totalLength) { this._size = Math.min(this.capacity, totalLength); let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; while (totalCopiedNum < this._size) { const source = buffers[i]; const target = this.buffers[j]; const copiedNum = source.copy(target, targetOffset, sourceOffset); totalCopiedNum += copiedNum; sourceOffset += copiedNum; targetOffset += copiedNum; if (sourceOffset === source.length) { i++; sourceOffset = 0; } if (targetOffset === target.length) { j++; targetOffset = 0; } } buffers.splice(0, i); if (buffers.length > 0) { buffers[0] = buffers[0].slice(sourceOffset); } } /** * Get the readable stream assembled from all the data in the internal buffers. * */ getReadableStream() { return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); } }; exports2.PooledBuffer = PooledBuffer; } }); // node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js var require_BufferScheduler = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BufferScheduler = void 0; var events_1 = require("events"); var PooledBuffer_js_1 = require_PooledBuffer(); var BufferScheduler = class { static { __name(this, "BufferScheduler"); } /** * Size of buffers in incoming and outgoing queues. This class will try to align * data read from Readable stream into buffer chunks with bufferSize defined. */ bufferSize; /** * How many buffers can be created or maintained. */ maxBuffers; /** * A Node.js Readable stream. */ readable; /** * OutgoingHandler is an async function triggered by BufferScheduler when there * are available buffers in outgoing array. */ outgoingHandler; /** * An internal event emitter. */ emitter = new events_1.EventEmitter(); /** * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) */ concurrency; /** * An internal offset marker to track data offset in bytes of next outgoingHandler. */ offset = 0; /** * An internal marker to track whether stream is end. */ isStreamEnd = false; /** * An internal marker to track whether stream or outgoingHandler returns error. */ isError = false; /** * How many handlers are executing. */ executingOutgoingHandlers = 0; /** * Encoding of the input Readable stream which has string data type instead of Buffer. */ encoding; /** * How many buffers have been allocated. */ numBuffers = 0; /** * Because this class doesn't know how much data every time stream pops, which * is defined by highWaterMarker of the stream. So BufferScheduler will cache * data received from the stream, when data in unresolvedDataArray exceeds the * blockSize defined, it will try to concat a blockSize of buffer, fill into available * buffers from incoming and push to outgoing array. */ unresolvedDataArray = []; /** * How much data consisted in unresolvedDataArray. */ unresolvedLength = 0; /** * The array includes all the available buffers can be used to fill data from stream. */ incoming = []; /** * The array (queue) includes all the buffers filled from stream data. */ outgoing = []; /** * Creates an instance of BufferScheduler. * * @param readable - A Node.js Readable stream * @param bufferSize - Buffer size of every maintained buffer * @param maxBuffers - How many buffers can be allocated * @param outgoingHandler - An async function scheduled to be * triggered when a buffer fully filled * with stream data * @param concurrency - Concurrency of executing outgoingHandlers (>0) * @param encoding - [Optional] Encoding of Readable stream when it's a string stream */ constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { if (bufferSize <= 0) { throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); } if (maxBuffers <= 0) { throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); } if (concurrency <= 0) { throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); } this.bufferSize = bufferSize; this.maxBuffers = maxBuffers; this.readable = readable; this.outgoingHandler = outgoingHandler; this.concurrency = concurrency; this.encoding = encoding; } /** * Start the scheduler, will return error when stream of any of the outgoingHandlers * returns error. * */ async do() { return new Promise((resolve, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); if (!this.resolveData()) { this.readable.pause(); } }); this.readable.on("error", (err) => { this.emitter.emit("error", err); }); this.readable.on("end", () => { this.isStreamEnd = true; this.emitter.emit("checkEnd"); }); this.emitter.on("error", (err) => { this.isError = true; this.readable.pause(); reject(err); }); this.emitter.on("checkEnd", () => { if (this.outgoing.length > 0) { this.triggerOutgoingHandlers(); return; } if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { const buffer = this.shiftBufferFromUnresolvedDataArray(); this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { resolve(); } } }); }); } /** * Insert a new data into unresolved array. * * @param data - */ appendUnresolvedData(data) { this.unresolvedDataArray.push(data); this.unresolvedLength += data.length; } /** * Try to shift a buffer with size in blockSize. The buffer returned may be less * than blockSize when data in unresolvedDataArray is less than bufferSize. * */ shiftBufferFromUnresolvedDataArray(buffer) { if (!buffer) { buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); } else { buffer.fill(this.unresolvedDataArray, this.unresolvedLength); } this.unresolvedLength -= buffer.size; return buffer; } /** * Resolve data in unresolvedDataArray. For every buffer with size in blockSize * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, * then push it into outgoing to be handled by outgoing handler. * * Return false when available buffers in incoming are not enough, else true. * * @returns Return false when buffers in incoming are not enough, else true. */ resolveData() { while (this.unresolvedLength >= this.bufferSize) { let buffer; if (this.incoming.length > 0) { buffer = this.incoming.shift(); this.shiftBufferFromUnresolvedDataArray(buffer); } else { if (this.numBuffers < this.maxBuffers) { buffer = this.shiftBufferFromUnresolvedDataArray(); this.numBuffers++; } else { return false; } } this.outgoing.push(buffer); this.triggerOutgoingHandlers(); } return true; } /** * Try to trigger a outgoing handler for every buffer in outgoing. Stop when * concurrency reaches. */ async triggerOutgoingHandlers() { let buffer; do { if (this.executingOutgoingHandlers >= this.concurrency) { return; } buffer = this.outgoing.shift(); if (buffer) { this.triggerOutgoingHandler(buffer); } } while (buffer); } /** * Trigger a outgoing handler for a buffer shifted from outgoing. * * @param buffer - */ async triggerOutgoingHandler(buffer) { const bufferLength = buffer.size; this.executingOutgoingHandlers++; this.offset += bufferLength; try { await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); } catch (err) { this.emitter.emit("error", err); return; } this.executingOutgoingHandlers--; this.reuseBuffer(buffer); this.emitter.emit("checkEnd"); } /** * Return buffer used by outgoing handler into incoming. * * @param buffer - */ reuseBuffer(buffer) { this.incoming.push(buffer); if (!this.isError && this.resolveData() && !this.isStreamEnd) { this.readable.resume(); } } }; exports2.BufferScheduler = BufferScheduler; } }); // node_modules/@azure/storage-common/dist/commonjs/cache.js var require_cache2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } __name(getCachedDefaultHttpClient, "getCachedDefaultHttpClient"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js var require_RequestPolicy2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { static { __name(this, "BaseRequestPolicy"); } _nextPolicy; _options; /** * The main method to implement that manipulates a request/response. */ constructor(_nextPolicy, _options) { this._nextPolicy = _nextPolicy; this._options = _options; } /** * Get whether or not a log with the provided log level should be logged. * @param logLevel - The log level of the log that will be logged. * @returns Whether or not a log with the provided log level should be logged. */ shouldLog(logLevel) { return this._options.shouldLog(logLevel); } /** * Attempt to log the provided message to the provided logger. If no logger was provided or if * the log level does not meat the logger's threshold, then nothing will be logged. * @param logLevel - The log level of this log. * @param message - The message of this log. */ log(logLevel, message) { this._options.log(logLevel, message); } }; exports2.BaseRequestPolicy = BaseRequestPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/utils/constants.js var require_constants11 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; exports2.SDK_VERSION = "1.0.0"; exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", SNAPSHOT: "snapshot", VERSIONID: "versionid", TIMEOUT: "timeout" } }; exports2.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" }; exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; exports2.PathStylePorts = [ "10000", "10001", "10002", "10003", "10004", "10100", "10101", "10102", "10103", "10104", "11000", "11001", "11002", "11003", "11004", "11100", "11101", "11102", "11103", "11104" ]; } }); // node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js var require_utils_common2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.escapeURLPath = escapeURLPath; exports2.getValueInConnString = getValueInConnString; exports2.extractConnectionStringParts = extractConnectionStringParts; exports2.appendToURLPath = appendToURLPath; exports2.setURLParameter = setURLParameter; exports2.getURLParameter = getURLParameter; exports2.setURLHost = setURLHost; exports2.getURLPath = getURLPath; exports2.getURLScheme = getURLScheme; exports2.getURLPathAndQuery = getURLPathAndQuery; exports2.getURLQueries = getURLQueries; exports2.appendToURLQuery = appendToURLQuery; exports2.truncatedISO8061Date = truncatedISO8061Date; exports2.base64encode = base64encode; exports2.base64decode = base64decode; exports2.generateBlockID = generateBlockID; exports2.delay = delay; exports2.padStart = padStart; exports2.sanitizeURL = sanitizeURL; exports2.sanitizeHeaders = sanitizeHeaders; exports2.iEqual = iEqual; exports2.getAccountNameFromUrl = getAccountNameFromUrl; exports2.isIpEndpointStyle = isIpEndpointStyle; exports2.attachCredential = attachCredential; exports2.httpAuthorizationToString = httpAuthorizationToString; exports2.EscapePath = EscapePath; exports2.assertResponse = assertResponse; var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants11(); function escapeURLPath(url) { const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 || "/"; path2 = escape(path2); urlParsed.pathname = path2; return urlParsed.toString(); } __name(escapeURLPath, "escapeURLPath"); function getProxyUriFromDevConnString(connectionString) { let proxyUri = ""; if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { const matchCredentials = connectionString.split(";"); for (const element of matchCredentials) { if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; } } } return proxyUri; } __name(getProxyUriFromDevConnString, "getProxyUriFromDevConnString"); function getValueInConnString(connectionString, argument) { const elements = connectionString.split(";"); for (const element of elements) { if (element.trim().startsWith(argument)) { return element.trim().match(argument + "=(.*)")[1]; } } return ""; } __name(getValueInConnString, "getValueInConnString"); function extractConnectionStringParts(connectionString) { let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { let defaultEndpointsProtocol = ""; let accountName = ""; let accountKey = Buffer.from("accountKey", "base64"); let endpointSuffix = ""; accountName = getValueInConnString(connectionString, "AccountName"); accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); if (!blobEndpoint) { defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); const protocol = defaultEndpointsProtocol.toLowerCase(); if (protocol !== "https" && protocol !== "http") { throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); } endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); if (!endpointSuffix) { throw new Error("Invalid EndpointSuffix in the provided Connection String"); } blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; } if (!accountName) { throw new Error("Invalid AccountName in the provided Connection String"); } else if (accountKey.length === 0) { throw new Error("Invalid AccountKey in the provided Connection String"); } return { kind: "AccountConnString", url: blobEndpoint, accountName, accountKey, proxyUri }; } else { let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); let accountName = getValueInConnString(connectionString, "AccountName"); if (!accountName) { accountName = getAccountNameFromUrl(blobEndpoint); } if (!blobEndpoint) { throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); } else if (!accountSas) { throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); } if (accountSas.startsWith("?")) { accountSas = accountSas.substring(1); } return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } __name(extractConnectionStringParts, "extractConnectionStringParts"); function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } __name(escape, "escape"); function appendToURLPath(url, name) { const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; urlParsed.pathname = path2; return urlParsed.toString(); } __name(appendToURLPath, "appendToURLPath"); function setURLParameter(url, name, value) { const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; const searchPieces = []; for (const pair of searchString.slice(1).split("&")) { if (pair) { const [key] = pair.split("=", 2); if (key !== encodedName) { searchPieces.push(pair); } } } if (encodedValue) { searchPieces.push(`${encodedName}=${encodedValue}`); } urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } __name(setURLParameter, "setURLParameter"); function getURLParameter(url, name) { const urlParsed = new URL(url); return urlParsed.searchParams.get(name) ?? void 0; } __name(getURLParameter, "getURLParameter"); function setURLHost(url, host) { const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } __name(setURLHost, "setURLHost"); function getURLPath(url) { try { const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } __name(getURLPath, "getURLPath"); function getURLScheme(url) { try { const urlParsed = new URL(url); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } __name(getURLScheme, "getURLScheme"); function getURLPathAndQuery(url) { const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); } let queryString = urlParsed.search || ""; queryString = queryString.trim(); if (queryString !== "") { queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; } return `${pathString}${queryString}`; } __name(getURLPathAndQuery, "getURLPathAndQuery"); function getURLQueries(url) { let queryString = new URL(url).search; if (!queryString) { return {}; } queryString = queryString.trim(); queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; let querySubStrings = queryString.split("&"); querySubStrings = querySubStrings.filter((value) => { const indexOfEqual = value.indexOf("="); const lastIndexOfEqual = value.lastIndexOf("="); return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; }); const queries = {}; for (const querySubString of querySubStrings) { const splitResults = querySubString.split("="); const key = splitResults[0]; const value = splitResults[1]; queries[key] = value; } return queries; } __name(getURLQueries, "getURLQueries"); function appendToURLQuery(url, queryParts) { const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; } else { query = queryParts; } urlParsed.search = query; return urlParsed.toString(); } __name(appendToURLQuery, "appendToURLQuery"); function truncatedISO8061Date(date, withMilliseconds = true) { const dateString = date.toISOString(); return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } __name(truncatedISO8061Date, "truncatedISO8061Date"); function base64encode(content) { return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } __name(base64encode, "base64encode"); function base64decode(encodedString) { return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } __name(base64decode, "base64decode"); function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; const maxBlockIndexLength = 6; const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } const res = blockIDPrefix + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); return base64encode(res); } __name(generateBlockID, "generateBlockID"); async function delay(timeInMs, aborter, abortError) { return new Promise((resolve, reject) => { let timeout; const abortHandler = /* @__PURE__ */ __name(() => { if (timeout !== void 0) { clearTimeout(timeout); } reject(abortError); }, "abortHandler"); const resolveHandler = /* @__PURE__ */ __name(() => { if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } resolve(); }, "resolveHandler"); timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { aborter.addEventListener("abort", abortHandler); } }); } __name(delay, "delay"); function padStart(currentString, targetLength, padString = " ") { if (String.prototype.padStart) { return currentString.padStart(targetLength, padString); } padString = padString || " "; if (currentString.length > targetLength) { return currentString; } else { targetLength = targetLength - currentString.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); } return padString.slice(0, targetLength) + currentString; } } __name(padStart, "padStart"); function sanitizeURL(url) { let safeURL = url; if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); } return safeURL; } __name(sanitizeURL, "sanitizeURL"); function sanitizeHeaders(originalHeader) { const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); for (const [name, value] of originalHeader) { if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { headers.set(name, "*****"); } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { headers.set(name, sanitizeURL(value)); } else { headers.set(name, value); } } return headers; } __name(sanitizeHeaders, "sanitizeHeaders"); function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } __name(iEqual, "iEqual"); function getAccountNameFromUrl(url) { const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { accountName = parsedUrl.hostname.split(".")[0]; } else if (isIpEndpointStyle(parsedUrl)) { accountName = parsedUrl.pathname.split("/")[1]; } else { accountName = ""; } return accountName; } catch (error) { throw new Error("Unable to extract accountName with provided information."); } } __name(getAccountNameFromUrl, "getAccountNameFromUrl"); function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; 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(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } __name(isIpEndpointStyle, "isIpEndpointStyle"); function attachCredential(thing, credential) { thing.credential = credential; return thing; } __name(attachCredential, "attachCredential"); function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } __name(httpAuthorizationToString, "httpAuthorizationToString"); function EscapePath(blobName) { const split = blobName.split("/"); for (let i = 0; i < split.length; i++) { split[i] = encodeURIComponent(split[i]); } return split.join("/"); } __name(EscapePath, "EscapePath"); function assertResponse(response) { if (`_response` in response) { return response; } throw new TypeError(`Unexpected response object ${response}`); } __name(assertResponse, "assertResponse"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js var require_StorageBrowserPolicy = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageBrowserPolicy = void 0; var RequestPolicy_js_1 = require_RequestPolicy2(); var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "StorageBrowserPolicy"); } /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - * @param options - */ // The base class has a protected constructor. Adding a public one to enable constructing of this class. /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ constructor(nextPolicy, options) { super(nextPolicy, options); } /** * Sends out request. * * @param request - */ async sendRequest(request) { if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } request.headers.remove(constants_js_1.HeaderConstants.COOKIE); request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; exports2.StorageBrowserPolicy = StorageBrowserPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js var require_StorageBrowserPolicyFactory = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } }); var StorageBrowserPolicyFactory = class { static { __name(this, "StorageBrowserPolicyFactory"); } /** * Creates a StorageBrowserPolicyFactory object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; } }); // node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js var require_CredentialPolicy2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CredentialPolicy = void 0; var RequestPolicy_js_1 = require_RequestPolicy2(); var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "CredentialPolicy"); } /** * Sends out request. * * @param request - */ sendRequest(request) { return this._nextPolicy.sendRequest(this.signRequest(request)); } /** * Child classes must implement this method with request signing. This method * will be executed in {@link sendRequest}. * * @param request - */ signRequest(request) { return request; } }; exports2.CredentialPolicy = CredentialPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js var require_AnonymousCredentialPolicy2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AnonymousCredentialPolicy = void 0; var CredentialPolicy_js_1 = require_CredentialPolicy2(); var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { static { __name(this, "AnonymousCredentialPolicy"); } /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - * @param options - */ // The base class has a protected constructor. Adding a public one to enable constructing of this class. /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ constructor(nextPolicy, options) { super(nextPolicy, options); } }; exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js var require_Credential2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Credential = void 0; var Credential = class { static { __name(this, "Credential"); } /** * Creates a RequestPolicy object. * * @param _nextPolicy - * @param _options - */ create(_nextPolicy, _options) { throw new Error("Method should be implemented in children classes."); } }; exports2.Credential = Credential; } }); // node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js var require_AnonymousCredential2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AnonymousCredential = void 0; var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); var Credential_js_1 = require_Credential2(); var AnonymousCredential = class extends Credential_js_1.Credential { static { __name(this, "AnonymousCredential"); } /** * Creates an {@link AnonymousCredentialPolicy} object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; exports2.AnonymousCredential = AnonymousCredential; } }); // node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js var require_SharedKeyComparator2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.compareHeader = compareHeader; var 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 ]); var 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 ]); var 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 ]); function compareHeader(lhs, rhs) { if (isLessThan(lhs, rhs)) return -1; return 1; } __name(compareHeader, "compareHeader"); function isLessThan(lhs, rhs) { const tables = [table_lv0, table_lv2, table_lv4]; let curr_level = 0; let i = 0; let j = 0; while (curr_level < tables.length) { if (curr_level === tables.length - 1 && i !== j) { return i > j; } const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; if (weight1 === 1 && weight2 === 1) { i = 0; j = 0; ++curr_level; } else if (weight1 === weight2) { ++i; ++j; } else if (weight1 === 0) { ++i; } else if (weight2 === 0) { ++j; } else { return weight1 < weight2; } } return false; } __name(isLessThan, "isLessThan"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageSharedKeyCredentialPolicy = void 0; var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); var CredentialPolicy_js_1 = require_CredentialPolicy2(); var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { static { __name(this, "StorageSharedKeyCredentialPolicy"); } /** * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy */ factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - * @param options - * @param factory - */ constructor(nextPolicy, options, factory) { super(nextPolicy, options); this.factory = factory; } /** * Signs request. * * @param request - */ signRequest(request) { request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - */ getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; } /** * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. * 2. Convert each HTTP header name to lowercase. * 3. Sort the headers lexicographically by header name, in ascending order. * Each header may appear only once in the string. * 4. Replace any linear whitespace in the header value with a single space. * 5. Trim any whitespace around the colon in the header. * 6. Finally, append a new-line character to each canonicalized header in the resulting list. * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. * * @param request - */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { return false; } return true; }); let canonicalizedHeadersStringToSign = ""; headersArray.forEach((header) => { canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} `; }); return canonicalizedHeadersStringToSign; } /** * Retrieves the webResource canonicalized resource string. * * @param request - */ getCanonicalizedResourceString(request) { const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path2}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; for (const key in queries) { if (Object.prototype.hasOwnProperty.call(queries, key)) { const lowercaseKey = key.toLowerCase(); lowercaseQueries[lowercaseKey] = queries[key]; queryKeys.push(lowercaseKey); } } queryKeys.sort(); for (const key of queryKeys) { canonicalizedResourceString += ` ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } return canonicalizedResourceString; } }; exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js var require_StorageSharedKeyCredential2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageSharedKeyCredential = void 0; var node_crypto_1 = require("node:crypto"); var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); var Credential_js_1 = require_Credential2(); var StorageSharedKeyCredential = class extends Credential_js_1.Credential { static { __name(this, "StorageSharedKeyCredential"); } /** * Azure Storage account name; readonly. */ accountName; /** * Azure Storage account key; readonly. */ accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - * @param accountKey - */ constructor(accountName, accountKey) { super(); this.accountName = accountName; this.accountKey = Buffer.from(accountKey, "base64"); } /** * Creates a StorageSharedKeyCredentialPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. * * @param stringToSign - */ computeHMACSHA256(stringToSign) { return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; } }); // node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError4 = __commonJS({ "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError = class extends Error { static { __name(this, "AbortError"); } constructor(message) { super(message); this.name = "AbortError"; } }; exports2.AbortError = AbortError; } }); // node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js var require_commonjs12 = __commonJS({ "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; var AbortError_js_1 = require_AbortError4(); Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { return AbortError_js_1.AbortError; } }); } }); // node_modules/@azure/storage-common/dist/commonjs/log.js var require_log6 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("storage-common"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js var require_StorageRetryPolicyType2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js var require_StorageRetryPolicy2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicy = void 0; exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; var abort_controller_1 = require_commonjs12(); var RequestPolicy_js_1 = require_RequestPolicy2(); var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); var log_js_1 = require_log6(); var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); function NewRetryPolicyFactory(retryOptions) { return { create: (nextPolicy, options) => { return new StorageRetryPolicy(nextPolicy, options, retryOptions); } }; } __name(NewRetryPolicyFactory, "NewRetryPolicyFactory"); var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "StorageRetryPolicy"); } /** * RetryOptions. */ retryOptions; /** * Creates an instance of RetryPolicy. * * @param nextPolicy - * @param options - * @param retryOptions - */ constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** * Sends request. * * @param request - */ async sendRequest(request) { return this.attemptSendRequest(request, false, 1); } /** * Decide and perform next retry. Won't mutate request parameter. * * @param request - * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then * the resource was not found. This may be due to replication delay. So, in this * case, we'll never try the secondary again for this operation. * @param attempt - How many retries has been attempted to performed, starting from 1, which includes * the attempt will be performed by this method call. */ async attemptSendRequest(request, secondaryHas404, attempt) { const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } } await this.delay(isPrimaryRetry, attempt, request.abortSignal); return this.attemptSendRequest(request, secondaryHas404, ++attempt); } /** * Decide whether to retry according to last HTTP response and retry counters. * * @param isPrimaryRetry - * @param attempt - * @param response - * @param err - */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", "ECONNRESET", "ENOENT", "ENOTFOUND", "TIMEOUT", "EPIPE", "REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js ]; if (err) { for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } } if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } if (response) { if (response?.status >= 400) { const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); if (copySourceError !== void 0) { switch (copySourceError) { case "InternalError": case "OperationTimedOut": case "ServerBusy": return true; } } } } if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; } /** * Delay a calculated time between retries. * * @param isPrimaryRetry - * @param attempt - * @param abortSignal - */ async delay(isPrimaryRetry, attempt, abortSignal) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; exports2.StorageRetryPolicy = StorageRetryPolicy; } }); // node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js var require_StorageRetryPolicyFactory2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { return StorageRetryPolicy_js_1.StorageRetryPolicy; } }); var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } }); var StorageRetryPolicyFactory = class { static { __name(this, "StorageRetryPolicyFactory"); } retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - */ constructor(retryOptions) { this.retryOptions = retryOptions; } /** * Creates a StorageRetryPolicy object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js var require_StorageBrowserPolicyV2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageBrowserPolicyName = void 0; exports2.storageBrowserPolicy = storageBrowserPolicy; var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); exports2.storageBrowserPolicyName = "storageBrowserPolicy"; function storageBrowserPolicy() { return { name: exports2.storageBrowserPolicyName, async sendRequest(request, next) { if (core_util_1.isNodeLike) { return next(request); } if (request.method === "GET" || request.method === "HEAD") { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } request.headers.delete(constants_js_1.HeaderConstants.COOKIE); request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); return next(request); } }; } __name(storageBrowserPolicy, "storageBrowserPolicy"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js var require_StorageCorrectContentLengthPolicy = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageCorrectContentLengthPolicyName = void 0; exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; var constants_js_1 = require_constants11(); exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } __name(correctContentLength, "correctContentLength"); return { name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } __name(storageCorrectContentLengthPolicy, "storageCorrectContentLengthPolicy"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js var require_StorageRetryPolicyV2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageRetryPolicyName = void 0; exports2.storageRetryPolicy = storageRetryPolicy; var abort_controller_1 = require_commonjs12(); var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); var log_js_1 = require_log6(); exports2.storageRetryPolicyName = "storageRetryPolicy"; var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; var retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", "ECONNRESET", "ENOENT", "ENOTFOUND", "TIMEOUT", "EPIPE", "REQUEST_SEND_ERROR" ]; var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error }) { if (attempt >= maxTries) { log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error) { for (const retriableError of retriableErrors) { if (error.name.toUpperCase().includes(retriableError) || error.message.toUpperCase().includes(retriableError) || error.code && error.code.toString().toUpperCase() === retriableError) { log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } if (error?.code === "PARSE_ERROR" && error?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error) { const statusCode = response?.status ?? error?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } if (response) { if (response?.status >= 400) { const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); if (copySourceError !== void 0) { switch (copySourceError) { case "InternalError": case "OperationTimedOut": case "ServerBusy": return true; } } } } return false; } __name(shouldRetry, "shouldRetry"); function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } __name(calculateDelay, "calculateDelay"); return { name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; let response; let error; while (retryAgain) { const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; response = void 0; error = void 0; try { log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { if ((0, core_rest_pipeline_1.isRestError)(e)) { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error = e; } else { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); if (retryAgain) { await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } __name(storageRetryPolicy, "storageRetryPolicy"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageSharedKeyCredentialPolicyName = void 0; exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; var node_crypto_1 = require("node:crypto"); var constants_js_1 = require_constants11(); var utils_common_js_1 = require_utils_common2(); var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } __name(signRequest, "signRequest"); function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; } __name(getHeaderValueToSign, "getHeaderValueToSign"); function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { return false; } return true; }); let canonicalizedHeadersStringToSign = ""; headersArray.forEach((header) => { canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} `; }); return canonicalizedHeadersStringToSign; } __name(getCanonicalizedHeadersString, "getCanonicalizedHeadersString"); function getCanonicalizedResourceString(request) { const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path2}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; for (const key in queries) { if (Object.prototype.hasOwnProperty.call(queries, key)) { const lowercaseKey = key.toLowerCase(); lowercaseQueries[lowercaseKey] = queries[key]; queryKeys.push(lowercaseKey); } } queryKeys.sort(); for (const key of queryKeys) { canonicalizedResourceString += ` ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } return canonicalizedResourceString; } __name(getCanonicalizedResourceString, "getCanonicalizedResourceString"); return { name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } __name(storageSharedKeyCredentialPolicy, "storageSharedKeyCredentialPolicy"); } }); // node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageRequestFailureDetailsParserPolicyName = void 0; exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; function storageRequestFailureDetailsParserPolicy() { return { name: exports2.storageRequestFailureDetailsParserPolicyName, async sendRequest(request, next) { try { const response = await next(request); return response; } catch (err) { if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; } } throw err; } } }; } __name(storageRequestFailureDetailsParserPolicy, "storageRequestFailureDetailsParserPolicy"); } }); // node_modules/@azure/storage-common/dist/commonjs/index.js var require_commonjs13 = __commonJS({ "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_BufferScheduler(), exports2); var cache_js_1 = require_cache2(); Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { return cache_js_1.getCachedDefaultHttpClient; } }); tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); tslib_1.__exportStar(require_AnonymousCredential2(), exports2); tslib_1.__exportStar(require_Credential2(), exports2); tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); var RequestPolicy_js_1 = require_RequestPolicy2(); Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { return RequestPolicy_js_1.BaseRequestPolicy; } }); tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); tslib_1.__exportStar(require_CredentialPolicy2(), exports2); tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js var require_StorageBrowserPolicyV22 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageBrowserPolicyName = void 0; exports2.storageBrowserPolicy = storageBrowserPolicy; var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); exports2.storageBrowserPolicyName = "storageBrowserPolicy"; function storageBrowserPolicy() { return { name: exports2.storageBrowserPolicyName, async sendRequest(request, next) { if (core_util_1.isNodeLike) { return next(request); } if (request.method === "GET" || request.method === "HEAD") { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } request.headers.delete(constants_js_1.HeaderConstants.COOKIE); request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); return next(request); } }; } __name(storageBrowserPolicy, "storageBrowserPolicy"); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js var require_StorageRetryPolicyV22 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageRetryPolicyName = void 0; exports2.storageRetryPolicy = storageRetryPolicy; var abort_controller_1 = require_commonjs11(); var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); var log_js_1 = require_log5(); exports2.storageRetryPolicyName = "storageRetryPolicy"; var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; var retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", "ECONNRESET", "ENOENT", "ENOTFOUND", "TIMEOUT", "EPIPE", "REQUEST_SEND_ERROR" ]; var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error }) { if (attempt >= maxTries) { log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error) { for (const retriableError of retriableErrors) { if (error.name.toUpperCase().includes(retriableError) || error.message.toUpperCase().includes(retriableError) || error.code && error.code.toString().toUpperCase() === retriableError) { log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } if (error?.code === "PARSE_ERROR" && error?.message.startsWith(`Error "Error: Unclosed root tag`)) { log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error) { const statusCode = response?.status ?? error?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } if (response) { if (response?.status >= 400) { const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); if (copySourceError !== void 0) { switch (copySourceError) { case "InternalError": case "OperationTimedOut": case "ServerBusy": return true; } } } } return false; } __name(shouldRetry, "shouldRetry"); function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } __name(calculateDelay, "calculateDelay"); return { name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; let response; let error; while (retryAgain) { const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; response = void 0; error = void 0; try { log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { if ((0, core_rest_pipeline_1.isRestError)(e)) { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error = e; } else { log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); if (retryAgain) { await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } __name(storageRetryPolicy, "storageRetryPolicy"); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageSharedKeyCredentialPolicyName = void 0; exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; var node_crypto_1 = require("node:crypto"); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); var SharedKeyComparator_js_1 = require_SharedKeyComparator(); exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } __name(signRequest, "signRequest"); function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; } __name(getHeaderValueToSign, "getHeaderValueToSign"); function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { return false; } return true; }); let canonicalizedHeadersStringToSign = ""; headersArray.forEach((header) => { canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} `; }); return canonicalizedHeadersStringToSign; } __name(getCanonicalizedHeadersString, "getCanonicalizedHeadersString"); function getCanonicalizedResourceString(request) { const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path2}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; for (const key in queries) { if (Object.prototype.hasOwnProperty.call(queries, key)) { const lowercaseKey = key.toLowerCase(); lowercaseQueries[lowercaseKey] = queries[key]; queryKeys.push(lowercaseKey); } } queryKeys.sort(); for (const key of queryKeys) { canonicalizedResourceString += ` ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } return canonicalizedResourceString; } __name(getCanonicalizedResourceString, "getCanonicalizedResourceString"); return { name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } __name(storageSharedKeyCredentialPolicy, "storageSharedKeyCredentialPolicy"); } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js var require_StorageBrowserPolicy2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageBrowserPolicy = void 0; var RequestPolicy_js_1 = require_RequestPolicy(); var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { static { __name(this, "StorageBrowserPolicy"); } /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - * @param options - */ // The base class has a protected constructor. Adding a public one to enable constructing of this class. /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ constructor(nextPolicy, options) { super(nextPolicy, options); } /** * Sends out request. * * @param request - */ async sendRequest(request) { if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } request.headers.remove(constants_js_1.HeaderConstants.COOKIE); request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; exports2.StorageBrowserPolicy = StorageBrowserPolicy; } }); // node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js var require_StorageBrowserPolicyFactory2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } }); var StorageBrowserPolicyFactory = class { static { __name(this, "StorageBrowserPolicyFactory"); } /** * Creates a StorageBrowserPolicyFactory object. * * @param nextPolicy - * @param options - */ create(nextPolicy, options) { return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; } }); // node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js var require_StorageCorrectContentLengthPolicy2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.storageCorrectContentLengthPolicyName = void 0; exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; var constants_js_1 = require_constants10(); exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } __name(correctContentLength, "correctContentLength"); return { name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } __name(storageCorrectContentLengthPolicy, "storageCorrectContentLengthPolicy"); } }); // node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js var require_Pipeline = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pipeline = exports2.StorageOAuthScopes = void 0; exports2.isPipelineLike = isPipelineLike; exports2.newPipeline = newPipeline; exports2.getCoreClientOptions = getCoreClientOptions; exports2.getCredentialFromPipeline = getCredentialFromPipeline; var core_http_compat_1 = require_commonjs9(); var core_rest_pipeline_1 = require_commonjs6(); var core_client_1 = require_commonjs8(); var core_xml_1 = require_commonjs10(); var core_auth_1 = require_commonjs7(); var log_js_1 = require_log5(); var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var constants_js_1 = require_constants10(); Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { return constants_js_1.StorageOAuthScopes; } }); var storage_common_1 = require_commonjs13(); var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; } const castPipeline = pipeline; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } __name(isPipelineLike, "isPipelineLike"); var Pipeline = class { static { __name(this, "Pipeline"); } /** * A list of chained request policy factories. */ factories; /** * Configures pipeline logger and HTTP client. */ options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * * @param factories - * @param options - */ constructor(factories, options = {}) { this.factories = factories; this.options = options; } /** * Transfer Pipeline object to ServiceClientOptions object which is required by * ServiceClient constructor. * * @returns The ServiceClientOptions object from this Pipeline. */ toServiceClientOptions() { return { httpClient: this.options.httpClient, requestPolicyFactories: this.factories }; } }; exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; return pipeline; } __name(newPipeline, "newPipeline"); function processDownlevelPipeline(pipeline) { const knownFactoryFunctions = [ isAnonymousCredential, isStorageSharedKeyCredential, isCoreHttpBearerTokenFactory, isStorageBrowserPolicyFactory, isStorageRetryPolicyFactory, isStorageTelemetryPolicyFactory, isCoreHttpPolicyFactory ]; if (pipeline.factories.length) { const novelFactories = pipeline.factories.filter((factory) => { return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); }); if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } } return void 0; } __name(processDownlevelPipeline, "processDownlevelPipeline"); function getCoreClientOptions(pipeline) { const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; corePipeline = (0, core_client_1.createClientPipeline)({ ...restOptions, loggingOptions: { additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, logger: log_js_1.logger.info }, userAgentOptions: { userAgentPrefix }, serializationOptions: { stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { // Use customized XML char key of "#" so we can deserialize metadata // with "_" key xmlCharKey: "#" } } }, deserializationOptions: { parseXML: core_xml_1.parseXML, serializerOptions: { xml: { // Use customized XML char key of "#" so we can deserialize metadata // with "_" key xmlCharKey: "#" } } } }); corePipeline.removePolicy({ phase: "Retry" }); corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); if ((0, core_auth_1.isTokenCredential)(credential)) { corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } return { ...restOptions, allowInsecureConnection: true, httpClient, pipeline: corePipeline }; } __name(getCoreClientOptions, "getCoreClientOptions"); function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; } } return credential; } __name(getCredentialFromPipeline, "getCredentialFromPipeline"); function isStorageSharedKeyCredential(factory) { if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } __name(isStorageSharedKeyCredential, "isStorageSharedKeyCredential"); function isAnonymousCredential(factory) { if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } __name(isAnonymousCredential, "isAnonymousCredential"); function isCoreHttpBearerTokenFactory(factory) { return (0, core_auth_1.isTokenCredential)(factory.credential); } __name(isCoreHttpBearerTokenFactory, "isCoreHttpBearerTokenFactory"); function isStorageBrowserPolicyFactory(factory) { if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } __name(isStorageBrowserPolicyFactory, "isStorageBrowserPolicyFactory"); function isStorageRetryPolicyFactory(factory) { if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; } __name(isStorageRetryPolicyFactory, "isStorageRetryPolicyFactory"); function isStorageTelemetryPolicyFactory(factory) { return factory.constructor.name === "TelemetryPolicyFactory"; } __name(isStorageTelemetryPolicyFactory, "isStorageTelemetryPolicyFactory"); function isInjectorPolicyFactory(factory) { return factory.constructor.name === "InjectorPolicyFactory"; } __name(isInjectorPolicyFactory, "isInjectorPolicyFactory"); function isCoreHttpPolicyFactory(factory) { const knownPolicies = [ "GenerateClientRequestIdPolicy", "TracingPolicy", "LogPolicy", "ProxyPolicy", "DisableResponseDecompressionPolicy", "KeepAlivePolicy", "DeserializationPolicy" ]; const mockHttpClient = { sendRequest: async (request) => { return { request, headers: request.headers.clone(), status: 500 }; } }; const mockRequestPolicyOptions = { log(_logLevel, _message) { }, shouldLog(_logLevel) { return false; } }; const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); const policyName = policyInstance.constructor.name; return knownPolicies.some((knownPolicyName) => { return policyName.startsWith(knownPolicyName); }); } __name(isCoreHttpPolicyFactory, "isCoreHttpPolicyFactory"); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js var require_models = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; var KnownEncryptionAlgorithmType; (function(KnownEncryptionAlgorithmType2) { KnownEncryptionAlgorithmType2["AES256"] = "AES256"; })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); var KnownFileShareTokenIntent; (function(KnownFileShareTokenIntent2) { KnownFileShareTokenIntent2["Backup"] = "backup"; })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); var KnownBlobExpiryOptions; (function(KnownBlobExpiryOptions2) { KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; KnownBlobExpiryOptions2["Absolute"] = "Absolute"; })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); var KnownStorageErrorCode; (function(KnownStorageErrorCode2) { KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; KnownStorageErrorCode2["InternalError"] = "InternalError"; KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js var require_mappers = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; exports2.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: true, xmlElementName: "CorsRule", type: { name: "Sequence", element: { type: { name: "Composite", className: "CorsRule" } } } }, defaultServiceVersion: { serializedName: "DefaultServiceVersion", xmlName: "DefaultServiceVersion", type: { name: "String" } }, deleteRetentionPolicy: { serializedName: "DeleteRetentionPolicy", xmlName: "DeleteRetentionPolicy", type: { name: "Composite", className: "RetentionPolicy" } }, staticWebsite: { serializedName: "StaticWebsite", xmlName: "StaticWebsite", type: { name: "Composite", className: "StaticWebsite" } } } } }; exports2.Logging = { serializedName: "Logging", type: { name: "Composite", className: "Logging", modelProperties: { version: { serializedName: "Version", required: true, xmlName: "Version", type: { name: "String" } }, deleteProperty: { serializedName: "Delete", required: true, xmlName: "Delete", type: { name: "Boolean" } }, read: { serializedName: "Read", required: true, xmlName: "Read", type: { name: "Boolean" } }, write: { serializedName: "Write", required: true, xmlName: "Write", type: { name: "Boolean" } }, retentionPolicy: { serializedName: "RetentionPolicy", xmlName: "RetentionPolicy", type: { name: "Composite", className: "RetentionPolicy" } } } } }; exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", className: "RetentionPolicy", modelProperties: { enabled: { serializedName: "Enabled", required: true, xmlName: "Enabled", type: { name: "Boolean" } }, days: { constraints: { InclusiveMinimum: 1 }, serializedName: "Days", xmlName: "Days", type: { name: "Number" } } } } }; exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", className: "Metrics", modelProperties: { version: { serializedName: "Version", xmlName: "Version", type: { name: "String" } }, enabled: { serializedName: "Enabled", required: true, xmlName: "Enabled", type: { name: "Boolean" } }, includeAPIs: { serializedName: "IncludeAPIs", xmlName: "IncludeAPIs", type: { name: "Boolean" } }, retentionPolicy: { serializedName: "RetentionPolicy", xmlName: "RetentionPolicy", type: { name: "Composite", className: "RetentionPolicy" } } } } }; exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", className: "CorsRule", modelProperties: { allowedOrigins: { serializedName: "AllowedOrigins", required: true, xmlName: "AllowedOrigins", type: { name: "String" } }, allowedMethods: { serializedName: "AllowedMethods", required: true, xmlName: "AllowedMethods", type: { name: "String" } }, allowedHeaders: { serializedName: "AllowedHeaders", required: true, xmlName: "AllowedHeaders", type: { name: "String" } }, exposedHeaders: { serializedName: "ExposedHeaders", required: true, xmlName: "ExposedHeaders", type: { name: "String" } }, maxAgeInSeconds: { constraints: { InclusiveMinimum: 0 }, serializedName: "MaxAgeInSeconds", required: true, xmlName: "MaxAgeInSeconds", type: { name: "Number" } } } } }; exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", className: "StaticWebsite", modelProperties: { enabled: { serializedName: "Enabled", required: true, xmlName: "Enabled", type: { name: "Boolean" } }, indexDocument: { serializedName: "IndexDocument", xmlName: "IndexDocument", type: { name: "String" } }, errorDocument404Path: { serializedName: "ErrorDocument404Path", xmlName: "ErrorDocument404Path", type: { name: "String" } }, defaultIndexDocumentPath: { serializedName: "DefaultIndexDocumentPath", xmlName: "DefaultIndexDocumentPath", type: { name: "String" } } } } }; exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", className: "StorageError", modelProperties: { message: { serializedName: "Message", xmlName: "Message", type: { name: "String" } }, copySourceStatusCode: { serializedName: "CopySourceStatusCode", xmlName: "CopySourceStatusCode", type: { name: "Number" } }, copySourceErrorCode: { serializedName: "CopySourceErrorCode", xmlName: "CopySourceErrorCode", type: { name: "String" } }, copySourceErrorMessage: { serializedName: "CopySourceErrorMessage", xmlName: "CopySourceErrorMessage", type: { name: "String" } }, code: { serializedName: "Code", xmlName: "Code", type: { name: "String" } }, authenticationErrorDetail: { serializedName: "AuthenticationErrorDetail", xmlName: "AuthenticationErrorDetail", type: { name: "String" } } } } }; exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { name: "Composite", className: "BlobServiceStatistics", modelProperties: { geoReplication: { serializedName: "GeoReplication", xmlName: "GeoReplication", type: { name: "Composite", className: "GeoReplication" } } } } }; exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", className: "GeoReplication", modelProperties: { status: { serializedName: "Status", required: true, xmlName: "Status", type: { name: "Enum", allowedValues: ["live", "bootstrap", "unavailable"] } }, lastSyncOn: { serializedName: "LastSyncTime", required: true, xmlName: "LastSyncTime", type: { name: "DateTimeRfc1123" } } } } }; exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { name: "Composite", className: "ListContainersSegmentResponse", modelProperties: { serviceEndpoint: { serializedName: "ServiceEndpoint", required: true, xmlName: "ServiceEndpoint", xmlIsAttribute: true, type: { name: "String" } }, prefix: { serializedName: "Prefix", xmlName: "Prefix", type: { name: "String" } }, marker: { serializedName: "Marker", xmlName: "Marker", type: { name: "String" } }, maxPageSize: { serializedName: "MaxResults", xmlName: "MaxResults", type: { name: "Number" } }, containerItems: { serializedName: "ContainerItems", required: true, xmlName: "Containers", xmlIsWrapped: true, xmlElementName: "Container", type: { name: "Sequence", element: { type: { name: "Composite", className: "ContainerItem" } } } }, continuationToken: { serializedName: "NextMarker", xmlName: "NextMarker", type: { name: "String" } } } } }; exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { name: "Composite", className: "ContainerItem", modelProperties: { name: { serializedName: "Name", required: true, xmlName: "Name", type: { name: "String" } }, deleted: { serializedName: "Deleted", xmlName: "Deleted", type: { name: "Boolean" } }, version: { serializedName: "Version", xmlName: "Version", type: { name: "String" } }, properties: { serializedName: "Properties", xmlName: "Properties", type: { name: "Composite", className: "ContainerProperties" } }, metadata: { serializedName: "Metadata", xmlName: "Metadata", type: { name: "Dictionary", value: { type: { name: "String" } } } } } } }; exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", className: "ContainerProperties", modelProperties: { lastModified: { serializedName: "Last-Modified", required: true, xmlName: "Last-Modified", type: { name: "DateTimeRfc1123" } }, etag: { serializedName: "Etag", required: true, xmlName: "Etag", type: { name: "String" } }, leaseStatus: { serializedName: "LeaseStatus", xmlName: "LeaseStatus", type: { name: "Enum", allowedValues: ["locked", "unlocked"] } }, leaseState: { serializedName: "LeaseState", xmlName: "LeaseState", type: { name: "Enum", allowedValues: [ "available", "leased", "expired", "breaking", "broken" ] } }, leaseDuration: { serializedName: "LeaseDuration", xmlName: "LeaseDuration", type: { name: "Enum", allowedValues: ["infinite", "fixed"] } }, publicAccess: { serializedName: "PublicAccess", xmlName: "PublicAccess", type: { name: "Enum", allowedValues: ["container", "blob"] } }, hasImmutabilityPolicy: { serializedName: "HasImmutabilityPolicy", xmlName: "HasImmutabilityPolicy", type: { name: "Boolean" } }, hasLegalHold: { serializedName: "HasLegalHold", xmlName: "HasLegalHold", type: { name: "Boolean" } }, defaultEncryptionScope: { serializedName: "DefaultEncryptionScope", xmlName: "DefaultEncryptionScope", type: { name: "String" } }, preventEncryptionScopeOverride: { serializedName: "DenyEncryptionScopeOverride", xmlName: "DenyEncryptionScopeOverride", type: { name: "Boolean" } }, deletedOn: { serializedName: "DeletedTime", xmlName: "DeletedTime", type: { name: "DateTimeRfc1123" } }, remainingRetentionDays: { serializedName: "RemainingRetentionDays", xmlName: "RemainingRetentionDays", type: { name: "Number" } }, isImmutableStorageWithVersioningEnabled: { serializedName: "ImmutableStorageWithVersioningEnabled", xmlName: "ImmutableStorageWithVersioningEnabled", type: { name: "Boolean" } } } } }; exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", className: "KeyInfo", modelProperties: { startsOn: { serializedName: "Start", required: true, xmlName: "Start", type: { name: "String" } }, expiresOn: { serializedName: "Expiry", required: true, xmlName: "Expiry", type: { name: "String" } } } } }; exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", className: "UserDelegationKey", modelProperties: { signedObjectId: { serializedName: "SignedOid", required: true, xmlName: "SignedOid", type: { name: "String" } }, signedTenantId: { serializedName: "SignedTid", required: true, xmlName: "SignedTid", type: { name: "String" } }, signedStartsOn: { serializedName: "SignedStart", required: true, xmlName: "SignedStart", type: { name: "String" } }, signedExpiresOn: { serializedName: "SignedExpiry", required: true, xmlName: "SignedExpiry", type: { name: "String" } }, signedService: { serializedName: "SignedService", required: true, xmlName: "SignedService", type: { name: "String" } }, signedVersion: { serializedName: "SignedVersion", required: true, xmlName: "SignedVersion", type: { name: "String" } }, value: { serializedName: "Value", required: true, xmlName: "Value", type: { name: "String" } } } } }; exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { name: "Composite", className: "FilterBlobSegment", modelProperties: { serviceEndpoint: { serializedName: "ServiceEndpoint", required: true, xmlName: "ServiceEndpoint", xmlIsAttribute: true, type: { name: "String" } }, where: { serializedName: "Where", required: true, xmlName: "Where", type: { name: "String" } }, blobs: { serializedName: "Blobs", required: true, xmlName: "Blobs", xmlIsWrapped: true, xmlElementName: "Blob", type: { name: "Sequence", element: { type: { name: "Composite", className: "FilterBlobItem" } } } }, continuationToken: { serializedName: "NextMarker", xmlName: "NextMarker", type: { name: "String" } } } } }; exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { name: "Composite", className: "FilterBlobItem", modelProperties: { name: { serializedName: "Name", required: true, xmlName: "Name", type: { name: "String" } }, containerName: { serializedName: "ContainerName", required: true, xmlName: "ContainerName", type: { name: "String" } }, tags: { serializedName: "Tags", xmlName: "Tags", type: { name: "Composite", className: "BlobTags" } } } } }; exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { name: "Composite", className: "BlobTags", modelProperties: { blobTagSet: { serializedName: "BlobTagSet", required: true, xmlName: "TagSet", xmlIsWrapped: true, xmlElementName: "Tag", type: { name: "Sequence", element: { type: { name: "Composite", className: "BlobTag" } } } } } } }; exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { name: "Composite", className: "BlobTag", modelProperties: { key: { serializedName: "Key", required: true, xmlName: "Key", type: { name: "String" } }, value: { serializedName: "Value", required: true, xmlName: "Value", type: { name: "String" } } } } }; exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { name: "Composite", className: "SignedIdentifier", modelProperties: { id: { serializedName: "Id", required: true, xmlName: "Id", type: { name: "String" } }, accessPolicy: { serializedName: "AccessPolicy", xmlName: "AccessPolicy", type: { name: "Composite", className: "AccessPolicy" } } } } }; exports2.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" } } } } }; exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { name: "Composite", className: "ListBlobsFlatSegmentResponse", modelProperties: { serviceEndpoint: { serializedName: "ServiceEndpoint", required: true, xmlName: "ServiceEndpoint", xmlIsAttribute: true, type: { name: "String" } }, containerName: { serializedName: "ContainerName", required: true, xmlName: "ContainerName", xmlIsAttribute: true, type: { name: "String" } }, prefix: { serializedName: "Prefix", xmlName: "Prefix", type: { name: "String" } }, marker: { serializedName: "Marker", xmlName: "Marker", type: { name: "String" } }, maxPageSize: { serializedName: "MaxResults", xmlName: "MaxResults", type: { name: "Number" } }, segment: { serializedName: "Segment", xmlName: "Blobs", type: { name: "Composite", className: "BlobFlatListSegment" } }, continuationToken: { serializedName: "NextMarker", xmlName: "NextMarker", type: { name: "String" } } } } }; exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { name: "Composite", className: "BlobFlatListSegment", modelProperties: { blobItems: { serializedName: "BlobItems", required: true, xmlName: "BlobItems", xmlElementName: "Blob", type: { name: "Sequence", element: { type: { name: "Composite", className: "BlobItemInternal" } } } } } } }; exports2.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: true, xmlName: "Deleted", type: { name: "Boolean" } }, snapshot: { serializedName: "Snapshot", required: true, xmlName: "Snapshot", type: { name: "String" } }, versionId: { serializedName: "VersionId", xmlName: "VersionId", type: { name: "String" } }, isCurrentVersion: { serializedName: "IsCurrentVersion", xmlName: "IsCurrentVersion", type: { name: "Boolean" } }, properties: { serializedName: "Properties", xmlName: "Properties", type: { name: "Composite", className: "BlobPropertiesInternal" } }, metadata: { serializedName: "Metadata", xmlName: "Metadata", type: { name: "Dictionary", value: { type: { name: "String" } } } }, blobTags: { serializedName: "BlobTags", xmlName: "Tags", type: { name: "Composite", className: "BlobTags" } }, objectReplicationMetadata: { serializedName: "ObjectReplicationMetadata", xmlName: "OrMetadata", type: { name: "Dictionary", value: { type: { name: "String" } } } }, hasVersionsOnly: { serializedName: "HasVersionsOnly", xmlName: "HasVersionsOnly", type: { name: "Boolean" } } } } }; exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", className: "BlobName", modelProperties: { encoded: { serializedName: "Encoded", xmlName: "Encoded", xmlIsAttribute: true, type: { name: "Boolean" } }, content: { serializedName: "content", xmlName: "content", xmlIsMsText: true, type: { name: "String" } } } } }; exports2.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: true, xmlName: "Last-Modified", type: { name: "DateTimeRfc1123" } }, etag: { serializedName: "Etag", required: true, xmlName: "Etag", type: { name: "String" } }, contentLength: { serializedName: "Content-Length", xmlName: "Content-Length", type: { name: "Number" } }, contentType: { serializedName: "Content-Type", xmlName: "Content-Type", type: { name: "String" } }, contentEncoding: { serializedName: "Content-Encoding", xmlName: "Content-Encoding", type: { name: "String" } }, contentLanguage: { serializedName: "Content-Language", xmlName: "Content-Language", type: { name: "String" } }, contentMD5: { serializedName: "Content-MD5", xmlName: "Content-MD5", type: { name: "ByteArray" } }, contentDisposition: { serializedName: "Content-Disposition", xmlName: "Content-Disposition", type: { name: "String" } }, cacheControl: { serializedName: "Cache-Control", xmlName: "Cache-Control", type: { name: "String" } }, blobSequenceNumber: { serializedName: "x-ms-blob-sequence-number", xmlName: "x-ms-blob-sequence-number", type: { name: "Number" } }, blobType: { serializedName: "BlobType", xmlName: "BlobType", type: { name: "Enum", allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"] } }, leaseStatus: { serializedName: "LeaseStatus", xmlName: "LeaseStatus", type: { name: "Enum", allowedValues: ["locked", "unlocked"] } }, leaseState: { serializedName: "LeaseState", xmlName: "LeaseState", type: { name: "Enum", allowedValues: [ "available", "leased", "expired", "breaking", "broken" ] } }, leaseDuration: { serializedName: "LeaseDuration", xmlName: "LeaseDuration", type: { name: "Enum", allowedValues: ["infinite", "fixed"] } }, copyId: { serializedName: "CopyId", xmlName: "CopyId", type: { name: "String" } }, copyStatus: { serializedName: "CopyStatus", xmlName: "CopyStatus", type: { name: "Enum", allowedValues: ["pending", "success", "aborted", "failed"] } }, copySource: { serializedName: "CopySource", xmlName: "CopySource", type: { name: "String" } }, copyProgress: { serializedName: "CopyProgress", xmlName: "CopyProgress", type: { name: "String" } }, copyCompletedOn: { serializedName: "CopyCompletionTime", xmlName: "CopyCompletionTime", type: { name: "DateTimeRfc1123" } }, copyStatusDescription: { serializedName: "CopyStatusDescription", xmlName: "CopyStatusDescription", type: { name: "String" } }, serverEncrypted: { serializedName: "ServerEncrypted", xmlName: "ServerEncrypted", type: { name: "Boolean" } }, incrementalCopy: { serializedName: "IncrementalCopy", xmlName: "IncrementalCopy", type: { name: "Boolean" } }, destinationSnapshot: { serializedName: "DestinationSnapshot", xmlName: "DestinationSnapshot", type: { name: "String" } }, deletedOn: { serializedName: "DeletedTime", xmlName: "DeletedTime", type: { name: "DateTimeRfc1123" } }, remainingRetentionDays: { serializedName: "RemainingRetentionDays", xmlName: "RemainingRetentionDays", type: { name: "Number" } }, accessTier: { serializedName: "AccessTier", xmlName: "AccessTier", type: { name: "Enum", allowedValues: [ "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Cold" ] } }, accessTierInferred: { serializedName: "AccessTierInferred", xmlName: "AccessTierInferred", type: { name: "Boolean" } }, archiveStatus: { serializedName: "ArchiveStatus", xmlName: "ArchiveStatus", type: { name: "Enum", allowedValues: [ "rehydrate-pending-to-hot", "rehydrate-pending-to-cool", "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" } } } } }; exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { name: "Composite", className: "ListBlobsHierarchySegmentResponse", modelProperties: { serviceEndpoint: { serializedName: "ServiceEndpoint", required: true, xmlName: "ServiceEndpoint", xmlIsAttribute: true, type: { name: "String" } }, containerName: { serializedName: "ContainerName", required: true, xmlName: "ContainerName", xmlIsAttribute: true, type: { name: "String" } }, prefix: { serializedName: "Prefix", xmlName: "Prefix", type: { name: "String" } }, marker: { serializedName: "Marker", xmlName: "Marker", type: { name: "String" } }, maxPageSize: { serializedName: "MaxResults", xmlName: "MaxResults", type: { name: "Number" } }, delimiter: { serializedName: "Delimiter", xmlName: "Delimiter", type: { name: "String" } }, segment: { serializedName: "Segment", xmlName: "Blobs", type: { name: "Composite", className: "BlobHierarchyListSegment" } }, continuationToken: { serializedName: "NextMarker", xmlName: "NextMarker", type: { name: "String" } } } } }; exports2.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: true, xmlName: "BlobItems", xmlElementName: "Blob", type: { name: "Sequence", element: { type: { name: "Composite", className: "BlobItemInternal" } } } } } } }; exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", className: "BlobPrefix", modelProperties: { name: { serializedName: "Name", xmlName: "Name", type: { name: "Composite", className: "BlobName" } } } } }; exports2.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" } } } } } } }; exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", className: "BlockList", modelProperties: { committedBlocks: { serializedName: "CommittedBlocks", xmlName: "CommittedBlocks", xmlIsWrapped: true, xmlElementName: "Block", type: { name: "Sequence", element: { type: { name: "Composite", className: "Block" } } } }, uncommittedBlocks: { serializedName: "UncommittedBlocks", xmlName: "UncommittedBlocks", xmlIsWrapped: true, xmlElementName: "Block", type: { name: "Sequence", element: { type: { name: "Composite", className: "Block" } } } } } } }; exports2.Block = { serializedName: "Block", type: { name: "Composite", className: "Block", modelProperties: { name: { serializedName: "Name", required: true, xmlName: "Name", type: { name: "String" } }, size: { serializedName: "Size", required: true, xmlName: "Size", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { name: "Composite", className: "PageRange", modelProperties: { start: { serializedName: "Start", required: true, xmlName: "Start", type: { name: "Number" } }, end: { serializedName: "End", required: true, xmlName: "End", type: { name: "Number" } } } } }; exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { name: "Composite", className: "ClearRange", modelProperties: { start: { serializedName: "Start", required: true, xmlName: "Start", type: { name: "Number" } }, end: { serializedName: "End", required: true, xmlName: "End", type: { name: "Number" } } } } }; exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { name: "Composite", className: "QueryRequest", modelProperties: { queryType: { serializedName: "QueryType", required: true, xmlName: "QueryType", type: { name: "String" } }, expression: { serializedName: "Expression", required: true, xmlName: "Expression", type: { name: "String" } }, inputSerialization: { serializedName: "InputSerialization", xmlName: "InputSerialization", type: { name: "Composite", className: "QuerySerialization" } }, outputSerialization: { serializedName: "OutputSerialization", xmlName: "OutputSerialization", type: { name: "Composite", className: "QuerySerialization" } } } } }; exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", className: "QuerySerialization", modelProperties: { format: { serializedName: "Format", xmlName: "Format", type: { name: "Composite", className: "QueryFormat" } } } } }; exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", className: "QueryFormat", modelProperties: { type: { serializedName: "Type", required: true, xmlName: "Type", type: { name: "Enum", allowedValues: ["delimited", "json", "arrow", "parquet"] } }, delimitedTextConfiguration: { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { name: "Composite", className: "DelimitedTextConfiguration" } }, jsonTextConfiguration: { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { name: "Composite", className: "JsonTextConfiguration" } }, arrowConfiguration: { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { name: "Composite", className: "ArrowConfiguration" } }, parquetTextConfiguration: { serializedName: "ParquetTextConfiguration", xmlName: "ParquetTextConfiguration", type: { name: "Dictionary", value: { type: { name: "any" } } } } } } }; exports2.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" } } } } }; exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { name: "Composite", className: "JsonTextConfiguration", modelProperties: { recordSeparator: { serializedName: "RecordSeparator", xmlName: "RecordSeparator", type: { name: "String" } } } } }; exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { name: "Composite", className: "ArrowConfiguration", modelProperties: { schema: { serializedName: "Schema", required: true, xmlName: "Schema", xmlIsWrapped: true, xmlElementName: "Field", type: { name: "Sequence", element: { type: { name: "Composite", className: "ArrowField" } } } } } } }; exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { name: "Composite", className: "ArrowField", modelProperties: { type: { serializedName: "Type", required: true, xmlName: "Type", type: { name: "String" } }, name: { serializedName: "Name", xmlName: "Name", type: { name: "String" } }, precision: { serializedName: "Precision", xmlName: "Precision", type: { name: "Number" } }, scale: { serializedName: "Scale", xmlName: "Scale", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", className: "ServiceSetPropertiesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", className: "ServiceGetPropertiesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", className: "ServiceGetStatisticsExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", className: "ServiceListContainersSegmentExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", className: "ServiceGetUserDelegationKeyExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", className: "ServiceGetAccountInfoExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", className: "ServiceSubmitBatchExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", className: "ServiceFilterBlobsExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", className: "ContainerCreateExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", className: "ContainerGetPropertiesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", className: "ContainerDeleteExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", className: "ContainerSetMetadataExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", className: "ContainerGetAccessPolicyExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", className: "ContainerSetAccessPolicyExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", className: "ContainerRestoreExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", className: "ContainerRenameExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", className: "ContainerSubmitBatchExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", className: "ContainerFilterBlobsExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", className: "ContainerAcquireLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", className: "ContainerReleaseLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", className: "ContainerRenewLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", className: "ContainerBreakLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", className: "ContainerChangeLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", className: "ContainerListBlobFlatSegmentExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", className: "ContainerListBlobHierarchySegmentExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", className: "ContainerGetAccountInfoExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", className: "BlobDownloadExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", className: "BlobGetPropertiesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", className: "BlobDeleteExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", className: "BlobUndeleteExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", className: "BlobSetExpiryExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", className: "BlobSetHttpHeadersExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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"] } } } } }; exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", className: "BlobSetImmutabilityPolicyExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", className: "BlobDeleteImmutabilityPolicyExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", className: "BlobSetLegalHoldExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", className: "BlobSetMetadataExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", className: "BlobAcquireLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", className: "BlobReleaseLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", className: "BlobRenewLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", className: "BlobChangeLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", className: "BlobBreakLeaseExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", className: "BlobCreateSnapshotExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", className: "BlobStartCopyFromURLExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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: true, serializedName: "x-ms-copy-status", type: { name: "String" } }, contentMD5: { serializedName: "content-md5", xmlName: "content-md5", type: { name: "ByteArray" } }, xMsContentCrc64: { serializedName: "x-ms-content-crc64", xmlName: "x-ms-content-crc64", type: { name: "ByteArray" } }, encryptionScope: { serializedName: "x-ms-encryption-scope", xmlName: "x-ms-encryption-scope", type: { name: "String" } }, errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", className: "BlobCopyFromURLExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", className: "BlobAbortCopyFromURLExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", className: "BlobSetTierExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", className: "BlobGetAccountInfoExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", className: "BlobQueryExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", className: "BlobGetTagsExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", className: "BlobSetTagsExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", className: "PageBlobCreateExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", className: "PageBlobUploadPagesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", className: "PageBlobClearPagesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", className: "PageBlobUploadPagesFromURLExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", className: "PageBlobGetPageRangesExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", className: "PageBlobGetPageRangesDiffExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", className: "PageBlobResizeExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", className: "PageBlobUpdateSequenceNumberExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", className: "PageBlobCopyIncrementalExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", className: "AppendBlobCreateExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", className: "AppendBlobAppendBlockExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", className: "AppendBlobAppendBlockFromUrlExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", className: "AppendBlobSealExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", className: "BlockBlobUploadExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", className: "BlockBlobPutBlobFromUrlExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", className: "BlockBlobStageBlockExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", className: "BlockBlobStageBlockFromURLExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } }, copySourceErrorCode: { serializedName: "x-ms-copy-source-error-code", xmlName: "x-ms-copy-source-error-code", type: { name: "String" } }, copySourceStatusCode: { serializedName: "x-ms-copy-source-status-code", xmlName: "x-ms-copy-source-status-code", type: { name: "Number" } } } } }; exports2.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" } } } } }; exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", className: "BlockBlobCommitBlockListExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; exports2.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" } } } } }; exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", className: "BlockBlobGetBlockListExceptionHeaders", modelProperties: { errorCode: { serializedName: "x-ms-error-code", xmlName: "x-ms-error-code", type: { name: "String" } } } } }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js var require_parameters = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; var mappers_js_1 = require_mappers(); exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", isConstant: true, serializedName: "Content-Type", type: { name: "String" } } }; exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", mapper: mappers_js_1.BlobServiceProperties }; exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", isConstant: true, serializedName: "Accept", type: { name: "String" } } }; exports2.url = { parameterPath: "url", mapper: { serializedName: "url", required: true, xmlName: "url", type: { name: "String" } }, skipEncoding: true }; exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", isConstant: true, serializedName: "restype", type: { name: "String" } } }; exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { InclusiveMinimum: 0 }, serializedName: "timeout", xmlName: "timeout", type: { name: "Number" } } }; exports2.version = { parameterPath: "version", mapper: { defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { name: "String" } } }; exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", xmlName: "x-ms-client-request-id", type: { name: "String" } } }; exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", isConstant: true, serializedName: "Accept", type: { name: "String" } } }; exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", xmlName: "prefix", type: { name: "String" } } }; exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", xmlName: "marker", type: { name: "String" } } }; exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { InclusiveMinimum: 1 }, serializedName: "maxresults", xmlName: "maxresults", type: { name: "Number" } } }; exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", xmlName: "include", xmlElementName: "ListContainersIncludeType", type: { name: "Sequence", element: { type: { name: "Enum", allowedValues: ["metadata", "deleted", "system"] } } } }, collectionFormat: "CSV" }; exports2.keyInfo = { parameterPath: "keyInfo", mapper: mappers_js_1.KeyInfo }; exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", isConstant: true, serializedName: "restype", type: { name: "String" } } }; exports2.body = { parameterPath: "body", mapper: { serializedName: "body", required: true, xmlName: "body", type: { name: "Stream" } } }; exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", required: true, xmlName: "Content-Length", type: { name: "Number" } } }; exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", required: true, xmlName: "Content-Type", type: { name: "String" } } }; exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", xmlName: "where", type: { name: "String" } } }; exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", isConstant: true, serializedName: "restype", type: { name: "String" } } }; exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", xmlName: "x-ms-meta", headerCollectionPrefix: "x-ms-meta-", type: { name: "Dictionary", value: { type: { name: "String" } } } } }; exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", xmlName: "x-ms-blob-public-access", type: { name: "Enum", allowedValues: ["container", "blob"] } } }; exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", "defaultEncryptionScope" ], mapper: { serializedName: "x-ms-default-encryption-scope", xmlName: "x-ms-default-encryption-scope", type: { name: "String" } } }; exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", "preventEncryptionScopeOverride" ], mapper: { serializedName: "x-ms-deny-encryption-scope-override", xmlName: "x-ms-deny-encryption-scope-override", type: { name: "Boolean" } } }; exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", xmlName: "x-ms-lease-id", type: { name: "String" } } }; exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", xmlName: "If-Modified-Since", type: { name: "DateTimeRfc1123" } } }; exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", xmlName: "If-Unmodified-Since", type: { name: "DateTimeRfc1123" } } }; exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", xmlName: "SignedIdentifiers", xmlIsWrapped: true, xmlElementName: "SignedIdentifier", type: { name: "Sequence", element: { type: { name: "Composite", className: "SignedIdentifier" } } } } }; exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", xmlName: "x-ms-deleted-container-name", type: { name: "String" } } }; exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", xmlName: "x-ms-deleted-container-version", type: { name: "String" } } }; exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", required: true, xmlName: "x-ms-source-container-name", type: { name: "String" } } }; exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", xmlName: "x-ms-source-lease-id", type: { name: "String" } } }; exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", isConstant: true, serializedName: "x-ms-lease-action", type: { name: "String" } } }; exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", xmlName: "x-ms-lease-duration", type: { name: "Number" } } }; exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", xmlName: "x-ms-proposed-lease-id", type: { name: "String" } } }; exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", isConstant: true, serializedName: "x-ms-lease-action", type: { name: "String" } } }; exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", required: true, xmlName: "x-ms-lease-id", type: { name: "String" } } }; exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", isConstant: true, serializedName: "x-ms-lease-action", type: { name: "String" } } }; exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", isConstant: true, serializedName: "x-ms-lease-action", type: { name: "String" } } }; exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", xmlName: "x-ms-lease-break-period", type: { name: "Number" } } }; exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", isConstant: true, serializedName: "x-ms-lease-action", type: { name: "String" } } }; exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", required: true, xmlName: "x-ms-proposed-lease-id", type: { name: "String" } } }; exports2.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" }; exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", required: true, xmlName: "delimiter", type: { name: "String" } } }; exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", xmlName: "snapshot", type: { name: "String" } } }; exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", xmlName: "versionid", type: { name: "String" } } }; exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", xmlName: "x-ms-range", type: { name: "String" } } }; exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", xmlName: "x-ms-range-get-content-md5", type: { name: "Boolean" } } }; exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", xmlName: "x-ms-range-get-content-crc64", type: { name: "Boolean" } } }; exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", xmlName: "x-ms-encryption-key", type: { name: "String" } } }; exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", xmlName: "x-ms-encryption-key-sha256", type: { name: "String" } } }; exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", xmlName: "x-ms-encryption-algorithm", type: { name: "String" } } }; exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", xmlName: "If-Match", type: { name: "String" } } }; exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", xmlName: "If-None-Match", type: { name: "String" } } }; exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", xmlName: "x-ms-if-tags", type: { name: "String" } } }; exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", xmlName: "x-ms-delete-snapshots", type: { name: "Enum", allowedValues: ["include", "only"] } } }; exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", xmlName: "deletetype", type: { name: "String" } } }; exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", required: true, xmlName: "x-ms-expiry-option", type: { name: "String" } } }; exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", xmlName: "x-ms-expiry-time", type: { name: "String" } } }; exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", xmlName: "x-ms-blob-cache-control", type: { name: "String" } } }; exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", xmlName: "x-ms-blob-content-type", type: { name: "String" } } }; exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", xmlName: "x-ms-blob-content-md5", type: { name: "ByteArray" } } }; exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", xmlName: "x-ms-blob-content-encoding", type: { name: "String" } } }; exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", xmlName: "x-ms-blob-content-language", type: { name: "String" } } }; exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", xmlName: "x-ms-blob-content-disposition", type: { name: "String" } } }; exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", xmlName: "x-ms-immutability-policy-until-date", type: { name: "DateTimeRfc1123" } } }; exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", xmlName: "x-ms-immutability-policy-mode", type: { name: "Enum", allowedValues: ["Mutable", "Unlocked", "Locked"] } } }; exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", required: true, xmlName: "x-ms-legal-hold", type: { name: "Boolean" } } }; exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", xmlName: "x-ms-encryption-scope", type: { name: "String" } } }; exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.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" ] } } }; exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", xmlName: "x-ms-rehydrate-priority", type: { name: "Enum", allowedValues: ["High", "Standard"] } } }; exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", "sourceIfModifiedSince" ], mapper: { serializedName: "x-ms-source-if-modified-since", xmlName: "x-ms-source-if-modified-since", type: { name: "DateTimeRfc1123" } } }; exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", "sourceIfUnmodifiedSince" ], mapper: { serializedName: "x-ms-source-if-unmodified-since", xmlName: "x-ms-source-if-unmodified-since", type: { name: "DateTimeRfc1123" } } }; exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", xmlName: "x-ms-source-if-match", type: { name: "String" } } }; exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", "sourceIfNoneMatch" ], mapper: { serializedName: "x-ms-source-if-none-match", xmlName: "x-ms-source-if-none-match", type: { name: "String" } } }; exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", xmlName: "x-ms-source-if-tags", type: { name: "String" } } }; exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", required: true, xmlName: "x-ms-copy-source", type: { name: "String" } } }; exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", xmlName: "x-ms-tags", type: { name: "String" } } }; exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", xmlName: "x-ms-seal-blob", type: { name: "Boolean" } } }; exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", xmlName: "x-ms-legal-hold", type: { name: "Boolean" } } }; exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", isConstant: true, serializedName: "x-ms-requires-sync", type: { name: "String" } } }; exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", xmlName: "x-ms-source-content-md5", type: { name: "ByteArray" } } }; exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", xmlName: "x-ms-copy-source-authorization", type: { name: "String" } } }; exports2.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"] } } }; exports2.fileRequestIntent = { parameterPath: ["options", "fileRequestIntent"], mapper: { serializedName: "x-ms-file-request-intent", xmlName: "x-ms-file-request-intent", type: { name: "String" } } }; exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", isConstant: true, serializedName: "x-ms-copy-action", type: { name: "String" } } }; exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", required: true, xmlName: "copyid", type: { name: "String" } } }; exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", required: true, xmlName: "x-ms-access-tier", type: { name: "Enum", allowedValues: [ "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Cold" ] } } }; exports2.queryRequest = { parameterPath: ["options", "queryRequest"], mapper: mappers_js_1.QueryRequest }; exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.tags = { parameterPath: ["options", "tags"], mapper: mappers_js_1.BlobTags }; exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", xmlName: "Content-MD5", type: { name: "ByteArray" } } }; exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", xmlName: "x-ms-content-crc64", type: { name: "ByteArray" } } }; exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", isConstant: true, serializedName: "x-ms-blob-type", type: { name: "String" } } }; exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", required: true, xmlName: "x-ms-blob-content-length", type: { name: "Number" } } }; exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, serializedName: "x-ms-blob-sequence-number", xmlName: "x-ms-blob-sequence-number", type: { name: "Number" } } }; exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", isConstant: true, serializedName: "Content-Type", type: { name: "String" } } }; exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", required: true, xmlName: "body", type: { name: "Stream" } } }; exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", isConstant: true, serializedName: "Accept", type: { name: "String" } } }; exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", isConstant: true, serializedName: "x-ms-page-write", type: { name: "String" } } }; exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", "ifSequenceNumberLessThanOrEqualTo" ], mapper: { serializedName: "x-ms-if-sequence-number-le", xmlName: "x-ms-if-sequence-number-le", type: { name: "Number" } } }; exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", "ifSequenceNumberLessThan" ], mapper: { serializedName: "x-ms-if-sequence-number-lt", xmlName: "x-ms-if-sequence-number-lt", type: { name: "Number" } } }; exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", "ifSequenceNumberEqualTo" ], mapper: { serializedName: "x-ms-if-sequence-number-eq", xmlName: "x-ms-if-sequence-number-eq", type: { name: "Number" } } }; exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", isConstant: true, serializedName: "x-ms-page-write", type: { name: "String" } } }; exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", required: true, xmlName: "x-ms-copy-source", type: { name: "String" } } }; exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", required: true, xmlName: "x-ms-source-range", type: { name: "String" } } }; exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", xmlName: "x-ms-source-content-crc64", type: { name: "ByteArray" } } }; exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", required: true, xmlName: "x-ms-range", type: { name: "String" } } }; exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", xmlName: "prevsnapshot", type: { name: "String" } } }; exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", xmlName: "x-ms-previous-snapshot-url", type: { name: "String" } } }; exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", required: true, xmlName: "x-ms-sequence-number-action", type: { name: "Enum", allowedValues: ["max", "update", "increment"] } } }; exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", isConstant: true, serializedName: "x-ms-blob-type", type: { name: "String" } } }; exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", xmlName: "x-ms-blob-condition-maxsize", type: { name: "Number" } } }; exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", "appendPosition" ], mapper: { serializedName: "x-ms-blob-condition-appendpos", xmlName: "x-ms-blob-condition-appendpos", type: { name: "Number" } } }; exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", xmlName: "x-ms-source-range", type: { name: "String" } } }; exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", isConstant: true, serializedName: "x-ms-blob-type", type: { name: "String" } } }; exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", xmlName: "x-ms-copy-source-blob-properties", type: { name: "Boolean" } } }; exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", required: true, xmlName: "blockid", type: { name: "String" } } }; exports2.blocks = { parameterPath: "blocks", mapper: mappers_js_1.BlockLookupList }; exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", isConstant: true, serializedName: "comp", type: { name: "String" } } }; exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", serializedName: "blocklisttype", required: true, xmlName: "blocklisttype", type: { name: "Enum", allowedValues: ["committed", "uncommitted", "all"] } } }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js var require_service = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { static { __name(this, "ServiceImpl"); } client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage * Analytics and CORS (Cross-Origin Resource Sharing) rules * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ setProperties(blobServiceProperties, options) { return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics * and CORS (Cross-Origin Resource Sharing) rules. * @param options The options parameters. */ getProperties(options) { return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the * secondary location endpoint when read-access geo-redundant replication is enabled for the storage * account. * @param options The options parameters. */ getStatistics(options) { return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); } /** * The List Containers Segment operation returns a list of the containers under the specified account * @param options The options parameters. */ listContainersSegment(options) { return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * @param keyInfo Key information * @param options The options parameters. */ getUserDelegationKey(keyInfo, options) { return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch * boundary. Example header value: multipart/mixed; boundary=batch_ * @param body Initial data * @param options The options parameters. */ submitBatch(contentLength, multipartContentType, body, options) { return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a * given search expression. Filter blobs searches across all containers within a storage account but * can be scoped within the expression to a single container. * @param options The options parameters. */ filterBlobs(options) { return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; exports2.ServiceImpl = ServiceImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var setPropertiesOperationSpec = { path: "/", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, requestBody: Parameters.blobServiceProperties, queryParameters: [ Parameters.restype, Parameters.comp, Parameters.timeoutInSeconds ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BlobServiceProperties, headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ Parameters.restype, Parameters.comp, Parameters.timeoutInSeconds ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BlobServiceStatistics, headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ Parameters.restype, Parameters.timeoutInSeconds, Parameters.comp1 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ListContainersSegmentResponse, headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp2, Parameters.prefix, Parameters.marker, Parameters.maxPageSize, Parameters.include ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.UserDelegationKey, headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, requestBody: Parameters.keyInfo, queryParameters: [ Parameters.restype, Parameters.timeoutInSeconds, Parameters.comp3 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ Parameters.comp, Parameters.timeoutInSeconds, Parameters.restype1 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { 202: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, requestBody: Parameters.body, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], urlParameters: [Parameters.url], headerParameters: [ Parameters.accept, Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.FilterBlobSegment, headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.marker, Parameters.maxPageSize, Parameters.comp5, Parameters.where ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js var require_container = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ContainerImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { static { __name(this, "ContainerImpl"); } client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * creates a new container under the specified account. If the container with the same name already * exists, the operation fails * @param options The options parameters. */ create(options) { return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data * returned does not include the container's list of blobs * @param options The options parameters. */ getProperties(options) { return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within * it are later deleted during garbage collection * @param options The options parameters. */ delete(options) { return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data * may be accessed publicly. * @param options The options parameters. */ getAccessPolicy(options) { return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a * container may be accessed publicly. * @param options The options parameters. */ setAccessPolicy(options) { return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); } /** * Restores a previously-deleted container. * @param options The options parameters. */ restore(options) { return this.client.sendOperationRequest({ options }, restoreOperationSpec); } /** * Renames an existing container. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ rename(sourceContainerName, options) { return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch * boundary. Example header value: multipart/mixed; boundary=batch_ * @param body Initial data * @param options The options parameters. */ submitBatch(contentLength, multipartContentType, body, options) { return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given * search expression. Filter blobs searches within the given container. * @param options The options parameters. */ filterBlobs(options) { return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can * be 15 to 60 seconds, or can be infinite * @param options The options parameters. */ acquireLease(options) { return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can * be 15 to 60 seconds, or can be infinite * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ releaseLease(leaseId, options) { return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can * be 15 to 60 seconds, or can be infinite * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ renewLease(leaseId, options) { return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can * be 15 to 60 seconds, or can be infinite * @param options The options parameters. */ breakLease(options) { return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can * be 15 to 60 seconds, or can be infinite * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor * (String) for a list of valid GUID string formats. * @param options The options parameters. */ changeLease(leaseId, proposedLeaseId, options) { return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container * @param options The options parameters. */ listBlobFlatSegment(options) { return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix * element in the response body that acts as a placeholder for all blobs whose names begin with the * same substring up to the appearance of the delimiter character. The delimiter may be a single * character or a string. * @param options The options parameters. */ listBlobHierarchySegment(delimiter, options) { return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; exports2.ContainerImpl = ContainerImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.ContainerCreateHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerCreateExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.access, Parameters.defaultEncryptionScope, Parameters.preventEncryptionScopeOverride ], isXML: true, serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId ], isXML: true, serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { headersMapper: Mappers.ContainerDeleteHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince ], isXML: true, serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp6 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince ], isXML: true, serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "SignedIdentifier" } } }, serializedName: "SignedIdentifiers", xmlName: "SignedIdentifiers", xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp7 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId ], isXML: true, serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, requestBody: Parameters.containerAcl, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp7 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId, Parameters.access, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.ContainerRestoreHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp8 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.deletedContainerName, Parameters.deletedContainerVersion ], isXML: true, serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerRenameHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp9 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.sourceContainerName, Parameters.sourceLeaseId ], isXML: true, serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", httpMethod: "POST", responses: { 202: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, requestBody: Parameters.body, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp4, Parameters.restype2 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.accept, Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.FilterBlobSegment, headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.marker, Parameters.maxPageSize, Parameters.comp5, Parameters.where, Parameters.restype2 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp10 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action, Parameters.duration, Parameters.proposedLeaseId ], isXML: true, serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp10 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action1, Parameters.leaseId1 ], isXML: true, serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp10 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.leaseId1, Parameters.action2 ], isXML: true, serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp10 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action3, Parameters.breakPeriod ], isXML: true, serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.restype2, Parameters.comp10 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.leaseId1, Parameters.action4, Parameters.proposedLeaseId1 ], isXML: true, serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ListBlobsFlatSegmentResponse, headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp2, Parameters.prefix, Parameters.marker, Parameters.maxPageSize, Parameters.restype2, Parameters.include1 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp2, Parameters.prefix, Parameters.marker, Parameters.maxPageSize, Parameters.restype2, Parameters.include1, Parameters.delimiter ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ Parameters.comp, Parameters.timeoutInSeconds, Parameters.restype1 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js var require_blob = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { static { __name(this, "BlobImpl"); } client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * The Download operation reads or downloads a blob from the system, including its metadata and * properties. You can also call Download to read a snapshot. * @param options The options parameters. */ download(options) { return this.client.sendOperationRequest({ options }, downloadOperationSpec); } /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system * properties for the blob. It does not return the content of the blob. * @param options The options parameters. */ getProperties(options) { return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is * permanently removed from the storage account. If the storage account's soft delete feature is * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible * immediately. However, the blob service retains the blob or snapshot for the number of days specified * by the DeleteRetentionPolicy section of [Storage service properties] * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is * permanently removed from the storage account. Note that you continue to be charged for the * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 * (ResourceNotFound). * @param options The options parameters. */ delete(options) { return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * Undelete a blob that was previously soft deleted * @param options The options parameters. */ undelete(options) { return this.client.sendOperationRequest({ options }, undeleteOperationSpec); } /** * Sets the time a blob will expire and be deleted. * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ setExpiry(expiryOptions, options) { return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob * @param options The options parameters. */ setHttpHeaders(options) { return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); } /** * The Set Immutability Policy operation sets the immutability policy on the blob * @param options The options parameters. */ setImmutabilityPolicy(options) { return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob * @param options The options parameters. */ deleteImmutabilityPolicy(options) { return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); } /** * The Set Legal Hold operation sets a legal hold on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ setLegalHold(legalHold, options) { return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more * name-value pairs * @param options The options parameters. */ setMetadata(options) { return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * operations * @param options The options parameters. */ acquireLease(options) { return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * operations * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ releaseLease(leaseId, options) { return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * operations * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ renewLease(leaseId, options) { return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * operations * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor * (String) for a list of valid GUID string formats. * @param options The options parameters. */ changeLease(leaseId, proposedLeaseId, options) { return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * operations * @param options The options parameters. */ breakLease(options) { return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * The Create Snapshot operation creates a read-only snapshot of a blob * @param options The options parameters. */ createSnapshot(options) { return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would * appear in a request URI. The source blob must either be public or must be authenticated via a shared * access signature. * @param options The options parameters. */ startCopyFromURL(copySource, options) { return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return * a response until the copy is complete. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would * appear in a request URI. The source blob must either be public or must be authenticated via a shared * access signature. * @param options The options parameters. */ copyFromURL(copySource, options) { return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination * blob with zero length and full metadata. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob * operation. * @param options The options parameters. */ abortCopyFromURL(copyId, options) { return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium * storage account and on a block blob in a blob storage account (locally redundant storage only). A * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's * ETag. * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ setTier(tier, options) { return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Query operation enables users to select/project on blob data by providing simple query * expressions. * @param options The options parameters. */ query(options) { return this.client.sendOperationRequest({ options }, queryOperationSpec); } /** * The Get Tags operation enables users to get the tags associated with a blob. * @param options The options parameters. */ getTags(options) { return this.client.sendOperationRequest({ options }, getTagsOperationSpec); } /** * The Set Tags operation enables users to set tags on a blob. * @param options The options parameters. */ setTags(options) { return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; exports2.BlobImpl = BlobImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var downloadOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.BlobDownloadHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.range, Parameters.rangeGetContentMD5, Parameters.rangeGetContentCRC64, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { headersMapper: Mappers.BlobDeleteHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.blobDeleteType ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.deleteSnapshots ], isXML: true, serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobUndeleteHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetExpiryHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.expiryOptions, Parameters.expiresOn ], isXML: true, serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition ], isXML: true, serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.comp12 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifUnmodifiedSince, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode ], isXML: true, serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.comp12 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.comp13 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.legalHold ], isXML: true, serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetMetadataHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope ], isXML: true, serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action, Parameters.duration, Parameters.proposedLeaseId, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action1, Parameters.leaseId1, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.leaseId1, Parameters.action2, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.leaseId1, Parameters.action4, Parameters.proposedLeaseId1, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.action3, Parameters.breakPeriod, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope ], isXML: true, serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.tier, Parameters.rehydratePriority, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.sourceIfTags, Parameters.copySource, Parameters.blobTagsString, Parameters.sealBlob, Parameters.legalHold1 ], isXML: true, serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.encryptionScope, Parameters.tier, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.copySource, Parameters.blobTagsString, Parameters.legalHold1, Parameters.xMsRequiresSync, Parameters.sourceContentMD5, Parameters.copySourceAuthorization, Parameters.copySourceTags, Parameters.fileRequestIntent ], isXML: true, serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp15, Parameters.copyId ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.copyActionAbortConstant ], isXML: true, serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.BlobSetTierHeaders }, 202: { headersMapper: Mappers.BlobSetTierHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.comp16 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifTags, Parameters.rehydratePriority, Parameters.tier1 ], isXML: true, serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ Parameters.comp, Parameters.timeoutInSeconds, Parameters.restype1 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1 ], isXML: true, serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "POST", responses: { 200: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, headersMapper: Mappers.BlobQueryHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobQueryExceptionHeaders } }, requestBody: Parameters.queryRequest, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.comp17 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BlobTags, headersMapper: Mappers.BlobGetTagsHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.versionId, Parameters.comp18 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { headersMapper: Mappers.BlobSetTagsHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, requestBody: Parameters.tags, queryParameters: [ Parameters.timeoutInSeconds, Parameters.versionId, Parameters.comp18 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId, Parameters.leaseId, Parameters.ifTags, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js var require_pageBlob = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PageBlobImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { static { __name(this, "PageBlobImpl"); } client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * The Create operation creates a new page blob. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ create(contentLength, blobContentLength, options) { return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob * @param contentLength The length of the request. * @param body Initial data * @param options The options parameters. */ uploadPages(contentLength, body, options) { return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ clearPages(contentLength, options) { return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a * URL * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should * match the ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 * aligned and range-end is required. * @param options The options parameters. */ uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a * page blob * @param options The options parameters. */ getPageRanges(options) { return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); } /** * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot. * @param options The options parameters. */ getPageRangesDiff(options) { return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); } /** * Resize the Blob * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ resize(blobContentLength, options) { return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. * This property applies to page blobs only. This property indicates how the service should modify the * blob's sequence number * @param options The options parameters. */ updateSequenceNumber(sequenceNumberAction, options) { return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. * The snapshot is copied such that only the differential changes between the previously copied * snapshot are transferred to the destination. The copied snapshots are complete copies of the * original snapshot and can be read or copied from as usual. This API is supported since REST version * 2016-05-31. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would * appear in a request URI. The source blob must either be public or must be authenticated via a shared * access signature. * @param options The options parameters. */ copyIncremental(copySource, options) { return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; exports2.PageBlobImpl = PageBlobImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.PageBlobCreateHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.encryptionScope, Parameters.tier, Parameters.blobTagsString, Parameters.legalHold1, Parameters.blobType, Parameters.blobContentLength, Parameters.blobSequenceNumber ], isXML: true, serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, requestBody: Parameters.body1, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.range, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64, Parameters.contentType1, Parameters.accept2, Parameters.pageWrite, Parameters.ifSequenceNumberLessThanOrEqualTo, Parameters.ifSequenceNumberLessThan, Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.range, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.ifSequenceNumberLessThanOrEqualTo, Parameters.ifSequenceNumberLessThan, Parameters.ifSequenceNumberEqualTo, Parameters.pageWrite1 ], isXML: true, serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.sourceContentMD5, Parameters.copySourceAuthorization, Parameters.fileRequestIntent, Parameters.pageWrite, Parameters.ifSequenceNumberLessThanOrEqualTo, Parameters.ifSequenceNumberLessThan, Parameters.ifSequenceNumberEqualTo, Parameters.sourceUrl, Parameters.sourceRange, Parameters.sourceContentCrc64, Parameters.range1 ], isXML: true, serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PageList, headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.marker, Parameters.maxPageSize, Parameters.snapshot, Parameters.comp20 ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.range, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PageList, headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.marker, Parameters.maxPageSize, Parameters.snapshot, Parameters.comp20, Parameters.prevsnapshot ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.range, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.prevSnapshotUrl ], isXML: true, serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.PageBlobResizeHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.blobContentLength ], isXML: true, serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobSequenceNumber, Parameters.sequenceNumberAction ], isXML: true, serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.copySource ], isXML: true, serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js var require_appendBlob = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AppendBlobImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { static { __name(this, "AppendBlobImpl"); } client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * The Create Append Blob operation creates a new append blob. * @param contentLength The length of the request. * @param options The options parameters. */ create(contentLength, options) { return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. * @param contentLength The length of the request. * @param body Initial data * @param options The options parameters. */ appendBlock(contentLength, body, options) { return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where * the contents are read from a source url. The Append Block operation is permitted only if the blob * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version * 2015-02-21 version or later. * @param sourceUrl Specify a URL to the copy source. * @param contentLength The length of the request. * @param options The options parameters. */ appendBlockFromUrl(sourceUrl, contentLength, options) { return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version * 2019-12-12 version or later. * @param options The options parameters. */ seal(options) { return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; exports2.AppendBlobImpl = AppendBlobImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.AppendBlobCreateHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.encryptionScope, Parameters.blobTagsString, Parameters.legalHold1, Parameters.blobType1 ], isXML: true, serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, requestBody: Parameters.body1, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64, Parameters.contentType1, Parameters.accept2, Parameters.maxSize, Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.encryptionScope, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.sourceContentMD5, Parameters.copySourceAuthorization, Parameters.fileRequestIntent, Parameters.transactionalContentMD5, Parameters.sourceUrl, Parameters.sourceContentCrc64, Parameters.maxSize, Parameters.appendPosition, Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { headersMapper: Mappers.AppendBlobSealHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.appendPosition ], isXML: true, serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js var require_blockBlob = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlockBlobImpl = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreClient = tslib_1.__importStar(require_commonjs8()); var Mappers = tslib_1.__importStar(require_mappers()); var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { static { __name(this, "BlockBlobImpl"); } client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a * partial update of the content of a block blob, use the Put Block List operation. * @param contentLength The length of the request. * @param body Initial data * @param options The options parameters. */ upload(contentLength, body, options) { return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are * not supported with Put Blob from URL; the content of an existing blob is overwritten with the * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, * use the Put Block from URL API in conjunction with Put Block List. * @param contentLength The length of the request. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would * appear in a request URI. The source blob must either be public or must be authenticated via a shared * access signature. * @param options The options parameters. */ putBlobFromUrl(contentLength, copySource, options) { return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified * for the blockid parameter must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data * @param options The options parameters. */ stageBlock(blockId, contentLength, body, options) { return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents * are read from a URL. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified * for the blockid parameter must be the same size for each block. * @param contentLength The length of the request. * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ stageBlockFromURL(blockId, contentLength, sourceUrl, options) { return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the * blob. In order to be written as part of a blob, a block must have been successfully written to the * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading * only those blocks that have changed, then committing the new and existing blocks together. You can * do this by specifying whether to commit a block from the committed block list or from the * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list * it may belong to. * @param blocks Blob Blocks. * @param options The options parameters. */ commitBlockList(blocks, options) { return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block * blob * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted * blocks, or both lists together. * @param options The options parameters. */ getBlockList(listType, options) { return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; exports2.BlockBlobImpl = BlockBlobImpl; var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); var uploadOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlockBlobUploadHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, requestBody: Parameters.body1, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.encryptionScope, Parameters.tier, Parameters.blobTagsString, Parameters.legalHold1, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64, Parameters.contentType1, Parameters.accept2, Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", serializer: xmlSerializer }; var putBlobFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition, Parameters.encryptionScope, Parameters.tier, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.sourceIfTags, Parameters.copySource, Parameters.blobTagsString, Parameters.sourceContentMD5, Parameters.copySourceAuthorization, Parameters.copySourceTags, Parameters.fileRequestIntent, Parameters.transactionalContentMD5, Parameters.blobType2, Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer }; var stageBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, requestBody: Parameters.body1, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp24, Parameters.blockId ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.contentLength, Parameters.leaseId, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.encryptionScope, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64, Parameters.contentType1, Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", serializer: xmlSerializer }; var stageBlockFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.comp24, Parameters.blockId ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.contentLength, Parameters.leaseId, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.encryptionScope, Parameters.sourceIfModifiedSince, Parameters.sourceIfUnmodifiedSince, Parameters.sourceIfMatch, Parameters.sourceIfNoneMatch, Parameters.sourceContentMD5, Parameters.copySourceAuthorization, Parameters.fileRequestIntent, Parameters.sourceUrl, Parameters.sourceContentCrc64, Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer }; var commitBlockListOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, requestBody: Parameters.blocks, queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, Parameters.requestId, Parameters.metadata, Parameters.leaseId, Parameters.ifModifiedSince, Parameters.ifUnmodifiedSince, Parameters.encryptionKey, Parameters.encryptionKeySha256, Parameters.encryptionAlgorithm, Parameters.ifMatch, Parameters.ifNoneMatch, Parameters.ifTags, Parameters.blobCacheControl, Parameters.blobContentType, Parameters.blobContentMD5, Parameters.blobContentEncoding, Parameters.blobContentLanguage, Parameters.blobContentDisposition, Parameters.immutabilityPolicyExpiry, Parameters.immutabilityPolicyMode, Parameters.encryptionScope, Parameters.tier, Parameters.blobTagsString, Parameters.legalHold1, Parameters.transactionalContentMD5, Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", serializer: xmlSerializer }; var getBlockListOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BlockList, headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { bodyMapper: Mappers.StorageError, headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.snapshot, Parameters.comp25, Parameters.listType ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, Parameters.leaseId, Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js var require_operations = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_service(), exports2); tslib_1.__exportStar(require_container(), exports2); tslib_1.__exportStar(require_blob(), exports2); tslib_1.__exportStar(require_pageBlob(), exports2); tslib_1.__exportStar(require_appendBlob(), exports2); tslib_1.__exportStar(require_blockBlob(), exports2); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js var require_storageClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageClient = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); var index_js_1 = require_operations(); var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { static { __name(this, "StorageClient"); } url; version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ constructor(url, options) { if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { options = {}; } const defaults = { requestContentType: "application/json; charset=utf-8" }; const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; const optionsWithDefaults = { ...defaults, ...options, userAgentOptions: { userAgentPrefix }, endpoint: options.endpoint ?? options.baseUri ?? "{url}" }; super(optionsWithDefaults); this.url = url; this.version = options.version || "2025-11-05"; this.service = new index_js_1.ServiceImpl(this); this.container = new index_js_1.ContainerImpl(this); this.blob = new index_js_1.BlobImpl(this); this.pageBlob = new index_js_1.PageBlobImpl(this); this.appendBlob = new index_js_1.AppendBlobImpl(this); this.blockBlob = new index_js_1.BlockBlobImpl(this); } service; container; blob; pageBlob; appendBlob; blockBlob; }; exports2.StorageClient = StorageClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js var require_service2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js var require_container2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js var require_blob2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js var require_pageBlob2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js var require_appendBlob2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js var require_blockBlob2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js var require_operationsInterfaces = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_service2(), exports2); tslib_1.__exportStar(require_container2(), exports2); tslib_1.__exportStar(require_blob2(), exports2); tslib_1.__exportStar(require_pageBlob2(), exports2); tslib_1.__exportStar(require_appendBlob2(), exports2); tslib_1.__exportStar(require_blockBlob2(), exports2); } }); // node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js var require_src2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageClient = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_models(), exports2); var storageClient_js_1 = require_storageClient(); Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { return storageClient_js_1.StorageClient; } }); tslib_1.__exportStar(require_operationsInterfaces(), exports2); } }); // node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js var require_StorageContextClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageContextClient = void 0; var index_js_1 = require_src2(); var StorageContextClient = class extends index_js_1.StorageClient { static { __name(this, "StorageContextClient"); } async sendOperationRequest(operationArguments, operationSpec) { const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; exports2.StorageContextClient = StorageContextClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js var require_StorageClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageClient = void 0; var StorageContextClient_js_1 = require_StorageContextClient(); var Pipeline_js_1 = require_Pipeline(); var utils_common_js_1 = require_utils_common(); var StorageClient = class { static { __name(this, "StorageClient"); } /** * Encoded URL string value. */ url; accountName; /** * Request policy pipeline. * * @internal */ pipeline; /** * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ credential; /** * StorageClient is a reference to protocol layer operations entry, which is * generated by AutoRest generator. */ storageClientContext; /** */ isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ constructor(url, pipeline) { this.url = (0, utils_common_js_1.escapeURLPath)(url); this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; exports2.StorageClient = StorageClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js var require_tracing = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingClient = void 0; var core_tracing_1 = require_commonjs5(); var constants_js_1 = require_constants10(); exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js var require_BlobSASPermissions = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { static { __name(this, "BlobSASPermissions"); } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. * * @param permissions - */ static parse(permissions) { const blobSASPermissions = new _BlobSASPermissions(); for (const char of permissions) { switch (char) { case "r": blobSASPermissions.read = true; break; case "a": blobSASPermissions.add = true; break; case "c": blobSASPermissions.create = true; break; case "w": blobSASPermissions.write = true; break; case "d": blobSASPermissions.delete = true; break; case "x": blobSASPermissions.deleteVersion = true; break; case "t": blobSASPermissions.tag = true; break; case "m": blobSASPermissions.move = true; break; case "e": blobSASPermissions.execute = true; break; case "i": blobSASPermissions.setImmutabilityPolicy = true; break; case "y": blobSASPermissions.permanentDelete = true; break; default: throw new RangeError(`Invalid permission: ${char}`); } } return blobSASPermissions; } /** * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it * and boolean values for them. * * @param permissionLike - */ static from(permissionLike) { const blobSASPermissions = new _BlobSASPermissions(); if (permissionLike.read) { blobSASPermissions.read = true; } if (permissionLike.add) { blobSASPermissions.add = true; } if (permissionLike.create) { blobSASPermissions.create = true; } if (permissionLike.write) { blobSASPermissions.write = true; } if (permissionLike.delete) { blobSASPermissions.delete = true; } if (permissionLike.deleteVersion) { blobSASPermissions.deleteVersion = true; } if (permissionLike.tag) { blobSASPermissions.tag = true; } if (permissionLike.move) { blobSASPermissions.move = true; } if (permissionLike.execute) { blobSASPermissions.execute = true; } if (permissionLike.setImmutabilityPolicy) { blobSASPermissions.setImmutabilityPolicy = true; } if (permissionLike.permanentDelete) { blobSASPermissions.permanentDelete = true; } return blobSASPermissions; } /** * Specifies Read access granted. */ read = false; /** * Specifies Add access granted. */ add = false; /** * Specifies Create access granted. */ create = false; /** * Specifies Write access granted. */ write = false; /** * Specifies Delete access granted. */ delete = false; /** * Specifies Delete version access granted. */ deleteVersion = false; /** * Specfies Tag access granted. */ tag = false; /** * Specifies Move access granted. */ move = false; /** * Specifies Execute access granted. */ execute = false; /** * Specifies SetImmutabilityPolicy access granted. */ setImmutabilityPolicy = false; /** * Specifies that Permanent Delete is permitted. */ permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * @returns A string which represents the BlobSASPermissions */ toString() { const permissions = []; if (this.read) { permissions.push("r"); } if (this.add) { permissions.push("a"); } if (this.create) { permissions.push("c"); } if (this.write) { permissions.push("w"); } if (this.delete) { permissions.push("d"); } if (this.deleteVersion) { permissions.push("x"); } if (this.tag) { permissions.push("t"); } if (this.move) { permissions.push("m"); } if (this.execute) { permissions.push("e"); } if (this.setImmutabilityPolicy) { permissions.push("i"); } if (this.permanentDelete) { permissions.push("y"); } return permissions.join(""); } }; exports2.BlobSASPermissions = BlobSASPermissions; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js var require_ContainerSASPermissions = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { static { __name(this, "ContainerSASPermissions"); } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. * * @param permissions - */ static parse(permissions) { const containerSASPermissions = new _ContainerSASPermissions(); for (const char of permissions) { switch (char) { case "r": containerSASPermissions.read = true; break; case "a": containerSASPermissions.add = true; break; case "c": containerSASPermissions.create = true; break; case "w": containerSASPermissions.write = true; break; case "d": containerSASPermissions.delete = true; break; case "l": containerSASPermissions.list = true; break; case "t": containerSASPermissions.tag = true; break; case "x": containerSASPermissions.deleteVersion = true; break; case "m": containerSASPermissions.move = true; break; case "e": containerSASPermissions.execute = true; break; case "i": containerSASPermissions.setImmutabilityPolicy = true; break; case "y": containerSASPermissions.permanentDelete = true; break; case "f": containerSASPermissions.filterByTags = true; break; default: throw new RangeError(`Invalid permission ${char}`); } } return containerSASPermissions; } /** * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it * and boolean values for them. * * @param permissionLike - */ static from(permissionLike) { const containerSASPermissions = new _ContainerSASPermissions(); if (permissionLike.read) { containerSASPermissions.read = true; } if (permissionLike.add) { containerSASPermissions.add = true; } if (permissionLike.create) { containerSASPermissions.create = true; } if (permissionLike.write) { containerSASPermissions.write = true; } if (permissionLike.delete) { containerSASPermissions.delete = true; } if (permissionLike.list) { containerSASPermissions.list = true; } if (permissionLike.deleteVersion) { containerSASPermissions.deleteVersion = true; } if (permissionLike.tag) { containerSASPermissions.tag = true; } if (permissionLike.move) { containerSASPermissions.move = true; } if (permissionLike.execute) { containerSASPermissions.execute = true; } if (permissionLike.setImmutabilityPolicy) { containerSASPermissions.setImmutabilityPolicy = true; } if (permissionLike.permanentDelete) { containerSASPermissions.permanentDelete = true; } if (permissionLike.filterByTags) { containerSASPermissions.filterByTags = true; } return containerSASPermissions; } /** * Specifies Read access granted. */ read = false; /** * Specifies Add access granted. */ add = false; /** * Specifies Create access granted. */ create = false; /** * Specifies Write access granted. */ write = false; /** * Specifies Delete access granted. */ delete = false; /** * Specifies Delete version access granted. */ deleteVersion = false; /** * Specifies List access granted. */ list = false; /** * Specfies Tag access granted. */ tag = false; /** * Specifies Move access granted. */ move = false; /** * Specifies Execute access granted. */ execute = false; /** * Specifies SetImmutabilityPolicy access granted. */ setImmutabilityPolicy = false; /** * Specifies that Permanent Delete is permitted. */ permanentDelete = false; /** * Specifies that Filter Blobs by Tags is permitted. */ filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { const permissions = []; if (this.read) { permissions.push("r"); } if (this.add) { permissions.push("a"); } if (this.create) { permissions.push("c"); } if (this.write) { permissions.push("w"); } if (this.delete) { permissions.push("d"); } if (this.deleteVersion) { permissions.push("x"); } if (this.list) { permissions.push("l"); } if (this.tag) { permissions.push("t"); } if (this.move) { permissions.push("m"); } if (this.execute) { permissions.push("e"); } if (this.setImmutabilityPolicy) { permissions.push("i"); } if (this.permanentDelete) { permissions.push("y"); } if (this.filterByTags) { permissions.push("f"); } return permissions.join(""); } }; exports2.ContainerSASPermissions = ContainerSASPermissions; } }); // node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js var require_UserDelegationKeyCredential = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UserDelegationKeyCredential = void 0; var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { static { __name(this, "UserDelegationKeyCredential"); } /** * Azure Storage account name; readonly. */ accountName; /** * Azure Storage user delegation key; readonly. */ userDelegationKey; /** * Key value in Buffer type. */ key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - * @param userDelegationKey - */ constructor(accountName, userDelegationKey) { this.accountName = accountName; this.userDelegationKey = userDelegationKey; this.key = Buffer.from(userDelegationKey.value, "base64"); } /** * Generates a hash signature for an HTTP request or for a SAS. * * @param stringToSign - */ computeHMACSHA256(stringToSign) { return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js var require_SasIPRange = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } __name(ipRangeToString, "ipRangeToString"); } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js var require_SASQueryParameters = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SASQueryParameters = exports2.SASProtocol = void 0; var SasIPRange_js_1 = require_SasIPRange(); var utils_common_js_1 = require_utils_common(); var SASProtocol; (function(SASProtocol2) { SASProtocol2["Https"] = "https"; SASProtocol2["HttpsAndHttp"] = "https,http"; })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { static { __name(this, "SASQueryParameters"); } /** * The storage API version. */ version; /** * Optional. The allowed HTTP protocol(s). */ protocol; /** * Optional. The start time for this SAS token. */ startsOn; /** * Optional only when identifier is provided. The expiry time for this SAS token. */ expiresOn; /** * Optional only when identifier is provided. * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for * more details. */ permissions; /** * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} * for more details. */ services; /** * Optional. The storage resource types being accessed (only for Account SAS). Please refer to * {@link AccountSASResourceTypes} for more details. */ resourceTypes; /** * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). * * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy */ identifier; /** * Optional. Encryption scope to use when sending requests authorized with this SAS URI. */ encryptionScope; /** * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only */ resource; /** * The signature for the SAS token. */ signature; /** * Value for cache-control header in Blob/File Service SAS. */ cacheControl; /** * Value for content-disposition header in Blob/File Service SAS. */ contentDisposition; /** * Value for content-encoding header in Blob/File Service SAS. */ contentEncoding; /** * Value for content-length header in Blob/File Service SAS. */ contentLanguage; /** * Value for content-type header in Blob/File Service SAS. */ contentType; /** * Inner value of getter ipRange. */ ipRangeInner; /** * The Azure Active Directory object ID in GUID format. * Property of user delegation key. */ signedOid; /** * The Azure Active Directory tenant ID in GUID format. * Property of user delegation key. */ signedTenantId; /** * The date-time the key is active. * Property of user delegation key. */ signedStartsOn; /** * The date-time the key expires. * Property of user delegation key. */ signedExpiresOn; /** * Abbreviation of the Azure Storage service that accepts the user delegation key. * Property of user delegation key. */ signedService; /** * The service version that created the user delegation key. * Property of user delegation key. */ signedVersion; /** * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key * has the required permissions before granting access but no additional permission check for the user specified in * this value will be performed. This is only used for User Delegation SAS. */ preauthorizedAgentObjectId; /** * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. * This is only used for User Delegation SAS. */ correlationId; /** * Optional. IP range allowed for this SAS. * * @readonly */ get ipRange() { if (this.ipRangeInner) { return { end: this.ipRangeInner.end, start: this.ipRangeInner.start }; } return void 0; } constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; this.services = permissionsOrOptions.services; this.resourceTypes = permissionsOrOptions.resourceTypes; this.protocol = permissionsOrOptions.protocol; this.startsOn = permissionsOrOptions.startsOn; this.expiresOn = permissionsOrOptions.expiresOn; this.ipRangeInner = permissionsOrOptions.ipRange; this.identifier = permissionsOrOptions.identifier; this.encryptionScope = permissionsOrOptions.encryptionScope; this.resource = permissionsOrOptions.resource; this.cacheControl = permissionsOrOptions.cacheControl; this.contentDisposition = permissionsOrOptions.contentDisposition; this.contentEncoding = permissionsOrOptions.contentEncoding; this.contentLanguage = permissionsOrOptions.contentLanguage; this.contentType = permissionsOrOptions.contentType; if (permissionsOrOptions.userDelegationKey) { this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; this.signedService = permissionsOrOptions.userDelegationKey.signedService; this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; this.correlationId = permissionsOrOptions.correlationId; } } else { this.services = services; this.resourceTypes = resourceTypes; this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; this.signedStartsOn = userDelegationKey.signedStartsOn; this.signedExpiresOn = userDelegationKey.signedExpiresOn; this.signedService = userDelegationKey.signedService; this.signedVersion = userDelegationKey.signedVersion; this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; this.correlationId = correlationId; } } } /** * Encodes all SAS query parameters into a string that can be appended to a URL. * */ toString() { const params = [ "sv", "ss", "srt", "spr", "st", "se", "sip", "si", "ses", "skoid", // Signed object ID "sktid", // Signed tenant ID "skt", // Signed key start time "ske", // Signed key expiry time "sks", // Signed key service "skv", // Signed key version "sr", "sp", "sig", "rscc", "rscd", "rsce", "rscl", "rsct", "saoid", "scid" ]; const queries = []; for (const param of params) { switch (param) { case "sv": this.tryAppendQueryParameter(queries, param, this.version); break; case "ss": this.tryAppendQueryParameter(queries, param, this.services); break; case "srt": this.tryAppendQueryParameter(queries, param, this.resourceTypes); break; case "spr": this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); break; case "ses": this.tryAppendQueryParameter(queries, param, this.encryptionScope); break; case "skoid": this.tryAppendQueryParameter(queries, param, this.signedOid); break; case "sktid": this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); break; case "skv": this.tryAppendQueryParameter(queries, param, this.signedVersion); break; case "sr": this.tryAppendQueryParameter(queries, param, this.resource); break; case "sp": this.tryAppendQueryParameter(queries, param, this.permissions); break; case "sig": this.tryAppendQueryParameter(queries, param, this.signature); break; case "rscc": this.tryAppendQueryParameter(queries, param, this.cacheControl); break; case "rscd": this.tryAppendQueryParameter(queries, param, this.contentDisposition); break; case "rsce": this.tryAppendQueryParameter(queries, param, this.contentEncoding); break; case "rscl": this.tryAppendQueryParameter(queries, param, this.contentLanguage); break; case "rsct": this.tryAppendQueryParameter(queries, param, this.contentType); break; case "saoid": this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); break; case "scid": this.tryAppendQueryParameter(queries, param, this.correlationId); break; } } return queries.join("&"); } /** * A private helper method used to filter and append query key/value pairs into an array. * * @param queries - * @param key - * @param value - */ tryAppendQueryParameter(queries, key, value) { if (!value) { return; } key = encodeURIComponent(key); value = encodeURIComponent(value); if (key.length > 0 && value.length > 0) { queries.push(`${key}=${value}`); } } }; exports2.SASQueryParameters = SASQueryParameters; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js var require_BlobSASSignatureValues = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; var BlobSASPermissions_js_1 = require_BlobSASPermissions(); var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); var SasIPRange_js_1 = require_SasIPRange(); var SASQueryParameters_js_1 = require_SASQueryParameters(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } __name(generateBlobSASQueryParameters, "generateBlobSASQueryParameters"); function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { if (version >= "2025-07-05") { return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); } } } if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); } } throw new RangeError("'version' must be >= '2015-04-05'."); } __name(generateBlobSASQueryParametersInternal, "generateBlobSASQueryParametersInternal"); function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } let resource = "c"; if (blobSASSignatureValues.blobName) { resource = "b"; } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } __name(generateBlobSASQueryParameters20150405, "generateBlobSASQueryParameters20150405"); function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } __name(generateBlobSASQueryParameters20181109, "generateBlobSASQueryParameters20181109"); function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.identifier && !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } __name(generateBlobSASQueryParameters20201206, "generateBlobSASQueryParameters20201206"); function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } __name(generateBlobSASQueryParametersUDK20181109, "generateBlobSASQueryParametersUDK20181109"); function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } __name(generateBlobSASQueryParametersUDK20200210, "generateBlobSASQueryParametersUDK20200210"); function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } __name(generateBlobSASQueryParametersUDK20201206, "generateBlobSASQueryParametersUDK20201206"); function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, void 0, // SignedKeyDelegatedUserTenantId, will be added in a future release. void 0, // SignedDelegatedUserObjectId, will be added in future release. blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } __name(generateBlobSASQueryParametersUDK20250705, "generateBlobSASQueryParametersUDK20250705"); function getCanonicalName(accountName, containerName, blobName) { const elements = [`/blob/${accountName}/${containerName}`]; if (blobName) { elements.push(`/${blobName}`); } return elements.join(""); } __name(getCanonicalName, "getCanonicalName"); function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } blobSASSignatureValues.version = version; return blobSASSignatureValues; } __name(SASSignatureValuesSanityCheckAndAutofill, "SASSignatureValuesSanityCheckAndAutofill"); } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js var require_BlobLeaseClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobLeaseClient = void 0; var core_util_1 = require_commonjs4(); var constants_js_1 = require_constants10(); var tracing_js_1 = require_tracing(); var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { static { __name(this, "BlobLeaseClient"); } _leaseId; _url; _containerOrBlobOperation; _isContainer; /** * Gets the lease Id. * * @readonly */ get leaseId() { return this._leaseId; } /** * Gets the url. * * @readonly */ get url() { return this._url; } /** * Creates an instance of BlobLeaseClient. * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { this._isContainer = true; this._containerOrBlobOperation = clientContext.container; } else { this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } if (!leaseId) { leaseId = (0, core_util_1.randomUUID)(); } this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ async acquireLease(duration, options = {}) { if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.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 tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, duration, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To change the ID of the lease. * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ async changeLease(proposedLeaseId, options = {}) { if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.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 tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.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 tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.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 tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions }); }); } /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ async breakLease(breakPeriod, options = {}) { if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.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 tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, breakPeriod, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions }; return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; exports2.BlobLeaseClient = BlobLeaseClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js var require_RetriableReadableStream = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetriableReadableStream = void 0; var abort_controller_1 = require_commonjs11(); var node_stream_1 = require("node:stream"); var RetriableReadableStream = class extends node_stream_1.Readable { static { __name(this, "RetriableReadableStream"); } start; offset; end; getter; source; retries = 0; maxRetryRequests; onProgress; options; /** * Creates an instance of RetriableReadableStream. * * @param source - The current ReadableStream returned from getter * @param getter - A method calling downloading request returning * a new ReadableStream from specified offset * @param offset - Offset position in original data source to read * @param count - How much data in original data source to read * @param options - */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); this.getter = getter; this.source = source; this.start = offset; this.offset = offset; this.end = offset + count - 1; this.maxRetryRequests = options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; this.onProgress = options.onProgress; this.options = options; 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); } sourceDataHandler = (data) => { if (this.options.doInjectErrorOnce) { this.options.doInjectErrorOnce = void 0; this.source.pause(); this.sourceErrorOrEndHandler(); this.source.destroy(); return; } this.offset += data.length; if (this.onProgress) { this.onProgress({ loadedBytes: this.offset - this.start }); } if (!this.push(data)) { this.source.pause(); } }; sourceAbortedHandler = () => { const abortError = new abort_controller_1.AbortError("The operation was aborted."); this.destroy(abortError); }; sourceErrorOrEndHandler = (err) => { if (err && err.name === "AbortError") { this.destroy(err); return; } this.removeSourceEventHandlers(); if (this.offset - 1 === this.end) { this.push(null); } else if (this.offset <= this.end) { if (this.retries < this.maxRetryRequests) { this.retries += 1; this.getter(this.offset).then((newSource) => { this.source = newSource; this.setSourceEventHandlers(); return; }).catch((error) => { this.destroy(error); }); } else { this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); } } else { this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); } }; _destroy(error, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error === null ? void 0 : error); } }; exports2.RetriableReadableStream = RetriableReadableStream; } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js var require_BlobDownloadResponse = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobDownloadResponse = void 0; var core_util_1 = require_commonjs4(); var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { static { __name(this, "BlobDownloadResponse"); } /** * Indicates that the service supports * requests for partial file content. * * @readonly */ get acceptRanges() { return this.originalResponse.acceptRanges; } /** * Returns if it was previously specified * for the file. * * @readonly */ get cacheControl() { return this.originalResponse.cacheControl; } /** * Returns the value that was specified * for the 'x-ms-content-disposition' header and specifies how to process the * response. * * @readonly */ get contentDisposition() { return this.originalResponse.contentDisposition; } /** * Returns the value that was specified * for the Content-Encoding request header. * * @readonly */ get contentEncoding() { return this.originalResponse.contentEncoding; } /** * Returns the value that was specified * for the Content-Language request header. * * @readonly */ get contentLanguage() { return this.originalResponse.contentLanguage; } /** * The current sequence number for a * page blob. This header is not returned for block blobs or append blobs. * * @readonly */ get blobSequenceNumber() { return this.originalResponse.blobSequenceNumber; } /** * The blob's type. Possible values include: * 'BlockBlob', 'PageBlob', 'AppendBlob'. * * @readonly */ get blobType() { return this.originalResponse.blobType; } /** * The number of bytes present in the * response body. * * @readonly */ get contentLength() { return this.originalResponse.contentLength; } /** * If the file has an MD5 hash and the * request is to read the full file, this response header is returned so that * the client can check for message content integrity. If the request is to * read a specified range and the 'x-ms-range-get-content-md5' is set to * true, then the request returns an MD5 hash for the range, as long as the * range size is less than or equal to 4 MB. If neither of these sets of * conditions is true, then no value is returned for the 'Content-MD5' * header. * * @readonly */ get contentMD5() { return this.originalResponse.contentMD5; } /** * Indicates the range of bytes returned if * the client requested a subset of the file by setting the Range request * header. * * @readonly */ get contentRange() { return this.originalResponse.contentRange; } /** * The content type specified for the file. * The default content type is 'application/octet-stream' * * @readonly */ get contentType() { return this.originalResponse.contentType; } /** * Conclusion time of the last attempted * Copy File operation where this file was the destination file. This value * can specify the time of a completed, aborted, or failed copy attempt. * * @readonly */ get copyCompletedOn() { return this.originalResponse.copyCompletedOn; } /** * String identifier for the last attempted Copy * File operation where this file was the destination file. * * @readonly */ get copyId() { return this.originalResponse.copyId; } /** * Contains the number of bytes copied and * the total bytes in the source in the last attempted Copy File operation * where this file was the destination file. Can show between 0 and * Content-Length bytes copied. * * @readonly */ get copyProgress() { return this.originalResponse.copyProgress; } /** * URL up to 2KB in length that specifies the * source file used in the last attempted Copy File operation where this file * was the destination file. * * @readonly */ get copySource() { return this.originalResponse.copySource; } /** * State of the copy operation * identified by 'x-ms-copy-id'. Possible values include: 'pending', * 'success', 'aborted', 'failed' * * @readonly */ get copyStatus() { return this.originalResponse.copyStatus; } /** * Only appears when * x-ms-copy-status is failed or pending. Describes cause of fatal or * non-fatal copy operation failure. * * @readonly */ get copyStatusDescription() { return this.originalResponse.copyStatusDescription; } /** * When a blob is leased, * specifies whether the lease is of infinite or fixed duration. Possible * values include: 'infinite', 'fixed'. * * @readonly */ get leaseDuration() { return this.originalResponse.leaseDuration; } /** * Lease state of the blob. Possible * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. * * @readonly */ get leaseState() { return this.originalResponse.leaseState; } /** * The current lease status of the * blob. Possible values include: 'locked', 'unlocked'. * * @readonly */ get leaseStatus() { return this.originalResponse.leaseStatus; } /** * A UTC date/time value generated by the service that * indicates the time at which the response was initiated. * * @readonly */ get date() { return this.originalResponse.date; } /** * The number of committed blocks * present in the blob. This header is returned only for append blobs. * * @readonly */ get blobCommittedBlockCount() { return this.originalResponse.blobCommittedBlockCount; } /** * The ETag contains a value that you can use to * perform operations conditionally, in quotes. * * @readonly */ get etag() { return this.originalResponse.etag; } /** * The number of tags associated with the blob * * @readonly */ get tagCount() { return this.originalResponse.tagCount; } /** * The error code. * * @readonly */ get errorCode() { return this.originalResponse.errorCode; } /** * The value of this header is set to * true if the file data and application metadata are completely encrypted * using the specified algorithm. Otherwise, the value is set to false (when * the file is unencrypted, or if only parts of the file/application metadata * are encrypted). * * @readonly */ get isServerEncrypted() { return this.originalResponse.isServerEncrypted; } /** * If the blob has a MD5 hash, and if * request contains range header (Range or x-ms-range), this response header * is returned with the value of the whole blob's MD5 value. This value may * or may not be equal to the value returned in Content-MD5 header, with the * latter calculated from the requested range. * * @readonly */ get blobContentMD5() { return this.originalResponse.blobContentMD5; } /** * Returns the date and time the file was last * modified. Any operation that modifies the file or its properties updates * the last modified time. * * @readonly */ get lastModified() { return this.originalResponse.lastModified; } /** * Returns the UTC date and time generated by the service that indicates the time at which the blob was * last read or written to. * * @readonly */ get lastAccessed() { return this.originalResponse.lastAccessed; } /** * Returns the date and time the blob was created. * * @readonly */ get createdOn() { return this.originalResponse.createdOn; } /** * A name-value pair * to associate with a file storage object. * * @readonly */ get metadata() { return this.originalResponse.metadata; } /** * This header uniquely identifies the request * that was made and can be used for troubleshooting the request. * * @readonly */ get requestId() { return this.originalResponse.requestId; } /** * If a client request id header is sent in the request, this header will be present in the * response with the same value. * * @readonly */ get clientRequestId() { return this.originalResponse.clientRequestId; } /** * Indicates the version of the Blob service used * to execute the request. * * @readonly */ get version() { return this.originalResponse.version; } /** * Indicates the versionId of the downloaded blob version. * * @readonly */ get versionId() { return this.originalResponse.versionId; } /** * Indicates whether version of this blob is a current version. * * @readonly */ get isCurrentVersion() { return this.originalResponse.isCurrentVersion; } /** * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned * when the blob was encrypted with a customer-provided key. * * @readonly */ get encryptionKeySha256() { return this.originalResponse.encryptionKeySha256; } /** * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to * true, then the request returns a crc64 for the range, as long as the range size is less than * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is * specified in the same request, it will fail with 400(Bad Request) */ get contentCrc64() { return this.originalResponse.contentCrc64; } /** * Object Replication Policy Id of the destination blob. * * @readonly */ get objectReplicationDestinationPolicyId() { return this.originalResponse.objectReplicationDestinationPolicyId; } /** * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. * * @readonly */ get objectReplicationSourceProperties() { return this.originalResponse.objectReplicationSourceProperties; } /** * If this blob has been sealed. * * @readonly */ get isSealed() { return this.originalResponse.isSealed; } /** * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. * * @readonly */ get immutabilityPolicyExpiresOn() { return this.originalResponse.immutabilityPolicyExpiresOn; } /** * Indicates immutability policy mode. * * @readonly */ get immutabilityPolicyMode() { return this.originalResponse.immutabilityPolicyMode; } /** * Indicates if a legal hold is present on the blob. * * @readonly */ get legalHold() { return this.originalResponse.legalHold; } /** * The response body as a browser Blob. * Always undefined in node.js. * * @readonly */ get contentAsBlob() { return this.originalResponse.blobBody; } /** * The response body as a node.js Readable stream. * Always undefined in the browser. * * It will automatically retry when internal read stream unexpected ends. * * @readonly */ get readableStreamBody() { return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. */ get _response() { return this.originalResponse._response; } originalResponse; blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * * @param originalResponse - * @param getter - * @param offset - * @param count - * @param options - */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; exports2.BlobDownloadResponse = BlobDownloadResponse; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js var require_AvroConstants = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; exports2.AVRO_SYNC_MARKER_SIZE = 16; exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); exports2.AVRO_CODEC_KEY = "avro.codec"; exports2.AVRO_SCHEMA_KEY = "avro.schema"; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js var require_AvroParser = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { static { __name(this, "AvroParser"); } /** * Reads a fixed number of bytes from the stream. * * @param stream - * @param length - * @param options - */ static async readFixedBytes(stream, length, options = {}) { const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } return bytes; } /** * Reads a single byte from the stream. * * @param stream - * @param options - */ static async readByte(stream, options = {}) { const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; } while (haveMoreByte && significanceInBit < 28); if (haveMoreByte) { zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { throw new Error("Integer overflow."); } return res; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } static async readLong(stream, options = {}) { return _AvroParser.readZigZagLong(stream, options); } static async readInt(stream, options = {}) { return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } static async readBoolean(stream, options = {}) { const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { return false; } else { throw new Error("Byte was not a boolean."); } } static async readFloat(stream, options = {}) { const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } static async readDouble(stream, options = {}) { const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } static async readBytes(stream, options = {}) { const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } return stream.read(size, { abortSignal: options.abortSignal }); } static async readString(stream, options = {}) { const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } static async readMapPair(stream, readItemMethod, options = {}) { const key = await _AvroParser.readString(stream, options); const value = await readItemMethod(stream, options); return { key, value }; } static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = /* @__PURE__ */ __name((s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }, "readPairMethod"); const pairs = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs) { dict[pair.key] = pair.value; } return dict; } static async readArray(stream, readItemMethod, options = {}) { const items = []; for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { await _AvroParser.readLong(stream, options); count = -count; } while (count--) { const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; AvroComplex2["ENUM"] = "enum"; AvroComplex2["ARRAY"] = "array"; AvroComplex2["MAP"] = "map"; AvroComplex2["UNION"] = "union"; AvroComplex2["FIXED"] = "fixed"; })(AvroComplex || (AvroComplex = {})); var AvroPrimitive; (function(AvroPrimitive2) { AvroPrimitive2["NULL"] = "null"; AvroPrimitive2["BOOLEAN"] = "boolean"; AvroPrimitive2["INT"] = "int"; AvroPrimitive2["LONG"] = "long"; AvroPrimitive2["FLOAT"] = "float"; AvroPrimitive2["DOUBLE"] = "double"; AvroPrimitive2["BYTES"] = "bytes"; AvroPrimitive2["STRING"] = "string"; })(AvroPrimitive || (AvroPrimitive = {})); var AvroType = class _AvroType { static { __name(this, "AvroType"); } /** * Determines the AvroType from the Avro Schema. */ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types static fromSchema(schema) { if (typeof schema === "string") { return _AvroType.fromStringSchema(schema); } else if (Array.isArray(schema)) { return _AvroType.fromArraySchema(schema); } else { return _AvroType.fromObjectSchema(schema); } } static fromStringSchema(schema) { switch (schema) { 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(schema); default: throw new Error(`Unexpected Avro type ${schema}`); } } static fromArraySchema(schema) { return new AvroUnionType(schema.map(_AvroType.fromSchema)); } static fromObjectSchema(schema) { const type = schema.type; try { return _AvroType.fromStringSchema(type); } catch { } switch (type) { case AvroComplex.RECORD: if (schema.aliases) { throw new Error(`aliases currently is not supported, schema: ${schema}`); } if (!schema.name) { throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); } const fields = {}; if (!schema.fields) { throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); } for (const field of schema.fields) { fields[field.name] = _AvroType.fromSchema(field.type); } return new AvroRecordType(fields, schema.name); case AvroComplex.ENUM: if (schema.aliases) { throw new Error(`aliases currently is not supported, schema: ${schema}`); } if (!schema.symbols) { throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); } return new AvroEnumType(schema.symbols); case AvroComplex.MAP: if (!schema.values) { throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); } return new AvroMapType(_AvroType.fromSchema(schema.values)); case AvroComplex.ARRAY: case AvroComplex.FIXED: default: throw new Error(`Unexpected Avro type ${type} in ${schema}`); } } }; exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { static { __name(this, "AvroPrimitiveType"); } _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { static { __name(this, "AvroEnumType"); } _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types async read(stream, options = {}) { const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { static { __name(this, "AvroUnionType"); } _types; constructor(types) { super(); this._types = types; } async read(stream, options = {}) { const typeIndex = await AvroParser.readInt(stream, options); return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { static { __name(this, "AvroMapType"); } _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types read(stream, options = {}) { const readItemMethod = /* @__PURE__ */ __name((s, opts) => { return this._itemType.read(s, opts); }, "readItemMethod"); return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { static { __name(this, "AvroRecordType"); } _name; _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { record[key] = await this._fields[key].read(stream, options); } } return record; } }; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js var require_utils_common3 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; if (a == null || b == null) return false; if (a.length !== b.length) return false; for (let i = 0; i < a.length; ++i) { if (a[i] !== b[i]) return false; } return true; } __name(arraysEqual, "arraysEqual"); } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js var require_AvroReader = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AvroReader = void 0; var AvroConstants_js_1 = require_AvroConstants(); var AvroParser_js_1 = require_AvroParser(); var utils_common_js_1 = require_utils_common3(); var AvroReader = class { static { __name(this, "AvroReader"); } _dataStream; _headerStream; _syncMarker; _metadata; _itemType; _itemsRemainingInBlock; // Remembers where we started if partial data stream was provided. _initialBlockOffset; /// The byte offset within the Avro file (both header and data) /// of the start of the current block. _blockOffset; get blockOffset() { return this._blockOffset; } _objectIndex; get objectIndex() { return this._objectIndex; } _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; this._initialized = false; this._blockOffset = currentBlockOffset || 0; this._objectIndex = indexWithinCurrentBlock || 0; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); this._itemsRemainingInBlock--; } } } hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } async *parseObjects(options = {}) { if (!this._initialized) { await this.initialize(options); } while (this.hasNext()) { const result = await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); this._itemsRemainingInBlock--; this._objectIndex++; if (this._itemsRemainingInBlock === 0) { const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); this._blockOffset = this._initialBlockOffset + this._dataStream.position; this._objectIndex = 0; if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { throw new Error("Stream is not a valid Avro file."); } try { this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } catch { this._itemsRemainingInBlock = 0; } if (this._itemsRemainingInBlock > 0) { await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } } yield result; } } }; exports2.AvroReader = AvroReader; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js var require_AvroReadable = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AvroReadable = void 0; var AvroReadable = class { static { __name(this, "AvroReadable"); } }; exports2.AvroReadable = AvroReadable; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js var require_AvroReadableFromStream = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AvroReadableFromStream = void 0; var AvroReadable_js_1 = require_AvroReadable(); var abort_controller_1 = require_commonjs11(); var buffer_1 = require("buffer"); var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { static { __name(this, "AvroReadableFromStream"); } _position; _readable; toUint8Array(data) { if (typeof data === "string") { return buffer_1.Buffer.from(data); } return data; } constructor(readable) { super(); this._readable = readable; this._position = 0; } get position() { return this._position; } async read(size, options = {}) { if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { throw new Error(`size parameter should be positive: ${size}`); } if (size === 0) { return new Uint8Array(); } if (!this._readable.readable) { throw new Error("Stream no longer readable."); } const chunk = this._readable.read(size); if (chunk) { this._position += chunk.length; return this.toUint8Array(chunk); } else { return new Promise((resolve, reject) => { const cleanUp = /* @__PURE__ */ __name(() => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); this._readable.removeListener("end", rejectCallback); this._readable.removeListener("close", rejectCallback); if (options.abortSignal) { options.abortSignal.removeEventListener("abort", abortHandler); } }, "cleanUp"); const readableCallback = /* @__PURE__ */ __name(() => { const callbackChunk = this._readable.read(size); if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); resolve(this.toUint8Array(callbackChunk)); } }, "readableCallback"); const rejectCallback = /* @__PURE__ */ __name(() => { cleanUp(); reject(); }, "rejectCallback"); const abortHandler = /* @__PURE__ */ __name(() => { cleanUp(); reject(ABORT_ERROR); }, "abortHandler"); this._readable.on("readable", readableCallback); this._readable.once("error", rejectCallback); this._readable.once("end", rejectCallback); this._readable.once("close", rejectCallback); if (options.abortSignal) { options.abortSignal.addEventListener("abort", abortHandler); } }); } } }; exports2.AvroReadableFromStream = AvroReadableFromStream; } }); // node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js var require_internal_avro = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; var AvroReader_js_1 = require_AvroReader(); Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { return AvroReader_js_1.AvroReader; } }); var AvroReadable_js_1 = require_AvroReadable(); Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { return AvroReadable_js_1.AvroReadable; } }); var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { return AvroReadableFromStream_js_1.AvroReadableFromStream; } }); } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js var require_BlobQuickQueryStream = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobQuickQueryStream = void 0; var node_stream_1 = require("node:stream"); var index_js_1 = require_internal_avro(); var BlobQuickQueryStream = class extends node_stream_1.Readable { static { __name(this, "BlobQuickQueryStream"); } source; avroReader; avroIter; avroPaused = true; onProgress; onError; /** * Creates an instance of BlobQuickQueryStream. * * @param source - The current ReadableStream returned from getter * @param options - */ constructor(source, options = {}) { super(); this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { if (this.avroPaused) { this.readInternal().catch((err) => { this.emit("error", err); }); } } async readInternal() { this.avroPaused = false; let avroNext; do { avroNext = await this.avroIter.next(); if (avroNext.done) { break; } const obj = avroNext.value; const schema = obj.$schema; if (typeof schema !== "string") { throw Error("Missing schema in avro record."); } switch (schema) { case "com.microsoft.azure.storage.queryBlobContents.resultData": { const data = obj.data; if (data instanceof Uint8Array === false) { throw Error("Invalid data in avro result record."); } if (!this.push(Buffer.from(data))) { this.avroPaused = true; } } break; case "com.microsoft.azure.storage.queryBlobContents.progress": { const bytesScanned = obj.bytesScanned; if (typeof bytesScanned !== "number") { throw Error("Invalid bytesScanned in avro progress record."); } if (this.onProgress) { this.onProgress({ loadedBytes: bytesScanned }); } } break; case "com.microsoft.azure.storage.queryBlobContents.end": if (this.onProgress) { const totalBytes = obj.totalBytes; if (typeof totalBytes !== "number") { throw Error("Invalid totalBytes in avro end record."); } this.onProgress({ loadedBytes: totalBytes }); } this.push(null); break; case "com.microsoft.azure.storage.queryBlobContents.error": if (this.onError) { const fatal = obj.fatal; if (typeof fatal !== "boolean") { throw Error("Invalid fatal in avro error record."); } const name = obj.name; if (typeof name !== "string") { throw Error("Invalid name in avro error record."); } const description = obj.description; if (typeof description !== "string") { throw Error("Invalid description in avro error record."); } const position = obj.position; if (typeof position !== "number") { throw Error("Invalid position in avro error record."); } this.onError({ position, name, isFatal: fatal, description }); } break; default: throw Error(`Unknown schema ${schema} in avro progress record.`); } } while (!avroNext.done && !this.avroPaused); } }; exports2.BlobQuickQueryStream = BlobQuickQueryStream; } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js var require_BlobQueryResponse = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobQueryResponse = void 0; var core_util_1 = require_commonjs4(); var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { static { __name(this, "BlobQueryResponse"); } /** * Indicates that the service supports * requests for partial file content. * * @readonly */ get acceptRanges() { return this.originalResponse.acceptRanges; } /** * Returns if it was previously specified * for the file. * * @readonly */ get cacheControl() { return this.originalResponse.cacheControl; } /** * Returns the value that was specified * for the 'x-ms-content-disposition' header and specifies how to process the * response. * * @readonly */ get contentDisposition() { return this.originalResponse.contentDisposition; } /** * Returns the value that was specified * for the Content-Encoding request header. * * @readonly */ get contentEncoding() { return this.originalResponse.contentEncoding; } /** * Returns the value that was specified * for the Content-Language request header. * * @readonly */ get contentLanguage() { return this.originalResponse.contentLanguage; } /** * The current sequence number for a * page blob. This header is not returned for block blobs or append blobs. * * @readonly */ get blobSequenceNumber() { return this.originalResponse.blobSequenceNumber; } /** * The blob's type. Possible values include: * 'BlockBlob', 'PageBlob', 'AppendBlob'. * * @readonly */ get blobType() { return this.originalResponse.blobType; } /** * The number of bytes present in the * response body. * * @readonly */ get contentLength() { return this.originalResponse.contentLength; } /** * If the file has an MD5 hash and the * request is to read the full file, this response header is returned so that * the client can check for message content integrity. If the request is to * read a specified range and the 'x-ms-range-get-content-md5' is set to * true, then the request returns an MD5 hash for the range, as long as the * range size is less than or equal to 4 MB. If neither of these sets of * conditions is true, then no value is returned for the 'Content-MD5' * header. * * @readonly */ get contentMD5() { return this.originalResponse.contentMD5; } /** * Indicates the range of bytes returned if * the client requested a subset of the file by setting the Range request * header. * * @readonly */ get contentRange() { return this.originalResponse.contentRange; } /** * The content type specified for the file. * The default content type is 'application/octet-stream' * * @readonly */ get contentType() { return this.originalResponse.contentType; } /** * Conclusion time of the last attempted * Copy File operation where this file was the destination file. This value * can specify the time of a completed, aborted, or failed copy attempt. * * @readonly */ get copyCompletedOn() { return void 0; } /** * String identifier for the last attempted Copy * File operation where this file was the destination file. * * @readonly */ get copyId() { return this.originalResponse.copyId; } /** * Contains the number of bytes copied and * the total bytes in the source in the last attempted Copy File operation * where this file was the destination file. Can show between 0 and * Content-Length bytes copied. * * @readonly */ get copyProgress() { return this.originalResponse.copyProgress; } /** * URL up to 2KB in length that specifies the * source file used in the last attempted Copy File operation where this file * was the destination file. * * @readonly */ get copySource() { return this.originalResponse.copySource; } /** * State of the copy operation * identified by 'x-ms-copy-id'. Possible values include: 'pending', * 'success', 'aborted', 'failed' * * @readonly */ get copyStatus() { return this.originalResponse.copyStatus; } /** * Only appears when * x-ms-copy-status is failed or pending. Describes cause of fatal or * non-fatal copy operation failure. * * @readonly */ get copyStatusDescription() { return this.originalResponse.copyStatusDescription; } /** * When a blob is leased, * specifies whether the lease is of infinite or fixed duration. Possible * values include: 'infinite', 'fixed'. * * @readonly */ get leaseDuration() { return this.originalResponse.leaseDuration; } /** * Lease state of the blob. Possible * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. * * @readonly */ get leaseState() { return this.originalResponse.leaseState; } /** * The current lease status of the * blob. Possible values include: 'locked', 'unlocked'. * * @readonly */ get leaseStatus() { return this.originalResponse.leaseStatus; } /** * A UTC date/time value generated by the service that * indicates the time at which the response was initiated. * * @readonly */ get date() { return this.originalResponse.date; } /** * The number of committed blocks * present in the blob. This header is returned only for append blobs. * * @readonly */ get blobCommittedBlockCount() { return this.originalResponse.blobCommittedBlockCount; } /** * The ETag contains a value that you can use to * perform operations conditionally, in quotes. * * @readonly */ get etag() { return this.originalResponse.etag; } /** * The error code. * * @readonly */ get errorCode() { return this.originalResponse.errorCode; } /** * The value of this header is set to * true if the file data and application metadata are completely encrypted * using the specified algorithm. Otherwise, the value is set to false (when * the file is unencrypted, or if only parts of the file/application metadata * are encrypted). * * @readonly */ get isServerEncrypted() { return this.originalResponse.isServerEncrypted; } /** * If the blob has a MD5 hash, and if * request contains range header (Range or x-ms-range), this response header * is returned with the value of the whole blob's MD5 value. This value may * or may not be equal to the value returned in Content-MD5 header, with the * latter calculated from the requested range. * * @readonly */ get blobContentMD5() { return this.originalResponse.blobContentMD5; } /** * Returns the date and time the file was last * modified. Any operation that modifies the file or its properties updates * the last modified time. * * @readonly */ get lastModified() { return this.originalResponse.lastModified; } /** * A name-value pair * to associate with a file storage object. * * @readonly */ get metadata() { return this.originalResponse.metadata; } /** * This header uniquely identifies the request * that was made and can be used for troubleshooting the request. * * @readonly */ get requestId() { return this.originalResponse.requestId; } /** * If a client request id header is sent in the request, this header will be present in the * response with the same value. * * @readonly */ get clientRequestId() { return this.originalResponse.clientRequestId; } /** * Indicates the version of the File service used * to execute the request. * * @readonly */ get version() { return this.originalResponse.version; } /** * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned * when the blob was encrypted with a customer-provided key. * * @readonly */ get encryptionKeySha256() { return this.originalResponse.encryptionKeySha256; } /** * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to * true, then the request returns a crc64 for the range, as long as the range size is less than * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is * specified in the same request, it will fail with 400(Bad Request) */ get contentCrc64() { return this.originalResponse.contentCrc64; } /** * The response body as a browser Blob. * Always undefined in node.js. * * @readonly */ get blobBody() { return void 0; } /** * The response body as a node.js Readable stream. * Always undefined in the browser. * * It will parse avor data returned by blob query. * * @readonly */ get readableStreamBody() { return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. */ get _response() { return this.originalResponse._response; } originalResponse; blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * * @param originalResponse - * @param options - */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; exports2.BlobQueryResponse = BlobQueryResponse; } }); // node_modules/@azure/storage-blob/dist/commonjs/models.js var require_models2 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; exports2.toAccessTier = toAccessTier; exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; var constants_js_1 = require_constants10(); var BlockBlobTier; (function(BlockBlobTier2) { BlockBlobTier2["Hot"] = "Hot"; BlockBlobTier2["Cool"] = "Cool"; BlockBlobTier2["Cold"] = "Cold"; BlockBlobTier2["Archive"] = "Archive"; })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); var PremiumPageBlobTier; (function(PremiumPageBlobTier2) { 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"; })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); function toAccessTier(tier) { if (tier === void 0) { return void 0; } return tier; } __name(toAccessTier, "toAccessTier"); function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } __name(ensureCpkIfSpecified, "ensureCpkIfSpecified"); var StorageBlobAudience; (function(StorageBlobAudience2) { StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } __name(getBlobServiceAccountAudience, "getBlobServiceAccountAudience"); } }); // node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js var require_PageBlobRangeResponse = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, count: x.end - x.start })); const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ offset: x.start, count: x.end - x.start })); return { ...response, pageRange, clearRange, _response: { ...response._response, parsedBody: { pageRange, clearRange } } }; } __name(rangeResponseFromModel, "rangeResponseFromModel"); } }); // node_modules/@azure/core-lro/dist/commonjs/logger.js var require_logger2 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-lro"); } }); // node_modules/@azure/core-lro/dist/commonjs/poller/constants.js var require_constants12 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; exports2.POLL_INTERVAL_IN_MS = 2e3; exports2.terminalStates = ["succeeded", "canceled", "failed"]; } }); // node_modules/@azure/core-lro/dist/commonjs/poller/operation.js var require_operation = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; var logger_js_1 = require_logger2(); var constants_js_1 = require_constants12(); function deserializeState(serializedState) { try { return JSON.parse(serializedState).state; } catch (e) { throw new Error(`Unable to deserialize input state: ${serializedState}`); } } __name(deserializeState, "deserializeState"); exports2.deserializeState = deserializeState; function setStateError(inputs) { const { state, stateProxy, isOperationError } = inputs; return (error) => { if (isOperationError(error)) { stateProxy.setError(state, error); stateProxy.setFailed(state); } throw error; }; } __name(setStateError, "setStateError"); function appendReadableErrorMessage(currentMessage, innerMessage) { let message = currentMessage; if (message.slice(-1) !== ".") { message = message + "."; } return message + " " + innerMessage; } __name(appendReadableErrorMessage, "appendReadableErrorMessage"); function simplifyError(err) { let message = err.message; let code = err.code; let curErr = err; while (curErr.innererror) { curErr = curErr.innererror; code = curErr.code; message = appendReadableErrorMessage(message, curErr.message); } return { code, message }; } __name(simplifyError, "simplifyError"); function processOperationStatus(result) { const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; switch (status) { case "succeeded": { stateProxy.setSucceeded(state); break; } case "failed": { const err = getError === null || getError === void 0 ? void 0 : getError(response); let postfix = ""; if (err) { const { code, message } = simplifyError(err); postfix = `. ${code}. ${message}`; } const errStr = `The long-running operation has failed${postfix}`; stateProxy.setError(state, new Error(errStr)); stateProxy.setFailed(state); logger_js_1.logger.warning(errStr); break; } case "canceled": { stateProxy.setCanceled(state); break; } } if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { stateProxy.setResult(state, buildResult({ response, state, processResult })); } } __name(processOperationStatus, "processOperationStatus"); function buildResult(inputs) { const { processResult, response, state } = inputs; return processResult ? processResult(response, state) : response; } __name(buildResult, "buildResult"); async function initOperation(inputs) { const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; const { operationLocation, resourceLocation, metadata, response } = await init(); if (operationLocation) withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); const config = { metadata, operationLocation, resourceLocation }; logger_js_1.logger.verbose(`LRO: Operation description:`, config); const state = stateProxy.initState(config); const status = getOperationStatus({ response, state, operationLocation }); processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); return state; } __name(initOperation, "initOperation"); exports2.initOperation = initOperation; async function pollOperationHelper(inputs) { const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; const response = await poll(operationLocation, options).catch(setStateError({ state, stateProxy, isOperationError })); const status = getOperationStatus(response, state); logger_js_1.logger.verbose(`LRO: Status: Polling from: ${state.config.operationLocation} Operation status: ${status} Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); if (status === "succeeded") { const resourceLocation = getResourceLocation(response, state); if (resourceLocation !== void 0) { return { response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), status }; } } return { response, status }; } __name(pollOperationHelper, "pollOperationHelper"); async function pollOperation(inputs) { const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; const { operationLocation } = state.config; if (operationLocation !== void 0) { const { response, status } = await pollOperationHelper({ poll, getOperationStatus, state, stateProxy, operationLocation, getResourceLocation, isOperationError, options }); processOperationStatus({ status, response, state, stateProxy, isDone, processResult, getError, setErrorAsResult }); if (!constants_js_1.terminalStates.includes(status)) { const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); if (intervalInMs) setDelay(intervalInMs); const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); if (location !== void 0) { const isUpdated = operationLocation !== location; state.config.operationLocation = location; withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); } else withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); } updateState === null || updateState === void 0 ? void 0 : updateState(state, response); } } __name(pollOperation, "pollOperation"); exports2.pollOperation = pollOperation; } }); // node_modules/@azure/core-lro/dist/commonjs/http/operation.js var require_operation2 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; var operation_js_1 = require_operation(); var logger_js_1 = require_logger2(); function getOperationLocationPollingUrl(inputs) { const { azureAsyncOperation, operationLocation } = inputs; return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; } __name(getOperationLocationPollingUrl, "getOperationLocationPollingUrl"); function getLocationHeader(rawResponse) { return rawResponse.headers["location"]; } __name(getLocationHeader, "getLocationHeader"); function getOperationLocationHeader(rawResponse) { return rawResponse.headers["operation-location"]; } __name(getOperationLocationHeader, "getOperationLocationHeader"); function getAzureAsyncOperationHeader(rawResponse) { return rawResponse.headers["azure-asyncoperation"]; } __name(getAzureAsyncOperationHeader, "getAzureAsyncOperationHeader"); function findResourceLocation(inputs) { var _a; const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; switch (requestMethod) { case "PUT": { return requestPath; } case "DELETE": { return void 0; } case "PATCH": { return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; } default: { return getDefault(); } } function getDefault() { switch (resourceLocationConfig) { case "azure-async-operation": { return void 0; } case "original-uri": { return requestPath; } case "location": default: { return location; } } } __name(getDefault, "getDefault"); } __name(findResourceLocation, "findResourceLocation"); function inferLroMode(inputs) { const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; const operationLocation = getOperationLocationHeader(rawResponse); const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); const location = getLocationHeader(rawResponse); const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); if (pollingUrl !== void 0) { return { mode: "OperationLocation", operationLocation: pollingUrl, resourceLocation: findResourceLocation({ requestMethod: normalizedRequestMethod, location, requestPath, resourceLocationConfig }) }; } else if (location !== void 0) { return { mode: "ResourceLocation", operationLocation: location }; } else if (normalizedRequestMethod === "PUT" && requestPath) { return { mode: "Body", operationLocation: requestPath }; } else { return void 0; } } __name(inferLroMode, "inferLroMode"); exports2.inferLroMode = inferLroMode; function transformStatus(inputs) { const { status, statusCode } = inputs; if (typeof status !== "string" && status !== void 0) { throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); } switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { case void 0: return toOperationStatus(statusCode); case "succeeded": return "succeeded"; case "failed": return "failed"; case "running": case "accepted": case "started": case "canceling": case "cancelling": return "running"; case "canceled": case "cancelled": return "canceled"; default: { logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); return status; } } } __name(transformStatus, "transformStatus"); function getStatus(rawResponse) { var _a; const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; return transformStatus({ status, statusCode: rawResponse.statusCode }); } __name(getStatus, "getStatus"); function getProvisioningState(rawResponse) { var _a, _b; const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; return transformStatus({ status, statusCode: rawResponse.statusCode }); } __name(getProvisioningState, "getProvisioningState"); function toOperationStatus(statusCode) { if (statusCode === 202) { return "running"; } else if (statusCode < 300) { return "succeeded"; } else { return "failed"; } } __name(toOperationStatus, "toOperationStatus"); function parseRetryAfter({ rawResponse }) { const retryAfter = rawResponse.headers["retry-after"]; if (retryAfter !== void 0) { const retryAfterInSeconds = parseInt(retryAfter); return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; } return void 0; } __name(parseRetryAfter, "parseRetryAfter"); exports2.parseRetryAfter = parseRetryAfter; function getErrorFromResponse(response) { const error = accessBodyProperty(response, "error"); if (!error) { logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); return; } if (!error.code || !error.message) { logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); return; } return error; } __name(getErrorFromResponse, "getErrorFromResponse"); exports2.getErrorFromResponse = getErrorFromResponse; function calculatePollingIntervalFromDate(retryAfterDate) { const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); const retryAfterTime = retryAfterDate.getTime(); if (timeNow < retryAfterTime) { return retryAfterTime - timeNow; } return void 0; } __name(calculatePollingIntervalFromDate, "calculatePollingIntervalFromDate"); function getStatusFromInitialResponse(inputs) { const { response, state, operationLocation } = inputs; function helper() { var _a; const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; switch (mode) { case void 0: return toOperationStatus(response.rawResponse.statusCode); case "Body": return getOperationStatus(response, state); default: return "running"; } } __name(helper, "helper"); const status = helper(); return status === "running" && operationLocation === void 0 ? "succeeded" : status; } __name(getStatusFromInitialResponse, "getStatusFromInitialResponse"); exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; async function initHttpOperation(inputs) { const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; return (0, operation_js_1.initOperation)({ init: async () => { const response = await lro.sendInitialRequest(); const config = inferLroMode({ rawResponse: response.rawResponse, requestPath: lro.requestPath, requestMethod: lro.requestMethod, resourceLocationConfig }); return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); }, stateProxy, processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, getOperationStatus: getStatusFromInitialResponse, setErrorAsResult }); } __name(initHttpOperation, "initHttpOperation"); exports2.initHttpOperation = initHttpOperation; function getOperationLocation({ rawResponse }, state) { var _a; const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; switch (mode) { case "OperationLocation": { return getOperationLocationPollingUrl({ operationLocation: getOperationLocationHeader(rawResponse), azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) }); } case "ResourceLocation": { return getLocationHeader(rawResponse); } case "Body": default: { return void 0; } } } __name(getOperationLocation, "getOperationLocation"); exports2.getOperationLocation = getOperationLocation; function getOperationStatus({ rawResponse }, state) { var _a; const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; switch (mode) { case "OperationLocation": { return getStatus(rawResponse); } case "ResourceLocation": { return toOperationStatus(rawResponse.statusCode); } case "Body": { return getProvisioningState(rawResponse); } default: throw new Error(`Internal error: Unexpected operation mode: ${mode}`); } } __name(getOperationStatus, "getOperationStatus"); exports2.getOperationStatus = getOperationStatus; function accessBodyProperty({ flatResponse, rawResponse }, prop) { var _a, _b; return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; } __name(accessBodyProperty, "accessBodyProperty"); function getResourceLocation(res, state) { const loc = accessBodyProperty(res, "resourceLocation"); if (loc && typeof loc === "string") { state.config.resourceLocation = loc; } return state.config.resourceLocation; } __name(getResourceLocation, "getResourceLocation"); exports2.getResourceLocation = getResourceLocation; function isOperationError(e) { return e.name === "RestError"; } __name(isOperationError, "isOperationError"); exports2.isOperationError = isOperationError; async function pollHttpOperation(inputs) { const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; return (0, operation_js_1.pollOperation)({ state, stateProxy, setDelay, processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, getError: getErrorFromResponse, updateState, getPollingInterval: parseRetryAfter, getOperationLocation, getOperationStatus, isOperationError, getResourceLocation, options, /** * The expansion here is intentional because `lro` could be an object that * references an inner this, so we need to preserve a reference to it. */ poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), setErrorAsResult }); } __name(pollHttpOperation, "pollHttpOperation"); exports2.pollHttpOperation = pollHttpOperation; } }); // node_modules/@azure/core-lro/dist/commonjs/poller/poller.js var require_poller = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.buildCreatePoller = void 0; var operation_js_1 = require_operation(); var constants_js_1 = require_constants12(); var core_util_1 = require_commonjs4(); var createStateProxy = /* @__PURE__ */ __name(() => ({ /** * The state at this point is created to be of type OperationState. * It will be updated later to be of type TState when the * customer-provided callback, `updateState`, is called during polling. */ initState: (config) => ({ status: "running", config }), setCanceled: (state) => state.status = "canceled", setError: (state, error) => state.error = error, setResult: (state, result) => state.result = result, setRunning: (state) => state.status = "running", setSucceeded: (state) => state.status = "succeeded", setFailed: (state) => state.status = "failed", getError: (state) => state.error, getResult: (state) => state.result, isCanceled: (state) => state.status === "canceled", isFailed: (state) => state.status === "failed", isRunning: (state) => state.status === "running", isSucceeded: (state) => state.status === "succeeded" }), "createStateProxy"); function buildCreatePoller(inputs) { const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; return async ({ init, poll }, options) => { const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; const stateProxy = createStateProxy(); const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { let called = false; return (operationLocation, isUpdated) => { if (isUpdated) withOperationLocationCallback(operationLocation); else if (!called) withOperationLocationCallback(operationLocation); called = true; }; })() : void 0; const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ init, stateProxy, processResult, getOperationStatus: getStatusFromInitialResponse, withOperationLocation, setErrorAsResult: !resolveOnUnsuccessful }); let resultPromise; const abortController = new AbortController(); const handlers = /* @__PURE__ */ new Map(); const handleProgressEvents = /* @__PURE__ */ __name(async () => handlers.forEach((h) => h(state)), "handleProgressEvents"); const cancelErrMsg = "Operation was canceled"; let currentPollIntervalInMs = intervalInMs; const poller = { getOperationState: () => state, getResult: () => state.result, isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), isStopped: () => resultPromise === void 0, stopPolling: () => { abortController.abort(); }, toString: () => JSON.stringify({ state }), onProgress: (callback) => { const s = Symbol(); handlers.set(s, callback); return () => handlers.delete(s); }, pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { const { abortSignal: inputAbortSignal } = pollOptions || {}; function abortListener() { abortController.abort(); } __name(abortListener, "abortListener"); const abortSignal = abortController.signal; if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { abortController.abort(); } else if (!abortSignal.aborted) { inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); } try { if (!poller.isDone()) { await poller.poll({ abortSignal }); while (!poller.isDone()) { await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); await poller.poll({ abortSignal }); } } } finally { inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); } if (resolveOnUnsuccessful) { return poller.getResult(); } else { switch (state.status) { case "succeeded": return poller.getResult(); case "canceled": throw new Error(cancelErrMsg); case "failed": throw state.error; case "notStarted": case "running": throw new Error(`Polling completed without succeeding or failing`); } } })().finally(() => { resultPromise = void 0; }), async poll(pollOptions) { if (resolveOnUnsuccessful) { if (poller.isDone()) return; } else { switch (state.status) { case "succeeded": return; case "canceled": throw new Error(cancelErrMsg); case "failed": throw state.error; } } await (0, operation_js_1.pollOperation)({ poll, state, stateProxy, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, getOperationStatus: getStatusFromPollResponse, getResourceLocation, processResult, getError, updateState, options: pollOptions, setDelay: (pollIntervalInMs) => { currentPollIntervalInMs = pollIntervalInMs; }, setErrorAsResult: !resolveOnUnsuccessful }); await handleProgressEvents(); if (!resolveOnUnsuccessful) { switch (state.status) { case "canceled": throw new Error(cancelErrMsg); case "failed": throw state.error; } } } }; return poller; }; } __name(buildCreatePoller, "buildCreatePoller"); exports2.buildCreatePoller = buildCreatePoller; } }); // node_modules/@azure/core-lro/dist/commonjs/http/poller.js var require_poller2 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpPoller = void 0; var operation_js_1 = require_operation2(); var poller_js_1 = require_poller(); async function createHttpPoller(lro, options) { const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; return (0, poller_js_1.buildCreatePoller)({ getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, getStatusFromPollResponse: operation_js_1.getOperationStatus, isOperationError: operation_js_1.isOperationError, getOperationLocation: operation_js_1.getOperationLocation, getResourceLocation: operation_js_1.getResourceLocation, getPollingInterval: operation_js_1.parseRetryAfter, getError: operation_js_1.getErrorFromResponse, resolveOnUnsuccessful })({ init: async () => { const response = await lro.sendInitialRequest(); const config = (0, operation_js_1.inferLroMode)({ rawResponse: response.rawResponse, requestPath: lro.requestPath, requestMethod: lro.requestMethod, resourceLocationConfig }); return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); }, poll: lro.sendPollRequest }, { intervalInMs, withOperationLocation, restoreFrom, updateState, processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse }); } __name(createHttpPoller, "createHttpPoller"); exports2.createHttpPoller = createHttpPoller; } }); // node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js var require_operation3 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GenericPollOperation = void 0; var operation_js_1 = require_operation2(); var logger_js_1 = require_logger2(); var createStateProxy = /* @__PURE__ */ __name(() => ({ initState: (config) => ({ config, isStarted: true }), setCanceled: (state) => state.isCancelled = true, setError: (state, error) => state.error = error, setResult: (state, result) => state.result = result, setRunning: (state) => state.isStarted = true, setSucceeded: (state) => state.isCompleted = true, setFailed: () => { }, getError: (state) => state.error, getResult: (state) => state.result, isCanceled: (state) => !!state.isCancelled, isFailed: (state) => !!state.error, isRunning: (state) => !!state.isStarted, isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) }), "createStateProxy"); var GenericPollOperation = class { static { __name(this, "GenericPollOperation"); } constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { this.state = state; this.lro = lro; this.setErrorAsResult = setErrorAsResult; this.lroResourceLocationConfig = lroResourceLocationConfig; this.processResult = processResult; this.updateState = updateState; this.isDone = isDone; } setPollerConfig(pollerConfig) { this.pollerConfig = pollerConfig; } async update(options) { var _a; const stateProxy = createStateProxy(); if (!this.state.isStarted) { this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ lro: this.lro, stateProxy, resourceLocationConfig: this.lroResourceLocationConfig, processResult: this.processResult, setErrorAsResult: this.setErrorAsResult })); } const updateState = this.updateState; const isDone = this.isDone; if (!this.state.isCompleted && this.state.error === void 0) { await (0, operation_js_1.pollHttpOperation)({ lro: this.lro, state: this.state, stateProxy, processResult: this.processResult, updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, options, setDelay: (intervalInMs) => { this.pollerConfig.intervalInMs = intervalInMs; }, setErrorAsResult: this.setErrorAsResult }); } (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); return this; } async cancel() { logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); return this; } /** * Serializes the Poller operation. */ toString() { return JSON.stringify({ state: this.state }); } }; exports2.GenericPollOperation = GenericPollOperation; } }); // node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js var require_poller3 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; var PollerStoppedError = class _PollerStoppedError extends Error { static { __name(this, "PollerStoppedError"); } constructor(message) { super(message); this.name = "PollerStoppedError"; Object.setPrototypeOf(this, _PollerStoppedError.prototype); } }; exports2.PollerStoppedError = PollerStoppedError; var PollerCancelledError = class _PollerCancelledError extends Error { static { __name(this, "PollerCancelledError"); } constructor(message) { super(message); this.name = "PollerCancelledError"; Object.setPrototypeOf(this, _PollerCancelledError.prototype); } }; exports2.PollerCancelledError = PollerCancelledError; var Poller = class { static { __name(this, "Poller"); } /** * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. * * When writing an implementation of a Poller, this implementation needs to deal with the initialization * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's * operation has already been defined, at least its basic properties. The code below shows how to approach * the definition of the constructor of a new custom poller. * * ```ts * export class MyPoller extends Poller { * constructor({ * // Anything you might need outside of the basics * }) { * let state: MyOperationState = { * privateProperty: private, * publicProperty: public, * }; * * const operation = { * state, * update, * cancel, * toString * } * * // Sending the operation to the parent's constructor. * super(operation); * * // You can assign more local properties here. * } * } * ``` * * Inside of this constructor, a new promise is created. This will be used to * tell the user when the poller finishes (see `pollUntilDone()`). The promise's * resolve and reject methods are also used internally to control when to resolve * or reject anyone waiting for the poller to finish. * * The constructor of a custom implementation of a poller is where any serialized version of * a previous poller's operation should be deserialized into the operation sent to the * base constructor. For example: * * ```ts * export class MyPoller extends Poller { * constructor( * baseOperation: string | undefined * ) { * let state: MyOperationState = {}; * if (baseOperation) { * state = { * ...JSON.parse(baseOperation).state, * ...state * }; * } * const operation = { * state, * // ... * } * super(operation); * } * } * ``` * * @param operation - Must contain the basic properties of `PollOperation`. */ constructor(operation) { this.resolveOnUnsuccessful = false; this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; this.promise = new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; }); this.promise.catch(() => { }); } /** * Starts a loop that will break only if the poller is done * or if the poller is stopped. */ async startPolling(pollOptions = {}) { if (this.stopped) { this.stopped = false; } while (!this.isStopped() && !this.isDone()) { await this.poll(pollOptions); await this.delay(); } } /** * pollOnce does one polling, by calling to the update method of the underlying * poll operation to make any relevant change effective. * * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. * * @param options - Optional properties passed to the operation's update method. */ async pollOnce(options = {}) { if (!this.isDone()) { this.operation = await this.operation.update({ abortSignal: options.abortSignal, fireProgress: this.fireProgress.bind(this) }); } this.processUpdatedState(); } /** * fireProgress calls the functions passed in via onProgress the method of the poller. * * It loops over all of the callbacks received from onProgress, and executes them, sending them * the current operation state. * * @param state - The current operation state. */ fireProgress(state) { for (const callback of this.pollProgressCallbacks) { callback(state); } } /** * Invokes the underlying operation's cancel method. */ async cancelOnce(options = {}) { this.operation = await this.operation.cancel(options); } /** * Returns a promise that will resolve once a single polling request finishes. * It does this by calling the update method of the Poller's operation. * * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. * * @param options - Optional properties passed to the operation's update method. */ poll(options = {}) { if (!this.pollOncePromise) { this.pollOncePromise = this.pollOnce(options); const clearPollOncePromise = /* @__PURE__ */ __name(() => { this.pollOncePromise = void 0; }, "clearPollOncePromise"); this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); } return this.pollOncePromise; } processUpdatedState() { if (this.operation.state.error) { this.stopped = true; if (!this.resolveOnUnsuccessful) { this.reject(this.operation.state.error); throw this.operation.state.error; } } if (this.operation.state.isCancelled) { this.stopped = true; if (!this.resolveOnUnsuccessful) { const error = new PollerCancelledError("Operation was canceled"); this.reject(error); throw error; } } if (this.isDone() && this.resolve) { this.resolve(this.getResult()); } } /** * Returns a promise that will resolve once the underlying operation is completed. */ async pollUntilDone(pollOptions = {}) { if (this.stopped) { this.startPolling(pollOptions).catch(this.reject); } this.processUpdatedState(); return this.promise; } /** * Invokes the provided callback after each polling is completed, * sending the current state of the poller's operation. * * It returns a method that can be used to stop receiving updates on the given callback function. */ onProgress(callback) { this.pollProgressCallbacks.push(callback); return () => { this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); }; } /** * Returns true if the poller has finished polling. */ isDone() { const state = this.operation.state; return Boolean(state.isCompleted || state.isCancelled || state.error); } /** * Stops the poller from continuing to poll. */ stopPolling() { if (!this.stopped) { this.stopped = true; if (this.reject) { this.reject(new PollerStoppedError("This poller is already stopped")); } } } /** * Returns true if the poller is stopped. */ isStopped() { return this.stopped; } /** * Attempts to cancel the underlying operation. * * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. * * If it's called again before it finishes, it will throw an error. * * @param options - Optional properties passed to the operation's update method. */ cancelOperation(options = {}) { if (!this.cancelPromise) { this.cancelPromise = this.cancelOnce(options); } else if (options.abortSignal) { throw new Error("A cancel request is currently pending"); } return this.cancelPromise; } /** * Returns the state of the operation. * * Even though TState will be the same type inside any of the methods of any extension of the Poller class, * implementations of the pollers can customize what's shared with the public by writing their own * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller * and a public type representing a safe to share subset of the properties of the internal state. * Their definition of getOperationState can then return their public type. * * Example: * * ```ts * // Let's say we have our poller's operation state defined as: * interface MyOperationState extends PollOperationState { * privateProperty?: string; * publicProperty?: string; * } * * // To allow us to have a true separation of public and private state, we have to define another interface: * interface PublicState extends PollOperationState { * publicProperty?: string; * } * * // Then, we define our Poller as follows: * export class MyPoller extends Poller { * // ... More content is needed here ... * * public getOperationState(): PublicState { * const state: PublicState = this.operation.state; * return { * // Properties from PollOperationState * isStarted: state.isStarted, * isCompleted: state.isCompleted, * isCancelled: state.isCancelled, * error: state.error, * result: state.result, * * // The only other property needed by PublicState. * publicProperty: state.publicProperty * } * } * } * ``` * * You can see this in the tests of this repository, go to the file: * `../test/utils/testPoller.ts` * and look for the getOperationState implementation. */ getOperationState() { return this.operation.state; } /** * Returns the result value of the operation, * regardless of the state of the poller. * It can return undefined or an incomplete form of the final TResult value * depending on the implementation. */ getResult() { const state = this.operation.state; return state.result; } /** * Returns a serialized version of the poller's operation * by invoking the operation's toString method. */ toString() { return this.operation.toString(); } }; exports2.Poller = Poller; } }); // node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js var require_lroEngine = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LroEngine = void 0; var operation_js_1 = require_operation3(); var constants_js_1 = require_constants12(); var poller_js_1 = require_poller3(); var operation_js_2 = require_operation(); var LroEngine = class extends poller_js_1.Poller { static { __name(this, "LroEngine"); } constructor(lro, options) { const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); super(operation); this.resolveOnUnsuccessful = resolveOnUnsuccessful; this.config = { intervalInMs }; operation.setPollerConfig(this.config); } /** * The method used by the poller to wait before attempting to update its operation. */ delay() { return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; } }); // node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js var require_lroEngine2 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LroEngine = void 0; var lroEngine_js_1 = require_lroEngine(); Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { return lroEngine_js_1.LroEngine; } }); } }); // node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js var require_pollOperation = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/core-lro/dist/commonjs/index.js var require_commonjs14 = __commonJS({ "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpPoller = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var poller_js_1 = require_poller2(); Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { return poller_js_1.createHttpPoller; } }); tslib_1.__exportStar(require_lroEngine2(), exports2); tslib_1.__exportStar(require_poller3(), exports2); tslib_1.__exportStar(require_pollOperation(), exports2); } }); // node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js var require_BlobStartCopyFromUrlPoller = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobBeginCopyFromUrlPoller = void 0; var core_util_1 = require_commonjs4(); var core_lro_1 = require_commonjs14(); var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { static { __name(this, "BlobBeginCopyFromUrlPoller"); } intervalInMs; constructor(options) { const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } const operation = makeBlobBeginCopyFromURLPollOperation({ ...state, blobClient, copySource, startCopyFromURLOptions }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); } this.intervalInMs = intervalInMs; } delay() { return (0, core_util_1.delay)(this.intervalInMs); } }; exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = /* @__PURE__ */ __name(async function cancel2(options = {}) { const state = this.state; const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); }, "cancel"); var update = /* @__PURE__ */ __name(async function update2(options = {}) { const state = this.state; const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; state.isCompleted = true; } } else if (!state.isCompleted) { try { const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); const { copyStatus, copyProgress } = result; const prevCopyProgress = state.copyProgress; if (copyProgress) { state.copyProgress = copyProgress; } if (copyStatus === "pending" && copyProgress !== prevCopyProgress && typeof options.fireProgress === "function") { options.fireProgress(state); } else if (copyStatus === "success") { state.result = result; state.isCompleted = true; } else if (copyStatus === "failed") { state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); state.isCompleted = true; } } catch (err) { state.error = err; state.isCompleted = true; } } return makeBlobBeginCopyFromURLPollOperation(state); }, "update"); var toString = /* @__PURE__ */ __name(function toString2() { return JSON.stringify({ state: this.state }, (key, value) => { if (key === "blobClient") { return void 0; } return value; }); }, "toString"); function makeBlobBeginCopyFromURLPollOperation(state) { return { state: { ...state }, cancel, toString, update }; } __name(makeBlobBeginCopyFromURLPollOperation, "makeBlobBeginCopyFromURLPollOperation"); } }); // node_modules/@azure/storage-blob/dist/commonjs/Range.js var require_Range = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); } if (iRange.count && iRange.count <= 0) { throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } __name(rangeToString, "rangeToString"); } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js var require_Batch = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Batch = void 0; var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { static { __name(this, "Batch"); } /** * Concurrency. Must be lager than 0. */ concurrency; /** * Number of active operations under execution. */ actives = 0; /** * Number of completed operations under execution. */ completed = 0; /** * Offset of next operation to be executed. */ offset = 0; /** * Operation array to be executed. */ operations = []; /** * States of Batch. When an error happens, state will turn into error. * Batch will stop execute left operations. */ state = BatchStates.Good; /** * A private emitter used to pass events inside this class. */ emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. * * @param operation - */ addOperation(operation) { this.operations.push(async () => { try { this.actives++; await operation(); this.actives--; this.completed++; this.parallelExecute(); } catch (error) { this.emitter.emit("error", error); } }); } /** * Start execute operations in the queue. * */ async do() { if (this.operations.length === 0) { return Promise.resolve(); } this.parallelExecute(); return new Promise((resolve, reject) => { this.emitter.on("finish", resolve); this.emitter.on("error", (error) => { this.state = BatchStates.Error; reject(error); }); }); } /** * Get next operation to be executed. Return null when reaching ends. * */ nextOperation() { if (this.offset < this.operations.length) { return this.operations[this.offset++]; } return null; } /** * Start execute operations. One one the most important difference between * this method with do() is that do() wraps as an sync method. * */ parallelExecute() { if (this.state === BatchStates.Error) { return; } if (this.completed >= this.operations.length) { this.emitter.emit("finish"); return; } while (this.actives < this.concurrency) { const operation = this.nextOperation(); if (operation) { operation(); } else { return; } } } }; exports2.Batch = Batch; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js var require_utils4 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fsCreateReadStream = exports2.fsStat = void 0; exports2.streamToBuffer = streamToBuffer; exports2.streamToBuffer2 = streamToBuffer2; exports2.streamToBuffer3 = streamToBuffer3; exports2.readStreamToLocalFile = readStreamToLocalFile; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var node_fs_1 = tslib_1.__importDefault(require("node:fs")); var node_util_1 = tslib_1.__importDefault(require("node:util")); var constants_js_1 = require_constants10(); async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve(); return; } let chunk = stream.read(); if (!chunk) { return; } if (typeof chunk === "string") { chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve(); }); stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } __name(streamToBuffer, "streamToBuffer"); async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; return new Promise((resolve, reject) => { stream.on("readable", () => { let chunk = stream.read(); if (!chunk) { return; } if (typeof chunk === "string") { chunk = Buffer.from(chunk, encoding); } if (pos + chunk.length > bufferSize) { reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); stream.on("end", () => { resolve(pos); }); stream.on("error", reject); }); } __name(streamToBuffer2, "streamToBuffer2"); async function streamToBuffer3(readableStream, encoding) { return new Promise((resolve, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { resolve(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } __name(streamToBuffer3, "streamToBuffer3"); async function readStreamToLocalFile(rs, file) { return new Promise((resolve, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); ws.on("error", (err) => { reject(err); }); ws.on("close", resolve); rs.pipe(ws); }); } __name(readStreamToLocalFile, "readStreamToLocalFile"); exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); exports2.fsCreateReadStream = node_fs_1.default.createReadStream; } }); // node_modules/@azure/storage-blob/dist/commonjs/Clients.js var require_Clients = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; var core_rest_pipeline_1 = require_commonjs6(); var core_auth_1 = require_commonjs7(); var core_util_1 = require_commonjs4(); var core_util_2 = require_commonjs4(); var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); var BlobQueryResponse_js_1 = require_BlobQueryResponse(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var models_js_1 = require_models2(); var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); var Pipeline_js_1 = require_Pipeline(); var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); var Range_js_1 = require_Range(); var StorageClient_js_1 = require_StorageClient(); var Batch_js_1 = require_Batch(); var storage_common_1 = require_commonjs13(); var constants_js_1 = require_constants10(); var tracing_js_1 = require_tracing(); var utils_common_js_1 = require_utils_common(); var utils_js_1 = require_utils4(); var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); var BlobLeaseClient_js_1 = require_BlobLeaseClient(); var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { static { __name(this, "BlobClient"); } /** * blobContext provided by protocol layer. */ blobContext; _name; _containerName; _versionId; _snapshot; /** * The name of the blob. */ get name() { return this._name; } /** * The name of the storage container the blob is associated with. */ get containerName() { return this._containerName; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; let url; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; options = blobNameOrOptions; pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. * Provide "" will remove the snapshot and return a Client to the base blob. * * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ withSnapshot(snapshot) { return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. * Provide "" will remove the versionId and return a Client to the base blob. * * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ withVersion(versionId) { return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. * */ getAppendBlobClient() { return new AppendBlobClient(this.url, this.pipeline); } /** * Creates a BlockBlobClient object. * */ getBlockBlobClient() { return new BlockBlobClient(this.url, this.pipeline); } /** * Creates a PageBlobClient object. * */ getPageBlobClient() { return new PageBlobClient(this.url, this.pipeline); } /** * Reads or downloads a blob from the system, including its metadata and properties. * You can also call Get Blob to read a snapshot. * * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined * @param options - Optional options to Blob Download operation. * * * Example usage (Node.js): * * ```ts snippet:ReadmeSampleDownloadBlob_Node * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blobClient = containerClient.getBlobClient(blobName); * * // Get blob content from position 0 to the end * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody * const downloadBlockBlobResponse = await blobClient.download(); * if (downloadBlockBlobResponse.readableStreamBody) { * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); * console.log(`Downloaded blob content: ${downloaded}`); * } * * async function streamToString(stream: NodeJS.ReadableStream): Promise { * const result = await new Promise>((resolve, reject) => { * const chunks: Buffer[] = []; * stream.on("data", (data) => { * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); * }); * stream.on("end", () => { * resolve(Buffer.concat(chunks)); * }); * stream.on("error", reject); * }); * return result.toString(); * } * ``` * * Example usage (browser): * * ```ts snippet:ReadmeSampleDownloadBlob_Browser * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blobClient = containerClient.getBlobClient(blobName); * * // Get blob content from position 0 to the end * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody * const downloadBlockBlobResponse = await blobClient.download(); * const blobBody = await downloadBlockBlobResponse.blobBody; * if (blobBody) { * const downloaded = await blobBody.text(); * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, requestOptions: { onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); const wrappedRes = { ...res, _response: res._response, // _response is made non-enumerable objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) }; if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); } if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { ifMatch: options.conditions.ifMatch || res.etag, ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, ifTags: options.conditions?.tagConditions }, range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; return (await this.blobContext.download({ abortSignal: options.abortSignal, ...updatedDownloadOptions })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress }); }); } /** * Returns true if the Azure blob resource represented by this client exists; false otherwise. * * NOTE: use this function with care since an existing blob might be deleted by other clients or * applications. Vice versa new blobs might be added by other clients or applications after this * function completes. * * @param options - options to Exists operation. */ async exists(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, tracingOptions: updatedOptions.tracingOptions }); return true; } catch (e) { if (e.statusCode === 404) { return false; } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; } }); } /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which * will retain their original casing. * * @param options - Optional options to Get Properties operation. */ async getProperties(options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); return { ...res, _response: res._response, // _response is made non-enumerable objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) }; }); } /** * Marks the specified blob or snapshot for deletion. The blob is later deleted * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); return { succeeded: true, ...res, _response: res._response // _response is made non-enumerable }; } catch (e) { if (e.details?.errorCode === "BlobNotFound") { return { succeeded: false, ...e.response?.parsedHeaders, _response: e.response }; } throw e; } }); } /** * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets system properties on the blob. * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP * headers without a value will be cleared. * A common header to set is `blobContentType` * enabling the browser to provide functionality * based on file type. * @param options - Optional options to Blob Set HTTP Headers operation. */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets user-defined metadata for the specified blob as one or more name-value pairs. * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets tags on the underlying blob. * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. * Valid tag key and value characters include lower and upper case letters, digits (0-9), * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). * * @param tags - * @param options - */ async setTags(tags, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions, tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } /** * Gets the tags associated with the underlying blob. * * @param options - */ async getTags(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); const wrappedResponse = { ...response, _response: response._response, // _response is made non-enumerable tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} }; return wrappedResponse; }); } /** * Get a {@link BlobLeaseClient} that manages leases on the blob. * * @param proposeLeaseId - Initial proposed lease Id. * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Asynchronously copies a blob to a destination within the storage account. * This method returns a long running operation poller that allows you to wait * indefinitely until the copy is completed. * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. * Note that the onProgress callback will not be invoked if the operation completes in the first * request, and attempting to cancel a completed copy will result in an error being thrown. * * In version 2012-02-12 and later, the source for a Copy Blob operation can be * a committed blob in any Azure storage account. * Beginning with version 2015-02-21, the source for a Copy Blob operation can be * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * ```ts snippet:ClientsBeginCopyFromURL * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blobClient = containerClient.getBlobClient(blobName); * * // Example using automatic polling * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); * const automaticResult = await automaticCopyPoller.pollUntilDone(); * * // Example using manual polling * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); * while (!manualCopyPoller.isDone()) { * await manualCopyPoller.poll(); * } * const manualResult = manualCopyPoller.getResult(); * * // Example using progress updates * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); * }, * }); * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * * // Example using a changing polling interval (default 15 seconds) * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * * // Example using copy cancellation: * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError * cancelCopyPoller.getResult(); * } catch (err: any) { * if (err.name === "PollerCancelledError") { * console.log("The copy was cancelled."); * } * } * ``` * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, startCopyFromURLOptions: options }); await poller.poll(); return poller; } /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ async abortCopyFromURL(copyId, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions?.ifMatch, sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets the tier on a blob. The operation is allowed on a page blob in a premium * storage account and on a block blob in a blob storage account (locally redundant * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ async setAccessTier(tier, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { offset = typeof param1 === "number" ? param1 : 0; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); } if (count && count <= 0) { throw new RangeError("count option must be greater than 0"); } if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { const response = await this.getProperties({ ...options, tracingOptions: updatedOptions.tracingOptions }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } if (!buffer) { try { buffer = Buffer.alloc(count); } catch (error) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error.message}`); } } if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; if (off + blockSize < chunkEnd) { chunkEnd = off + blockSize; } const response = await this.download(off, chunkEnd - off, { abortSignal: options.abortSignal, conditions: options.conditions, maxRetryRequests: options.maxRetryRequestsPerBlock, customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); const stream = response.readableStreamBody; await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); } }); } await batch.do(); return buffer; }); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * * Downloads an Azure Blob to a local file. * Fails if the the given file path already exits. * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. * * @param filePath - * @param offset - From which position of the block blob to download. * @param count - How much data to be downloaded. Will download to the end when passing undefined. * @param options - Options to Blob download options. * @returns The response data for blob download operation, * but with readableStreamBody set to undefined since its * content is already read and written into a local file * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { const response = await this.download(offset, count, { ...options, tracingOptions: updatedOptions.tracingOptions }); if (response.readableStreamBody) { await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; }); } getBlobAndContainerNamesFromUrl() { let containerName; let blobName; try { const parsedUrl = new URL(this.url); if (parsedUrl.host.split(".")[1] === "blob") { const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; } else { const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; } containerName = decodeURIComponent(containerName); blobName = decodeURIComponent(blobName); blobName = blobName.replace(/\\/g, "/"); if (!containerName) { throw new Error("Provided containerName is invalid."); } return { blobName, containerName }; } catch (error) { throw new Error("Unable to extract blobName and containerName with provided information."); } } /** * Asynchronously copies a blob to a destination within the storage account. * In version 2012-02-12 and later, the source for a Copy Blob operation can be * a committed blob in any Azure storage account. * Beginning with version 2015-02-21, the source for a Copy Blob operation can be * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ async startCopyFromURL(copySource, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Only available for BlobClient constructed with a shared key credential. * * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId, ...options }, this.credential).toString(); resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** * Only available for BlobClient constructed with a shared key credential. * * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId, ...options }, this.credential).stringToSign; } /** * * Generates a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the input user delegation key. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { return new Promise((resolve) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** * Only available for BlobClient constructed with a shared key credential. * * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the input user delegation key. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasStringToSign(options, userDelegationKey) { return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId, ...options }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. * * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); } /** * Set immutability policy on the blob. * * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Set legal hold on the blob. * * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Get Account Information operation returns the sku name and account kind * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { static { __name(this, "AppendBlobClient"); } /** * appendBlobsContext provided by protocol layer. */ appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; options = blobNameOrOptions; pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url = urlOrConnectionString; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** * Creates a new AppendBlobClient object identical to the source but with the * specified snapshot timestamp. * Provide "" will remove the snapshot and return a Client to the base blob. * * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * * ```ts snippet:ClientsCreateAppendBlob * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { const conditions = { ifNoneMatch: constants_js_1.ETagAny }; return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { const res = (0, utils_common_js_1.assertResponse)(await this.create({ ...updatedOptions, conditions })); return { succeeded: true, ...res, _response: res._response // _response is made non-enumerable }; } catch (e) { if (e.details?.errorCode === "BlobAlreadyExists") { return { succeeded: false, ...e.response?.parsedHeaders, _response: e.response }; } throw e; } }); } /** * Seals the append blob, making it read only. * * @param options - */ async seal(options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. * @param options - Options to the Append Block operation. * * * Example usage: * * ```ts snippet:ClientsAppendBlock * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, requestOptions: { onUploadProgress: options.onProgress }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob * must either be public or must be authenticated via a shared access signature. If the source blob is * public, no authentication is required to perform the operation. * @param sourceOffset - Offset in source to be appended * @param count - Number of bytes to be appended as a block * @param options - */ async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions?.ifMatch, sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { static { __name(this, "BlockBlobClient"); } /** * blobContext provided by protocol layer. * * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. */ _blobContext; /** * blockBlobContext provided by protocol layer. */ blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; options = blobNameOrOptions; pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } /** * Creates a new BlockBlobClient object identical to the source but with the * specified snapshot timestamp. * Provide "" will remove the snapshot and return a URL to the base blob. * * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * * Quick query for a JSON or CSV formatted blob. * * Example usage (Node.js): * * ```ts snippet:ClientsQuery * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blockBlobClient = containerClient.getBlockBlobClient(blobName); * * // Query and convert a blob to a string * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); * if (queryBlockBlobResponse.readableStreamBody) { * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); * const downloaded = downloadedBuffer.toString(); * console.log(`Query blob content: ${downloaded}`); * } * * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); * readableStream.on("end", () => { * resolve(Buffer.concat(chunks)); * }); * readableStream.on("error", reject); * }); * } * ``` * * @param query - * @param options - */ async query(query, options = {}) { (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError }); }); } /** * Creates a new block blob, or updates the content of an existing block blob. * Updating an existing block blob overwrites any existing metadata on the blob. * Partial updates are not supported; the content of the existing blob is * overwritten with the new content. To perform a partial update of a block blob's, * use {@link stageBlock} and {@link commitBlockList}. * * This is a non-parallel uploading method, please use {@link uploadFile}, * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a * string including non non-Base64/Hex-encoded characters. * @param options - Options to the Block Blob Upload operation. * @returns Response data for the Block Blob Upload operation. * * Example usage: * * ```ts snippet:ClientsUpload * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blockBlobClient = containerClient.getBlockBlobClient(blobName); * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); } /** * Creates a new Block Blob where the contents of the blob are read from a given URL. * This API is supported beginning with the 2020-04-08 version. Partial updates * are not supported with Put Blob from URL; the content of an existing blob is overwritten with * the content of the new blob. To perform partial updates to a block blob’s contents using a * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. * * @param sourceURL - Specifies the URL of the blob. The value * may be a URL of up to 2 KB in length that specifies a blob. * The value should be URL-encoded as it would appear * in a request URI. The source blob must either be public * or must be authenticated via a shared access signature. * If the source blob is public, no authentication is required * to perform the operation. Here are some examples of source object URLs: * - https://myaccount.blob.core.windows.net/mycontainer/myblob * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Optional parameters. */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { ...options, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions?.ifMatch, sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, sourceIfTags: options.sourceConditions?.tagConditions }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), copySourceTags: options.copySourceTags, fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. * @param contentLength - Number of bytes to upload. * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ async stageBlock(blockId, body, contentLength, options = {}) { (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { onUploadProgress: options.onProgress }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value * may be a URL of up to 2 KB in length that specifies a blob. * The value should be URL-encoded as it would appear * in a request URI. The source blob must either be public * or must be authenticated via a shared access signature. * If the source blob is public, no authentication is required * to perform the operation. Here are some examples of source object URLs: * - https://myaccount.blob.core.windows.net/mycontainer/myblob * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Writes a blob by specifying the list of block IDs that make up the blob. * In order to be written as part of a blob, a block must have been successfully written * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); } /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ async getBlockList(listType, options = {}) { return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { res.committedBlocks = []; } if (!res.uncommittedBlocks) { res.uncommittedBlocks = []; } return res; }); } // High level functions /** * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. * * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} * to commit the block list. * * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is * `blobContentType`, enabling the browser to provide * functionality based on file type. * * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView * @param options - */ async uploadData(data, options = {}) { return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { if (core_util_1.isNodeLike) { let buffer; if (data instanceof Buffer) { buffer = data; } else if (data instanceof ArrayBuffer) { buffer = Buffer.from(data); } else { data = data; buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); } }); } /** * ONLY AVAILABLE IN BROWSERS. * * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. * * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call * {@link commitBlockList} to commit the block list. * * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is * `blobContentType`, enabling the browser to provide * functionality based on file type. * * @deprecated Use {@link uploadData} instead. * * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView * @param options - Options to upload browser data. * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); } /** * * Uploads data to block blob. Requires a bodyFactory as the data source, * which need to return a {@link HttpRequestBody} object with the offset and size provided. * * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} * to commit the block list. * * @param bodyFactory - * @param size - size of the data to upload. * @param options - Options to Upload to Block Blob operation. * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { let blockSize = options.blockSize ?? 0; if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; if (numBlocks > constants_js_1.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 <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; const contentLength = end - start; blockList.push(blockID); await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); } }); } await batch.do(); return this.commitBlockList(blockList, updatedOptions); }); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * * Uploads a local file in blocks to a block blob. * * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList * to commit the block list. * * @param filePath - Full path of local file * @param options - Options to Upload to Block Blob operation. * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); }, size, { ...options, tracingOptions: updatedOptions.tracingOptions }); }); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * * Uploads a Node.js Readable stream into block blob. * * PERFORMANCE IMPROVEMENT TIPS: * * Input stream highWaterMark is better to set a same value with bufferSize * parameter, which will avoid Buffer.concat() operations. * * @param stream - Node.js Readable stream * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, * positive correlation with max uploading concurrency. Default value is 5 * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; const scheduler = new storage_common_1.BufferScheduler( stream, bufferSize, maxConcurrency, async (body, length) => { const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); transferProgress += length; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); } }, // concurrency should set a smaller value than maxConcurrency, which is helpful to // reduce the possibility when a outgoing handler waits for stream data, in // this situation, outgoing handlers are blocked. // Outgoing queue shouldn't be empty. Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { ...options, tracingOptions: updatedOptions.tracingOptions })); }); } }; exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { static { __name(this, "PageBlobClient"); } /** * pageBlobsContext provided by protocol layer. */ pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; let url; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; options = blobNameOrOptions; pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url = urlOrConnectionString; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** * Creates a new PageBlobClient object identical to the source but with the * specified snapshot timestamp. * Provide "" will remove the snapshot and return a Client to the base blob. * * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ withSnapshot(snapshot) { return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. * @returns Response data for the Page Blob Create operation. */ async create(size, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, tier: (0, models_js_1.toAccessTier)(options.tier), blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { const conditions = { ifNoneMatch: constants_js_1.ETagAny }; const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { ...options, conditions, tracingOptions: updatedOptions.tracingOptions })); return { succeeded: true, ...res, _response: res._response // _response is made non-enumerable }; } catch (e) { if (e.details?.errorCode === "BlobAlreadyExists") { return { succeeded: false, ...e.response?.parsedHeaders, _response: e.response }; } throw e; } }); } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob * @param count - Content length of the body, also number of bytes to be uploaded * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, requestOptions: { onUploadProgress: options.onProgress }, range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob * @param destOffset - Offset of destination page blob * @param count - Number of bytes to be uploaded from source page blob * @param options - */ async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions?.ifMatch, sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. * @param options - Options to the Page Blob Clear Pages operation. * @returns Response data for the Page Blob Clear Pages operation. */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. * @returns Response data for the Page Blob Get Ranges operation. */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * getPageRangesSegment returns a single segment of page ranges starting from the * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ async listPageRangesSegment(offset = 0, count, marker, options = {}) { return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, range: (0, Range_js_1.rangeToString)({ offset, count }), marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of * the get of page ranges to be returned with the next getting operation. The * operation returns the ContinuationToken value within the response body if the * getting operation did not return all page ranges remaining within the current page. * The ContinuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of get * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { let getPageRangeItemSegmentsResponse; if (!!marker || marker === void 0) { do { getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); marker = getPageRangeItemSegmentsResponse.continuationToken; yield await getPageRangeItemSegmentsResponse; } while (marker); } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ async *listPageRangeItems(offset = 0, count, options = {}) { let marker; for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); } } /** * Returns an async iterable iterator to list of page ranges for a page blob. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * * ```ts snippet:ClientsListPageBlobs * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const pageBlobClient = containerClient.getPageBlobClient(blobName); * * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * * // Example using `iter.next()` syntax * i = 1; * const iter = pageBlobClient.listPageRanges(); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); * ({ value, done } = await iter.next()); * } * * // Example using `byPage()` syntax * i = 1; * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { * for (const pageRange of page.pageRange || []) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * * // Example using paging with a marker * i = 1; * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 page ranges * if (response.pageRange) { * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * // Prints 10 page ranges * if (response.pageRange) { * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. * @returns An asyncIterableIterator that supports paging. */ listPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; const iter = this.listPageRangeItems(offset, count, options); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { maxPageSize: settings.maxPageSize, ...options }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, prevsnapshot: prevSnapshot, range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** * getPageRangesDiffSegment returns a single segment of page ranges starting from the * specified Marker for difference between previous snapshot and the target page blob. * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options?.abortSignal, leaseAccessConditions: options?.conditions, modifiedAccessConditions: { ...options?.conditions, ifTags: options?.conditions?.tagConditions }, prevsnapshot: prevSnapshotOrUrl, range: (0, Range_js_1.rangeToString)({ offset, count }), marker, maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} * * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param marker - A string value that identifies the portion of * the get of page ranges to be returned with the next getting operation. The * operation returns the ContinuationToken value within the response body if the * getting operation did not return all page ranges remaining within the current page. * The ContinuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of get * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { let getPageRangeItemSegmentsResponse; if (!!marker || marker === void 0) { do { getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); marker = getPageRangeItemSegmentsResponse.continuationToken; yield await getPageRangeItemSegmentsResponse; } while (marker); } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { let marker; for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * * ```ts snippet:ClientsListPageBlobsDiff * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const pageBlobClient = containerClient.getPageBlobClient(blobName); * * const offset = 0; * const count = 1024; * const previousSnapshot = ""; * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * * // Example using `iter.next()` syntax * i = 1; * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); * ({ value, done } = await iter.next()); * } * * // Example using `byPage()` syntax * i = 1; * for await (const page of pageBlobClient * .listPageRangesDiff(offset, count, previousSnapshot) * .byPage({ maxPageSize: 20 })) { * for (const pageRange of page.pageRange || []) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * * // Example using paging with a marker * i = 1; * let iterator = pageBlobClient * .listPageRangesDiff(offset, count, previousSnapshot) * .byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 page ranges * if (response.pageRange) { * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = pageBlobClient * .listPageRangesDiff(offset, count, previousSnapshot) * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * // Prints 10 page ranges * if (response.pageRange) { * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Ranges operation. * @returns An asyncIterableIterator that supports paging. */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { ...options }); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { maxPageSize: settings.maxPageSize, ...options }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, prevSnapshotUrl, range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. * @returns Response data for the Page Blob Resize operation. */ async resize(size, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets a page blob's sequence number. * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ async startCopyIncremental(copySource, options = {}) { return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, modifiedAccessConditions: { ...options.conditions, ifTags: options.conditions?.tagConditions }, tracingOptions: updatedOptions.tracingOptions })); }); } }; exports2.PageBlobClient = PageBlobClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js var require_BatchUtils = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBodyAsText = getBodyAsText; exports2.utf8ByteLength = utf8ByteLength; var utils_js_1 = require_utils4(); var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); buffer = buffer.slice(0, responseLength); return buffer.toString(); } __name(getBodyAsText, "getBodyAsText"); function utf8ByteLength(str) { return Buffer.byteLength(str); } __name(utf8ByteLength, "utf8ByteLength"); } }); // node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js var require_BatchResponseParser = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchResponseParser = void 0; var core_rest_pipeline_1 = require_commonjs6(); var core_http_compat_1 = require_commonjs9(); var constants_js_1 = require_constants10(); var BatchUtils_js_1 = require_BatchUtils(); var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { static { __name(this, "BatchResponseParser"); } batchResponse; responseBatchBoundary; perResponsePrefix; batchResponseEnding; subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); } if (!subRequests || subRequests.size === 0) { throw new RangeError("Invalid state: subRequests is not provided or size is 0."); } this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); } const deserializedSubResponses = new Array(subResponseCount); let subResponsesSucceededCount = 0; let subResponsesFailedCount = 0; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); } continue; } if (responseLine.trim() === "") { if (!subRespHeaderEndFound) { subRespHeaderEndFound = true; } continue; } if (!subRespHeaderEndFound) { if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } } else { if (!deserializedSubResponse.bodyAsText) { deserializedSubResponse.bodyAsText = ""; } deserializedSubResponse.bodyAsText += responseLine; } } if (contentId !== NOT_FOUND && Number.isInteger(contentId) && contentId >= 0 && contentId < this.subRequests.size && deserializedSubResponses[contentId] === void 0) { deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; } else { subResponsesSucceededCount++; } } return { subResponses: deserializedSubResponses, subResponsesSucceededCount, subResponsesFailedCount }; } }; exports2.BatchResponseParser = BatchResponseParser; } }); // node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js var require_Mutex = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; MutexLockStatus2[MutexLockStatus2["UNLOCKED"] = 1] = "UNLOCKED"; })(MutexLockStatus || (MutexLockStatus = {})); var Mutex = class { static { __name(this, "Mutex"); } /** * Lock for a specific key. If the lock has been acquired by another customer, then * will wait until getting the lock. * * @param key - lock key */ static async lock(key) { return new Promise((resolve) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; resolve(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; resolve(); }); } }); } /** * Unlock a key. * * @param key - */ static async unlock(key) { return new Promise((resolve) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; resolve(); }); } static keys = {}; static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; } else { this.listeners[key].push(handler); } } static emitUnlockEvent(key) { if (this.listeners[key] !== void 0 && this.listeners[key].length > 0) { const handler = this.listeners[key].shift(); setImmediate(() => { handler.call(this); }); } } }; exports2.Mutex = Mutex; } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js var require_BlobBatch = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobBatch = void 0; var core_util_1 = require_commonjs4(); var core_auth_1 = require_commonjs7(); var core_rest_pipeline_1 = require_commonjs6(); var core_util_2 = require_commonjs4(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var Clients_js_1 = require_Clients(); var Mutex_js_1 = require_Mutex(); var Pipeline_js_1 = require_Pipeline(); var utils_common_js_1 = require_utils_common(); var core_xml_1 = require_commonjs10(); var constants_js_1 = require_constants10(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var tracing_js_1 = require_tracing(); var core_client_1 = require_commonjs8(); var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { static { __name(this, "BlobBatch"); } batchRequest; batch = "batch"; batchType; constructor() { this.batchRequest = new InnerBatchRequest(); } /** * Get the value of Content-Type for a batch request. * The value must be multipart/mixed with a batch boundary. * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 */ getMultiPartContentType() { return this.batchRequest.getMultipartContentType(); } /** * Get assembled HTTP request body for sub requests. */ getHttpRequestBody() { return this.batchRequest.getHttpRequestBody(); } /** * Get sub requests that are added into the batch request. */ getSubRequests() { return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { if (!this.batchType) { this.batchType = batchType; } if (this.batchType !== batchType) { throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { let url; let credential; if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { url = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); } if (!options) { options = {}; } return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ url, credential }, async () => { await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { let url; let credential; let tier; if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { url = urlOrBlobClient; credential = credentialOrTier; tier = tierOrOptions; } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); } if (!options) { options = {}; } return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ url, credential }, async () => { await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { static { __name(this, "InnerBatchRequest"); } operationCount; body; subRequests; boundary; subRequestPrefix; multipartContentType; batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); } /** * Create pipeline to assemble sub requests. The idea here is to use existing * credential and serialization/deserialization components, with additional policies to * filter unnecessary headers, assemble sub requests into request's body * and intercept request from going to wire. * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" } } }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); if ((0, core_auth_1.isTokenCredential)(credential)) { corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, scopes: constants_js_1.StorageOAuthScopes, challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; } appendSubRequestToBody(request) { this.body += [ this.subRequestPrefix, // sub request constant prefix `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } const path2 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path2 || path2 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } postAddSubRequest(subRequest) { this.subRequests.set(this.operationCount, subRequest); this.operationCount++; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; } getSubRequests() { return this.subRequests; } }; function batchRequestAssemblePolicy(batchRequest) { return { name: "batchRequestAssemblePolicy", async sendRequest(request) { batchRequest.appendSubRequestToBody(request); return { request, status: 200, headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; } __name(batchRequestAssemblePolicy, "batchRequestAssemblePolicy"); function batchHeaderFilterPolicy() { return { name: "batchHeaderFilterPolicy", async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } if (xMsHeaderName !== "") { request.headers.delete(xMsHeaderName); } return next(request); } }; } __name(batchHeaderFilterPolicy, "batchHeaderFilterPolicy"); } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js var require_BlobBatchClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobBatchClient = void 0; var BatchResponseParser_js_1 = require_BatchResponseParser(); var BatchUtils_js_1 = require_BatchUtils(); var BlobBatch_js_1 = require_BlobBatch(); var tracing_js_1 = require_tracing(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var StorageContextClient_js_1 = require_StorageContextClient(); var Pipeline_js_1 = require_Pipeline(); var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { static { __name(this, "BlobBatchClient"); } serviceOrContainerContext; constructor(url, credentialOrPipeline, options) { let pipeline; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); const path2 = (0, utils_common_js_1.getURLPath)(url); if (path2 && path2 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; } } /** * Creates a {@link BlobBatch}. * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); } else { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); } } return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); } else { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); } } return this.submitBatch(batch); } /** * Submit batch request which consists of multiple subrequests. * * Get `blobBatchClient` and other details before running the snippets. * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` * * Example usage: * * ```ts snippet:BlobBatchClientSubmitBatch * import { DefaultAzureCredential } from "@azure/identity"; * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; * * const account = ""; * const credential = new DefaultAzureCredential(); * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * credential, * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blobBatchClient = containerClient.getBlobBatchClient(); * * const batchRequest = new BlobBatch(); * await batchRequest.deleteBlob("", credential); * await batchRequest.deleteBlob("", credential, { * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * * Example using a lease: * * ```ts snippet:BlobBatchClientSubmitBatchWithLease * import { DefaultAzureCredential } from "@azure/identity"; * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; * * const account = ""; * const credential = new DefaultAzureCredential(); * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * credential, * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blobBatchClient = containerClient.getBlobBatchClient(); * const blobClient = containerClient.getBlobClient(""); * * const batchRequest = new BlobBatch(); * await batchRequest.setBlobAccessTier(blobClient, "Cool"); * await batchRequest.setBlobAccessTier(blobClient, "Cool", { * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - */ async submitBatch(batchRequest, options = {}) { if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { ...updatedOptions })); const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, contentType: rawBatchResponse.contentType, errorCode: rawBatchResponse.errorCode, requestId: rawBatchResponse.requestId, clientRequestId: rawBatchResponse.clientRequestId, version: rawBatchResponse.version, subResponses: responseSummary.subResponses, subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, subResponsesFailedCount: responseSummary.subResponsesFailedCount }; return res; }); } }; exports2.BlobBatchClient = BlobBatchClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js var require_ContainerClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ContainerClient = void 0; var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var core_auth_1 = require_commonjs7(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var Pipeline_js_1 = require_Pipeline(); var StorageClient_js_1 = require_StorageClient(); var tracing_js_1 = require_tracing(); var utils_common_js_1 = require_utils_common(); var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); var BlobLeaseClient_js_1 = require_BlobLeaseClient(); var Clients_js_1 = require_Clients(); var BlobBatchClient_js_1 = require_BlobBatchClient(); var ContainerClient = class extends StorageClient_js_1.StorageClient { static { __name(this, "ContainerClient"); } /** * containerContext provided by protocol layer. */ containerContext; _containerName; /** * The name of the container. */ get containerName() { return this._containerName; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; let url; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url = urlOrConnectionString; pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url = urlOrConnectionString; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. * * * Example usage: * * ```ts snippet:ContainerClientCreate * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); return { succeeded: true, ...res, _response: res._response // _response is made non-enumerable }; } catch (e) { if (e.details?.errorCode === "ContainerAlreadyExists") { return { succeeded: false, ...e.response?.parsedHeaders, _response: e.response }; } else { throw e; } } }); } /** * Returns true if the Azure container resource represented by this client exists; false otherwise. * * NOTE: use this function with care since an existing container might be deleted by other clients or * applications. Vice versa new containers with the same name might be added by other clients or * applications after this function completes. * * @param options - */ async exists(options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions }); return true; } catch (e) { if (e.statusCode === 404) { return false; } throw e; } }); } /** * Creates a {@link BlobClient} * * @param blobName - A blob name * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} * * @param blobName - An append blob name */ getAppendBlobClient(blobName) { return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} * * @param blobName - A block blob name * * * Example usage: * * ```ts snippet:ClientsUpload * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const blobName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * const blockBlobClient = containerClient.getBlockBlobClient(blobName); * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} * * @param blobName - A page blob name */ getPageBlobClient(blobName) { return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which * will retain their original casing. * * @param options - Options to Container Get Properties operation. */ async getProperties(options = {}) { if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ abortSignal: options.abortSignal, ...options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async delete(options = {}) { if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); return { succeeded: true, ...res, _response: res._response }; } catch (e) { if (e.details?.errorCode === "ContainerNotFound") { return { succeeded: false, ...e.response?.parsedHeaders, _response: e.response }; } throw e; } }); } /** * Sets one or more user-defined name-value pairs for the specified container. * * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Gets the permissions for the specified container. The permissions indicate * whether container data may be accessed publicly. * * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ async getAccessPolicy(options = {}) { if (!options.conditions) { options.conditions = {}; } return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); const res = { _response: response._response, blobPublicAccess: response.blobPublicAccess, date: response.date, etag: response.etag, errorCode: response.errorCode, lastModified: response.lastModified, requestId: response.requestId, clientRequestId: response.clientRequestId, signedIdentifiers: [], version: response.version }; for (const identifier of response) { let accessPolicy = void 0; if (identifier.accessPolicy) { accessPolicy = { permissions: identifier.accessPolicy.permissions }; if (identifier.accessPolicy.expiresOn) { accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); } if (identifier.accessPolicy.startsOn) { accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); } } res.signedIdentifiers.push({ accessPolicy, id: identifier.id }); } return res; }); } /** * Sets the permissions for the specified container. The permissions indicate * whether blobs in a container may be accessed publicly. * * When you set permissions for a container, the existing permissions are replaced. * If no access or containerAcl provided, the existing container ACL will be * removed. * * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Get a {@link BlobLeaseClient} that manages leases on the container. * * @param proposeLeaseId - Initial proposed lease Id. * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. * * Updating an existing block blob overwrites any existing metadata on the blob. * Partial updates are not supported; the content of the existing blob is * overwritten with the new content. To perform a partial update of a block blob's, * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. * * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a * string including non non-Base64/Hex-encoded characters. * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ async uploadBlockBlob(blobName, body, contentLength, options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response }; }); } /** * Marks the specified blob or snapshot for deletion. The blob is later deleted * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); } return blobClient.delete(updatedOptions); }); } /** * listBlobFlatSegment returns a single segment of blobs starting from the * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ async listBlobFlatSegment(marker, options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ marker, ...options, tracingOptions: updatedOptions.tracingOptions })); const wrappedResponse = { ...response, _response: { ...response._response, parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) }, // _response is made non-enumerable segment: { ...response.segment, blobItems: response.segment.blobItems.map((blobItemInternal) => { const blobItem = { ...blobItemInternal, name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) }; return blobItem; }) } }; return wrappedResponse; }); } /** * listBlobHierarchySegment returns a single segment of blobs starting from * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ async listBlobHierarchySegment(delimiter, marker, options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { marker, ...options, tracingOptions: updatedOptions.tracingOptions })); const wrappedResponse = { ...response, _response: { ...response._response, parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) }, // _response is made non-enumerable segment: { ...response.segment, blobItems: response.segment.blobItems.map((blobItemInternal) => { const blobItem = { ...blobItemInternal, name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) }; return blobItem; }), blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { const blobPrefix = { ...blobPrefixInternal, name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) }; return blobPrefix; }) } }; return wrappedResponse; }); } /** * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse * * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the ContinuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The ContinuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ async *listSegments(marker, options = {}) { let listBlobsFlatSegmentResponse; if (!!marker || marker === void 0) { do { listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); marker = listBlobsFlatSegmentResponse.continuationToken; yield await listBlobsFlatSegmentResponse; } while (marker); } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ async *listItems(options = {}) { let marker; for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { yield* listBlobsFlatSegmentResponse.segment.blobItems; } } /** * Returns an async iterable iterator to list all the blobs * under the specified account. * * .byPage() returns an async iterable iterator to list the blobs in pages. * * ```ts snippet:ReadmeSampleListBlobs_Multiple * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * * // Example using `for await` syntax * let i = 1; * const blobs = containerClient.listBlobsFlat(); * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * * // Example using `iter.next()` syntax * i = 1; * const iter = containerClient.listBlobsFlat(); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Blob ${i++}: ${value.name}`); * ({ value, done } = await iter.next()); * } * * // Example using `byPage()` syntax * i = 1; * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { * for (const blob of page.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * * // Example using paging with a marker * i = 1; * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 blob names * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * // Prints 10 blob names * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` * * @param options - Options to list blobs. * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { const include = []; if (options.includeCopy) { include.push("copy"); } if (options.includeDeleted) { include.push("deleted"); } if (options.includeMetadata) { include.push("metadata"); } if (options.includeSnapshots) { include.push("snapshots"); } if (options.includeVersions) { include.push("versions"); } if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } if (options.includeTags) { include.push("tags"); } if (options.includeDeletedWithVersions) { include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { include.push("immutabilitypolicy"); } if (options.includeLegalHold) { include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } const updatedOptions = { ...options, ...include.length > 0 ? { include } : {} }; const iter = this.listItems(updatedOptions); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.listSegments(settings.continuationToken, { maxPageSize: settings.maxPageSize, ...updatedOptions }); } }; } /** * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the ContinuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The ContinuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ async *listHierarchySegments(delimiter, marker, options = {}) { let listBlobsHierarchySegmentResponse; if (!!marker || marker === void 0) { do { listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); marker = listBlobsHierarchySegmentResponse.continuationToken; yield await listBlobsHierarchySegmentResponse; } while (marker); } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ async *listItemsByHierarchy(delimiter, options = {}) { let marker; for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { const segment = listBlobsHierarchySegmentResponse.segment; if (segment.blobPrefixes) { for (const prefix of segment.blobPrefixes) { yield { kind: "prefix", ...prefix }; } } for (const blob of segment.blobItems) { yield { kind: "blob", ...blob }; } } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. * under the specified account. * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * * ```ts snippet:ReadmeSampleListBlobsByHierarchy * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * * // Example using `for await` syntax * let i = 1; * const blobs = containerClient.listBlobsByHierarchy("/"); * for await (const blob of blobs) { * if (blob.kind === "prefix") { * console.log(`\tBlobPrefix: ${blob.name}`); * } else { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } * * // Example using `iter.next()` syntax * i = 1; * const iter = containerClient.listBlobsByHierarchy("/"); * let { value, done } = await iter.next(); * while (!done) { * if (value.kind === "prefix") { * console.log(`\tBlobPrefix: ${value.name}`); * } else { * console.log(`\tBlobItem: name - ${value.name}`); * } * ({ value, done } = await iter.next()); * } * * // Example using `byPage()` syntax * i = 1; * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } * for (const blob of page.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } * * // Example using paging with a marker * i = 1; * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 blob names * if (response.blobPrefixes) { * for (const prefix of response.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = containerClient * .listBlobsByHierarchy("/") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * // Prints 10 blob names * if (response.blobPrefixes) { * for (const prefix of response.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ listBlobsByHierarchy(delimiter, options = {}) { if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } const include = []; if (options.includeCopy) { include.push("copy"); } if (options.includeDeleted) { include.push("deleted"); } if (options.includeMetadata) { include.push("metadata"); } if (options.includeSnapshots) { include.push("snapshots"); } if (options.includeVersions) { include.push("versions"); } if (options.includeUncommitedBlobs) { include.push("uncommittedblobs"); } if (options.includeTags) { include.push("tags"); } if (options.includeDeletedWithVersions) { include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { include.push("immutabilitypolicy"); } if (options.includeLegalHold) { include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } const updatedOptions = { ...options, ...include.length > 0 ? { include } : {} }; const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol */ async next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.listHierarchySegments(delimiter, settings.continuationToken, { maxPageSize: settings.maxPageSize, ...updatedOptions }); } }; } /** * The Filter Blobs operation enables callers to list blobs in the container whose tags * match a given search expression. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); const wrappedResponse = { ...response, _response: response._response, // _response is made non-enumerable blobs: response.blobs.map((blob) => { let tagValue = ""; if (blob.tags?.blobTagSet.length === 1) { tagValue = blob.tags.blobTagSet[0].value; } return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; }) }; return wrappedResponse; }); } /** * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { let response; if (!!marker || marker === void 0) { do { response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); response.blobs = response.blobs || []; marker = response.continuationToken; yield response; } while (marker); } } /** * Returns an AsyncIterableIterator for blobs. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { let marker; for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { yield* segment.blobs; } } /** * Returns an async iterable iterator to find all blobs with specified tag * under the specified container. * * .byPage() returns an async iterable iterator to list the blobs in pages. * * Example using `for await` syntax: * * ```ts snippet:ReadmeSampleFindBlobsByTags * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerName = ""; * const containerClient = blobServiceClient.getContainerClient(containerName); * * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } * * // Example using `iter.next()` syntax * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Blob ${i++}: ${value.name}`); * ({ value, done } = await iter.next()); * } * * // Example using `byPage()` syntax * i = 1; * for await (const page of containerClient * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ maxPageSize: 20 })) { * for (const blob of page.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * * // Example using paging with a marker * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = containerClient * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { const listSegmentOptions = { ...options }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { maxPageSize: settings.maxPageSize, ...listSegmentOptions }); } }; } /** * The Get Account Information operation returns the sku name and account kind * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } getContainerNameFromUrl() { let containerName; try { const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; } containerName = decodeURIComponent(containerName); if (!containerName) { throw new Error("Provided containerName is invalid."); } return containerName; } catch (error) { throw new Error("Unable to extract containerName with provided information."); } } /** * Only available for ContainerClient constructed with a shared key credential. * * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, this.credential).toString(); resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** * Only available for ContainerClient constructed with a shared key credential. * * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ containerName: this._containerName, ...options }, this.credential).stringToSign; } /** * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the input user delegation key. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { return new Promise((resolve) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasStringToSign(options, userDelegationKey) { return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; exports2.ContainerClient = ContainerClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js var require_AccountSASPermissions = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { static { __name(this, "AccountSASPermissions"); } /** * Parse initializes the AccountSASPermissions fields from a string. * * @param permissions - */ static parse(permissions) { const accountSASPermissions = new _AccountSASPermissions(); for (const c of permissions) { switch (c) { case "r": accountSASPermissions.read = true; break; case "w": accountSASPermissions.write = true; break; case "d": accountSASPermissions.delete = true; break; case "x": accountSASPermissions.deleteVersion = true; break; case "l": accountSASPermissions.list = true; break; case "a": accountSASPermissions.add = true; break; case "c": accountSASPermissions.create = true; break; case "u": accountSASPermissions.update = true; break; case "p": accountSASPermissions.process = true; break; case "t": accountSASPermissions.tag = true; break; case "f": accountSASPermissions.filter = true; break; case "i": accountSASPermissions.setImmutabilityPolicy = true; break; case "y": accountSASPermissions.permanentDelete = true; break; default: throw new RangeError(`Invalid permission character: ${c}`); } } return accountSASPermissions; } /** * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it * and boolean values for them. * * @param permissionLike - */ static from(permissionLike) { const accountSASPermissions = new _AccountSASPermissions(); if (permissionLike.read) { accountSASPermissions.read = true; } if (permissionLike.write) { accountSASPermissions.write = true; } if (permissionLike.delete) { accountSASPermissions.delete = true; } if (permissionLike.deleteVersion) { accountSASPermissions.deleteVersion = true; } if (permissionLike.filter) { accountSASPermissions.filter = true; } if (permissionLike.tag) { accountSASPermissions.tag = true; } if (permissionLike.list) { accountSASPermissions.list = true; } if (permissionLike.add) { accountSASPermissions.add = true; } if (permissionLike.create) { accountSASPermissions.create = true; } if (permissionLike.update) { accountSASPermissions.update = true; } if (permissionLike.process) { accountSASPermissions.process = true; } if (permissionLike.setImmutabilityPolicy) { accountSASPermissions.setImmutabilityPolicy = true; } if (permissionLike.permanentDelete) { accountSASPermissions.permanentDelete = true; } return accountSASPermissions; } /** * Permission to read resources and list queues and tables granted. */ read = false; /** * Permission to write resources granted. */ write = false; /** * Permission to delete blobs and files granted. */ delete = false; /** * Permission to delete versions granted. */ deleteVersion = false; /** * Permission to list blob containers, blobs, shares, directories, and files granted. */ list = false; /** * Permission to add messages, table entities, and append to blobs granted. */ add = false; /** * Permission to create blobs and files granted. */ create = false; /** * Permissions to update messages and table entities granted. */ update = false; /** * Permission to get and delete messages granted. */ process = false; /** * Specfies Tag access granted. */ tag = false; /** * Permission to filter blobs. */ filter = false; /** * Permission to set immutability policy. */ setImmutabilityPolicy = false; /** * Specifies that Permanent Delete is permitted. */ permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. * * Using this method will guarantee the resource types are in * an order accepted by the service. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { const permissions = []; if (this.read) { permissions.push("r"); } if (this.write) { permissions.push("w"); } if (this.delete) { permissions.push("d"); } if (this.deleteVersion) { permissions.push("x"); } if (this.filter) { permissions.push("f"); } if (this.tag) { permissions.push("t"); } if (this.list) { permissions.push("l"); } if (this.add) { permissions.push("a"); } if (this.create) { permissions.push("c"); } if (this.update) { permissions.push("u"); } if (this.process) { permissions.push("p"); } if (this.setImmutabilityPolicy) { permissions.push("i"); } if (this.permanentDelete) { permissions.push("y"); } return permissions.join(""); } }; exports2.AccountSASPermissions = AccountSASPermissions; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js var require_AccountSASResourceTypes = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { static { __name(this, "AccountSASResourceTypes"); } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. * * @param resourceTypes - */ static parse(resourceTypes) { const accountSASResourceTypes = new _AccountSASResourceTypes(); for (const c of resourceTypes) { switch (c) { case "s": accountSASResourceTypes.service = true; break; case "c": accountSASResourceTypes.container = true; break; case "o": accountSASResourceTypes.object = true; break; default: throw new RangeError(`Invalid resource type: ${c}`); } } return accountSASResourceTypes; } /** * Permission to access service level APIs granted. */ service = false; /** * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. */ container = false; /** * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. */ object = false; /** * Converts the given resource types to a string. * * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { const resourceTypes = []; if (this.service) { resourceTypes.push("s"); } if (this.container) { resourceTypes.push("c"); } if (this.object) { resourceTypes.push("o"); } return resourceTypes.join(""); } }; exports2.AccountSASResourceTypes = AccountSASResourceTypes; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js var require_AccountSASServices = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { static { __name(this, "AccountSASServices"); } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. * * @param services - */ static parse(services) { const accountSASServices = new _AccountSASServices(); for (const c of services) { switch (c) { case "b": accountSASServices.blob = true; break; case "f": accountSASServices.file = true; break; case "q": accountSASServices.queue = true; break; case "t": accountSASServices.table = true; break; default: throw new RangeError(`Invalid service character: ${c}`); } } return accountSASServices; } /** * Permission to access blob resources granted. */ blob = false; /** * Permission to access file resources granted. */ file = false; /** * Permission to access queue resources granted. */ queue = false; /** * Permission to access table resources granted. */ table = false; /** * Converts the given services to a string. * */ toString() { const services = []; if (this.blob) { services.push("b"); } if (this.table) { services.push("t"); } if (this.queue) { services.push("q"); } if (this.file) { services.push("f"); } return services.join(""); } }; exports2.AccountSASServices = AccountSASServices; } }); // node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js var require_AccountSASSignatureValues = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; var AccountSASPermissions_js_1 = require_AccountSASPermissions(); var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); var AccountSASServices_js_1 = require_AccountSASServices(); var SasIPRange_js_1 = require_SasIPRange(); var SASQueryParameters_js_1 = require_SASQueryParameters(); var constants_js_1 = require_constants10(); var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } __name(generateAccountSASQueryParameters, "generateAccountSASQueryParameters"); function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character ].join("\n"); } else { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } __name(generateAccountSASQueryParametersInternal, "generateAccountSASQueryParametersInternal"); } }); // node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js var require_BlobServiceClient = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BlobServiceClient = void 0; var core_auth_1 = require_commonjs7(); var core_rest_pipeline_1 = require_commonjs6(); var core_util_1 = require_commonjs4(); var Pipeline_js_1 = require_Pipeline(); var ContainerClient_js_1 = require_ContainerClient(); var utils_common_js_1 = require_utils_common(); var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); var AnonymousCredential_js_1 = require_AnonymousCredential(); var utils_common_js_2 = require_utils_common(); var tracing_js_1 = require_tracing(); var BlobBatchClient_js_1 = require_BlobBatchClient(); var StorageClient_js_1 = require_StorageClient(); var AccountSASPermissions_js_1 = require_AccountSASPermissions(); var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); var AccountSASServices_js_1 = require_AccountSASServices(); var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { static { __name(this, "BlobServiceClient"); } /** * serviceContext provided by protocol layer. */ serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. * * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. * [ Note - Account connection string can only be used in NODE.JS runtime. ] * Account connection string example - * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` * SAS connection string example - * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` * @param options - Optional. Options to configure the HTTP pipeline. */ static fromConnectionString(connectionString, options) { options = options || {}; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { if (core_util_1.isNodeLike) { const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } constructor(url, credentialOrPipeline, options) { let pipeline; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** * Creates a {@link ContainerClient} object * * @param containerName - A container name * @returns A new ContainerClient object for the given container name. * * Example usage: * * ```ts snippet:BlobServiceClientGetContainerClient * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { containerClient, containerCreateResponse }; }); } /** * Deletes a Blob container. * * @param containerName - Name of the container to delete. * @param options - Options to configure Container Delete operation. * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); } /** * Restore a previously deleted Blob container. * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. * * @param deletedContainerName - Name of the previously deleted container. * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ deletedContainerName, deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Get Account Information operation returns the sku name and account kind * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Returns a list of the containers under the specified account. * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all containers remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ async listContainersSegment(marker, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ abortSignal: options.abortSignal, marker, ...options, include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions })); }); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags * match a given search expression. Filter blobs searches across all containers within a * storage account but can be scoped within the expression to a single container. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); const wrappedResponse = { ...response, _response: response._response, // _response is made non-enumerable blobs: response.blobs.map((blob) => { let tagValue = ""; if (blob.tags?.blobTagSet.length === 1) { tagValue = blob.tags.blobTagSet[0].value; } return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; }) }; return wrappedResponse; }); } /** * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param marker - A string value that identifies the portion of * the list of blobs to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all blobs remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { let response; if (!!marker || marker === void 0) { do { response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); response.blobs = response.blobs || []; marker = response.continuationToken; yield response; } while (marker); } } /** * Returns an AsyncIterableIterator for blobs. * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { let marker; for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { yield* segment.blobs; } } /** * Returns an async iterable iterator to find all blobs with specified tag * under the specified account. * * .byPage() returns an async iterable iterator to list the blobs in pages. * * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * ```ts snippet:BlobServiceClientFindBlobsByTags * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } * * // Use iter.next() to iterate the blobs * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Blob ${i++}: ${value.name}`); * ({ value, done } = await iter.next()); * } * * // Use byPage() to iterate the blobs * i = 1; * for await (const page of blobServiceClient * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ maxPageSize: 20 })) { * for (const blob of page.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * * // Use paging with a marker * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = blobServiceClient * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` * * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. * The given expression must evaluate to true for a blob to be returned in the results. * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { const listSegmentOptions = { ...options }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { maxPageSize: settings.maxPageSize, ...listSegmentOptions }); } }; } /** * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The * operation returns the continuationToken value within the response body if the * listing operation did not return all containers remaining to be listed * with the current page. The continuationToken value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ async *listSegments(marker, options = {}) { let listContainersSegmentResponse; if (!!marker || marker === void 0) { do { listContainersSegmentResponse = await this.listContainersSegment(marker, options); listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; marker = listContainersSegmentResponse.continuationToken; yield await listContainersSegmentResponse; } while (marker); } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ async *listItems(options = {}) { let marker; for await (const segment of this.listSegments(marker, options)) { yield* segment.containerItems; } } /** * Returns an async iterable iterator to list all the containers * under the specified account. * * .byPage() returns an async iterable iterator to list the containers in pages. * * ```ts snippet:BlobServiceClientListContainers * import { BlobServiceClient } from "@azure/storage-blob"; * import { DefaultAzureCredential } from "@azure/identity"; * * const account = ""; * const blobServiceClient = new BlobServiceClient( * `https://${account}.blob.core.windows.net`, * new DefaultAzureCredential(), * ); * * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } * * // Use iter.next() to iterate the containers * i = 1; * const iter = blobServiceClient.listContainers(); * let { value, done } = await iter.next(); * while (!done) { * console.log(`Container ${i++}: ${value.name}`); * ({ value, done } = await iter.next()); * } * * // Use byPage() to iterate the containers * i = 1; * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { * for (const container of page.containerItems) { * console.log(`Container ${i++}: ${container.name}`); * } * } * * // Use paging with a marker * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * * // Prints 2 container names * if (response.containerItems) { * for (const container of response.containerItems) { * console.log(`Container ${i++}: ${container.name}`); * } * } * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken * iterator = blobServiceClient * .listContainers() * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; * * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` * * @param options - Options to list containers. * @returns An asyncIterableIterator that supports paging. */ listContainers(options = {}) { if (options.prefix === "") { options.prefix = void 0; } const include = []; if (options.includeDeleted) { include.push("deleted"); } if (options.includeMetadata) { include.push("metadata"); } if (options.includeSystem) { include.push("system"); } const listSegmentOptions = { ...options, ...include.length > 0 ? { include } : {} }; const iter = this.listItems(listSegmentOptions); return { /** * The next method, part of the iteration protocol */ next() { return iter.next(); }, /** * The connection to the async iterator, part of the iteration protocol */ [Symbol.asyncIterator]() { return this; }, /** * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { return this.listSegments(settings.continuationToken, { maxPageSize: settings.maxPageSize, ...listSegmentOptions }); } }; } /** * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). * * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ async getUserDelegationKey(startsOn, expiresOn, options = {}) { return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); const userDelegationKey = { signedObjectId: response.signedObjectId, signedTenantId: response.signedTenantId, signedStartsOn: new Date(response.signedStartsOn), signedExpiresOn: new Date(response.signedExpiresOn), signedService: response.signedService, signedVersion: response.signedVersion, value: response.value }; const res = { _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode, ...userDelegationKey }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. * * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. * @param resourceTypes - Specifies the resource types associated with the shared access signature. * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); expiresOn = new Date(now.getTime() + 3600 * 1e3); } const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, expiresOn, resourceTypes, services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), ...options }, this.credential).toString(); return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. * * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. * @param resourceTypes - Specifies the resource types associated with the shared access signature. * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); expiresOn = new Date(now.getTime() + 3600 * 1e3); } return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, expiresOn, resourceTypes, services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), ...options }, this.credential).stringToSign; } }; exports2.BlobServiceClient = BlobServiceClient; } }); // node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js var require_BatchResponse = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js var require_generatedModels = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.KnownEncryptionAlgorithmType = void 0; var KnownEncryptionAlgorithmType; (function(KnownEncryptionAlgorithmType2) { KnownEncryptionAlgorithmType2["AES256"] = "AES256"; })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); } }); // node_modules/@azure/storage-blob/dist/commonjs/index.js var require_commonjs15 = __commonJS({ "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var core_rest_pipeline_1 = require_commonjs6(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return core_rest_pipeline_1.RestError; } }); tslib_1.__exportStar(require_BlobServiceClient(), exports2); tslib_1.__exportStar(require_Clients(), exports2); tslib_1.__exportStar(require_ContainerClient(), exports2); tslib_1.__exportStar(require_BlobLeaseClient(), exports2); tslib_1.__exportStar(require_AccountSASPermissions(), exports2); tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); tslib_1.__exportStar(require_AccountSASServices(), exports2); var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } }); tslib_1.__exportStar(require_BlobBatch(), exports2); tslib_1.__exportStar(require_BlobBatchClient(), exports2); tslib_1.__exportStar(require_BatchResponse(), exports2); tslib_1.__exportStar(require_BlobSASPermissions(), exports2); var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; } }); tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); tslib_1.__exportStar(require_AnonymousCredential(), exports2); tslib_1.__exportStar(require_Credential(), exports2); tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); var models_js_1 = require_models2(); Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { return models_js_1.BlockBlobTier; } }); Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { return models_js_1.PremiumPageBlobTier; } }); Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { return models_js_1.StorageBlobAudience; } }); Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { return models_js_1.getBlobServiceAccountAudience; } }); var Pipeline_js_1 = require_Pipeline(); Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { return Pipeline_js_1.Pipeline; } }); Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { return Pipeline_js_1.isPipelineLike; } }); Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { return Pipeline_js_1.newPipeline; } }); Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { return Pipeline_js_1.StorageOAuthScopes; } }); tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); var RequestPolicy_js_1 = require_RequestPolicy(); Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { return RequestPolicy_js_1.BaseRequestPolicy; } }); tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); tslib_1.__exportStar(require_CredentialPolicy(), exports2); tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); tslib_1.__exportStar(require_SASQueryParameters(), exports2); tslib_1.__exportStar(require_generatedModels(), exports2); var log_js_1 = require_log5(); Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { return log_js_1.logger; } }); } }); // node_modules/@actions/cache/lib/internal/requestUtils.js var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core = __importStar2(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; } return statusCode >= 200 && statusCode < 300; } __name(isSuccessStatusCode, "isSuccessStatusCode"); exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } __name(isServerErrorStatusCode, "isServerErrorStatusCode"); exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; } const retryableStatusCodes = [ http_client_1.HttpCodes.BadGateway, http_client_1.HttpCodes.ServiceUnavailable, http_client_1.HttpCodes.GatewayTimeout ]; return retryableStatusCodes.includes(statusCode); } __name(isRetryableStatusCode, "isRetryableStatusCode"); exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, milliseconds)); }); } __name(sleep, "sleep"); function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { return __awaiter2(this, void 0, void 0, function* () { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { let response = void 0; let statusCode = void 0; let isRetryable = false; try { response = yield method(); } catch (error) { if (onError) { response = onError(error); } isRetryable = true; errorMessage = error.message; } if (response) { statusCode = getStatusCode(response); if (!isServerErrorStatusCode(statusCode)) { return response; } } if (statusCode) { isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { core.debug(`${name} - Error is not retryable`); break; } yield sleep(delay); attempt++; } throw Error(`${name} failed: ${errorMessage}`); }); } __name(retry, "retry"); exports2.retry = retry; function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return __awaiter2(this, void 0, void 0, function* () { return yield retry( name, method, (response) => response.statusCode, maxAttempts, delay, // If the error object contains the statusCode property, extract it and return // an TypedResponse so it can be processed by the retry logic. (error) => { if (error instanceof http_client_1.HttpClientError) { return { statusCode: error.statusCode, result: null, headers: {}, error }; } else { return void 0; } } ); }); } __name(retryTypedResponse, "retryTypedResponse"); exports2.retryTypedResponse = retryTypedResponse; function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return __awaiter2(this, void 0, void 0, function* () { return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } __name(retryHttpClientResponse, "retryHttpClientResponse"); exports2.retryHttpClientResponse = retryHttpClientResponse; } }); // node_modules/@azure/abort-controller/dist/index.js var require_dist4 = __commonJS({ "node_modules/@azure/abort-controller/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var listenersMap = /* @__PURE__ */ new WeakMap(); var abortedMap = /* @__PURE__ */ new WeakMap(); var AbortSignal2 = class _AbortSignal { static { __name(this, "AbortSignal"); } constructor() { this.onabort = null; listenersMap.set(this, []); abortedMap.set(this, false); } /** * Status of whether aborted or not. * * @readonly */ get aborted() { if (!abortedMap.has(this)) { throw new TypeError("Expected `this` to be an instance of AbortSignal."); } return abortedMap.get(this); } /** * Creates a new AbortSignal instance that will never be aborted. * * @readonly */ static get none() { return new _AbortSignal(); } /** * Added new "abort" event listener, only support "abort" event. * * @param _type - Only support "abort" event * @param listener - The listener to be added */ addEventListener(_type, listener) { if (!listenersMap.has(this)) { throw new TypeError("Expected `this` to be an instance of AbortSignal."); } const listeners = listenersMap.get(this); listeners.push(listener); } /** * Remove "abort" event listener, only support "abort" event. * * @param _type - Only support "abort" event * @param listener - The listener to be removed */ removeEventListener(_type, listener) { if (!listenersMap.has(this)) { throw new TypeError("Expected `this` to be an instance of AbortSignal."); } const listeners = listenersMap.get(this); const index = listeners.indexOf(listener); if (index > -1) { listeners.splice(index, 1); } } /** * Dispatches a synthetic event to the AbortSignal. */ dispatchEvent(_event) { throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); } }; function abortSignal(signal) { if (signal.aborted) { return; } if (signal.onabort) { signal.onabort.call(signal); } const listeners = listenersMap.get(signal); if (listeners) { listeners.slice().forEach((listener) => { listener.call(signal, { type: "abort" }); }); } abortedMap.set(signal, true); } __name(abortSignal, "abortSignal"); var AbortError = class extends Error { static { __name(this, "AbortError"); } constructor(message) { super(message); this.name = "AbortError"; } }; var AbortController2 = class { static { __name(this, "AbortController"); } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types constructor(parentSignals) { this._signal = new AbortSignal2(); if (!parentSignals) { return; } if (!Array.isArray(parentSignals)) { parentSignals = arguments; } for (const parentSignal of parentSignals) { if (parentSignal.aborted) { this.abort(); } else { parentSignal.addEventListener("abort", () => { this.abort(); }); } } } /** * The AbortSignal associated with this controller that will signal aborted * when the abort method is called on this controller. * * @readonly */ get signal() { return this._signal; } /** * Signal that any operations passed this controller's associated abort signal * to cancel any remaining work and throw an `AbortError`. */ abort() { abortSignal(this._signal); } /** * Creates a new AbortSignal instance that will abort after the provided ms. * @param ms - Elapsed time in milliseconds to trigger an abort. */ static timeout(ms) { const signal = new AbortSignal2(); const timer = setTimeout(abortSignal, ms, signal); if (typeof timer.unref === "function") { timer.unref(); } return signal; } }; exports2.AbortController = AbortController2; exports2.AbortError = AbortError; exports2.AbortSignal = AbortSignal2; } }); // node_modules/@actions/cache/lib/internal/downloadUtils.js var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; var core = __importStar2(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); var fs = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); } __name(pipeResponseToStream, "pipeResponseToStream"); var DownloadProgress = class { static { __name(this, "DownloadProgress"); } constructor(contentLength) { this.contentLength = contentLength; this.segmentIndex = 0; this.segmentSize = 0; this.segmentOffset = 0; this.receivedBytes = 0; this.displayedComplete = false; this.startTime = Date.now(); } /** * Progress to the next segment. Only call this method when the previous segment * is complete. * * @param segmentSize the length of the next segment */ nextSegment(segmentSize) { this.segmentOffset = this.segmentOffset + this.segmentSize; this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. * * @param receivedBytes the number of bytes received */ setReceivedBytes(receivedBytes) { this.receivedBytes = receivedBytes; } /** * Returns the total number of bytes transferred. */ getTransferredBytes() { return this.segmentOffset + this.receivedBytes; } /** * Returns true if the download is complete. */ isDone() { return this.getTransferredBytes() === this.contentLength; } /** * Prints the current download stats. Once the download completes, this will print one * last line and then stop. */ display() { if (this.displayedComplete) { return; } const transferredBytes = this.segmentOffset + this.receivedBytes; const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } } /** * Returns a function used to handle TransferProgressEvents. */ onProgress() { return (progress) => { this.setReceivedBytes(progress.loadedBytes); }; } /** * Starts the timer that displays the stats. * * @param delayInMs the delay between each write */ startDisplayTimer(delayInMs = 1e3) { const displayCallback = /* @__PURE__ */ __name(() => { this.display(); if (!this.isDone()) { this.timeoutHandle = setTimeout(displayCallback, delayInMs); } }, "displayCallback"); this.timeoutHandle = setTimeout(displayCallback, delayInMs); } /** * Stops the timer that displays the stats. As this typically indicates the download * is complete, this will display one last line, unless the last line has already * been written. */ stopDisplayTimer() { if (this.timeoutHandle) { clearTimeout(this.timeoutHandle); this.timeoutHandle = void 0; } this.display(); } }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; if (contentLengthHeader) { const expectedLength = parseInt(contentLengthHeader); const actualLength = utils.getArchiveFileSizeInBytes(archivePath); if (actualLength !== expectedLength) { throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { core.debug("Unable to validate download, no Content-Length header"); } }); } __name(downloadCacheHttpClient, "downloadCacheHttpClient"); exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter2(this, void 0, void 0, function* () { const archiveDescriptor = yield fs.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; if (lengthHeader === void 0 || lengthHeader === null) { throw new Error("Content-Length not found on blob response"); } const length = parseInt(lengthHeader); if (Number.isNaN(length)) { throw new Error(`Could not interpret Content-Length: ${length}`); } const downloads = []; const blockSize = 4 * 1024 * 1024; for (let offset = 0; offset < length; offset += blockSize) { const count = Math.min(blockSize, length - offset); downloads.push({ offset, promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); } downloads.reverse(); let actives = 0; let bytesDownloaded = 0; const progress = new DownloadProgress(length); progress.startDisplayTimer(); const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; const waitAndWrite = /* @__PURE__ */ __name(() => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; delete activeDownloads[segment.offset]; bytesDownloaded += segment.count; progressFn({ loadedBytes: bytesDownloaded }); }), "waitAndWrite"); while (nextDownload = downloads.pop()) { activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); actives++; if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) { yield waitAndWrite(); } } while (actives > 0) { yield waitAndWrite(); } } finally { httpClient.dispose(); yield archiveDescriptor.close(); } }); } __name(downloadCacheHttpClientConcurrent, "downloadCacheHttpClientConcurrent"); exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { try { const timeout = 3e4; const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count)); if (typeof result === "string") { throw new Error("downloadSegmentRetry failed due to timeout"); } return result; } catch (err) { if (failures >= retries) { throw err; } failures++; } } }); } __name(downloadSegmentRetry, "downloadSegmentRetry"); function downloadSegment(httpClient, archiveLocation, offset, count) { return __awaiter2(this, void 0, void 0, function* () { const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); })); if (!partRes.readBodyBuffer) { throw new Error("Expected HttpClientResponse to implement readBodyBuffer"); } return { offset, count, buffer: yield partRes.readBodyBuffer() }; }); } __name(downloadSegment, "downloadSegment"); function downloadCacheStorageSDK(archiveLocation, archivePath, options) { var _a; return __awaiter2(this, void 0, void 0, function* () { const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk // The default is 2 min / MB, which is way too slow tryTimeoutInMs: options.timeoutInMs } }); const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { core.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); const fd = fs.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); const abortSignal = controller.signal; while (!downloadProgress.isDone()) { const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); downloadProgress.nextSegment(segmentSize); const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 36e5, client.downloadToBuffer(segmentStart, segmentSize, { abortSignal, concurrency: options.downloadConcurrency, onProgress: downloadProgress.onProgress() })); if (result === "timeout") { controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { fs.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); fs.closeSync(fd); } } }); } __name(downloadCacheStorageSDK, "downloadCacheStorageSDK"); exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; var promiseWithTimeout = /* @__PURE__ */ __name((timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve) => { timeoutHandle = setTimeout(() => resolve("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); return result; }); }), "promiseWithTimeout"); } }); // node_modules/@actions/cache/lib/options.js var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; var core = __importStar2(require_core()); function getUploadOptions(copy) { const result = { uploadConcurrency: 4, uploadChunkSize: 32 * 1024 * 1024 }; if (copy) { if (typeof copy.uploadConcurrency === "number") { result.uploadConcurrency = copy.uploadConcurrency; } if (typeof copy.uploadChunkSize === "number") { result.uploadChunkSize = copy.uploadChunkSize; } } core.debug(`Upload concurrency: ${result.uploadConcurrency}`); core.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } __name(getUploadOptions, "getUploadOptions"); exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, concurrentBlobDownloads: true, downloadConcurrency: 8, timeoutInMs: 3e4, segmentTimeoutInMs: 6e5, lookupOnly: false }; if (copy) { if (typeof copy.useAzureSdk === "boolean") { result.useAzureSdk = copy.useAzureSdk; } if (typeof copy.concurrentBlobDownloads === "boolean") { result.concurrentBlobDownloads = copy.concurrentBlobDownloads; } if (typeof copy.downloadConcurrency === "number") { result.downloadConcurrency = copy.downloadConcurrency; } if (typeof copy.timeoutInMs === "number") { result.timeoutInMs = copy.timeoutInMs; } if (typeof copy.segmentTimeoutInMs === "number") { result.segmentTimeoutInMs = copy.segmentTimeoutInMs; } if (typeof copy.lookupOnly === "boolean") { result.lookupOnly = copy.lookupOnly; } } const segmentDownloadTimeoutMins = process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]; if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } core.debug(`Use Azure SDK: ${result.useAzureSdk}`); core.debug(`Download concurrency: ${result.downloadConcurrency}`); core.debug(`Request timeout (ms): ${result.timeoutInMs}`); core.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); core.debug(`Lookup only: ${result.lookupOnly}`); return result; } __name(getDownloadOptions, "getDownloadOptions"); exports2.getDownloadOptions = getDownloadOptions; } }); // node_modules/@actions/cache/lib/internal/cacheHttpClient.js var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = exports2.getCacheVersion = void 0; var core = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var crypto2 = __importStar2(require("crypto")); var fs = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); var requestUtils_1 = require_requestUtils(); var versionSalt = "1.0"; function getCacheApiUrl(resource) { const baseUrl = process.env["ACTIONS_CACHE_URL"] || ""; if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; core.debug(`Resource Url: ${url}`); return url; } __name(getCacheApiUrl, "getCacheApiUrl"); function createAcceptHeader(type, apiVersion) { return `${type};api-version=${apiVersion}`; } __name(createAcceptHeader, "createAcceptHeader"); function getRequestOptions() { const requestOptions = { headers: { Accept: createAcceptHeader("application/json", "6.0-preview.1") } }; return requestOptions; } __name(getRequestOptions, "getRequestOptions"); function createHttpClient() { const token = process.env["ACTIONS_RUNTIME_TOKEN"] || ""; const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); return new http_client_1.HttpClient("actions/cache", [bearerCredentialHandler], getRequestOptions()); } __name(createHttpClient, "createHttpClient"); function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { components.push(compressionMethod); } if (process.platform === "win32" && !enableCrossOsArchive) { components.push("windows-only"); } components.push(versionSalt); return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } __name(getCacheVersion, "getCacheVersion"); exports2.getCacheVersion = getCacheVersion; function getCacheEntry(keys, paths, options) { return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { if (core.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; } if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) { throw new Error(`Cache service responded with ${response.statusCode}`); } const cacheResult = response.result; const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; if (!cacheDownloadUrl) { throw new Error("Cache not found."); } core.setSecret(cacheDownloadUrl); core.debug(`Cache Result:`); core.debug(JSON.stringify(cacheResult)); return cacheResult; }); } __name(getCacheEntry, "getCacheEntry"); exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { core.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } }); } __name(printCachesListForDiagnostics, "printCachesListForDiagnostics"); function downloadCache(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { if (downloadOptions.useAzureSdk) { yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); } else if (downloadOptions.concurrentBlobDownloads) { yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); } else { yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); } } else { yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); } }); } __name(downloadCache, "downloadCache"); exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { key, version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } __name(reserveCache, "reserveCache"); exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } __name(getContentRange, "getContentRange"); function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter2(this, void 0, void 0, function* () { core.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); } }); } __name(uploadChunk, "uploadChunk"); function uploadFile(httpClient, cacheId, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; core.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, { fd, start, end, autoClose: false }).on("error", (error) => { throw new Error(`Cache upload failed because file read failed with ${error.message}`); }), start, end); } }))); } finally { fs.closeSync(fd); } return; }); } __name(uploadFile, "uploadFile"); function commitCache(httpClient, cacheId, filesize) { return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } __name(commitCache, "commitCache"); function saveCache(cacheId, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); core.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); core.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } core.info("Cache saved successfully"); }); } __name(saveCache, "saveCache"); exports2.saveCache = saveCache; } }); // node_modules/@actions/cache/lib/internal/tar.js var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); var io = __importStar2(require_io()); var fs_1 = require("fs"); var path2 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); const systemTar = constants_1.SystemTarPathOnWindows; if (gnuTar) { return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; } else if ((0, fs_1.existsSync)(systemTar)) { return { path: systemTar, type: constants_1.ArchiveToolType.BSD }; } break; } case "darwin": { const gnuTar = yield io.which("gtar", false); if (gnuTar) { return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; } else { return { path: yield io.which("tar", true), type: constants_1.ArchiveToolType.BSD }; } } default: break; } return { path: yield io.which("tar", true), type: constants_1.ArchiveToolType.GNU }; }); } __name(getTarPath, "getTarPath"); function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { return __awaiter2(this, void 0, void 0, function* () { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type) { case "create": args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/")); break; case "list": args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { switch (process.platform) { case "win32": args.push("--force-local"); break; case "darwin": args.push("--delay-directory-restore"); break; } } return args; }); } __name(getTarArgs, "getTarArgs"); function getCommands(compressionMethod, type, archivePath = "") { return __awaiter2(this, void 0, void 0, function* () { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; } if (BSD_TAR_ZSTD) { return args; } return [args.join(" ")]; }); } __name(getCommands, "getCommands"); function getWorkingDirectory() { var _a; return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } __name(getWorkingDirectory, "getWorkingDirectory"); function getDecompressionProgram(tarPath, compressionMethod, archivePath) { return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" ]; case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; } }); } __name(getDecompressionProgram, "getDecompressionProgram"); function getCompressionProgram(tarPath, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -T0 --long=30"' : "zstdmt --long=30" ]; case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: return ["-z"]; } }); } __name(getCompressionProgram, "getCompressionProgram"); function execCommands(commands, cwd) { return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { cwd, env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) }); } catch (error) { throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); } } }); } __name(execCommands, "execCommands"); function listTar(archivePath, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } __name(listTar, "listTar"); exports2.listTar = listTar; function extractTar(archivePath, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } __name(extractTar, "extractTar"); exports2.extractTar = extractTar; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } __name(createTar, "createTar"); exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core = __importStar2(require_core()); var path2 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var tar_1 = require_tar(); var ValidationError = class _ValidationError extends Error { static { __name(this, "ValidationError"); } constructor(message) { super(message); this.name = "ValidationError"; Object.setPrototypeOf(this, _ValidationError.prototype); } }; exports2.ValidationError = ValidationError; var ReserveCacheError = class _ReserveCacheError extends Error { static { __name(this, "ReserveCacheError"); } constructor(message) { super(message); this.name = "ReserveCacheError"; Object.setPrototypeOf(this, _ReserveCacheError.prototype); } }; exports2.ReserveCacheError = ReserveCacheError; function checkPaths(paths) { if (!paths || paths.length === 0) { throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); } } __name(checkPaths, "checkPaths"); function checkKey(key) { if (key.length > 512) { throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); } const regex = /^[^,]*$/; if (!regex.test(key)) { throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); } } __name(checkKey, "checkKey"); function isFeatureAvailable() { return !!process.env["ACTIONS_CACHE_URL"]; } __name(isFeatureAvailable, "isFeatureAvailable"); exports2.isFeatureAvailable = isFeatureAvailable; function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter2(this, void 0, void 0, function* () { checkPaths(paths); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core.debug("Resolved Keys:"); core.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } for (const key of keys) { checkKey(key); } const compressionMethod = yield utils.getCompressionMethod(); let archivePath = ""; try { const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { compressionMethod, enableCrossOsArchive }); if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { core.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); core.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error) { const typedError = error; if (typedError.name === ValidationError.name) { throw error; } else { core.warning(`Failed to restore: ${error.message}`); } } finally { try { yield utils.unlinkFile(archivePath); } catch (error) { core.debug(`Failed to delete archive: ${error}`); } } return void 0; }); } __name(restoreCache, "restoreCache"); exports2.restoreCache = restoreCache; function saveCache(paths, key, options, enableCrossOsArchive = false) { var _a, _b, _c, _d, _e; return __awaiter2(this, void 0, void 0, function* () { checkPaths(paths); checkKey(key); const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); core.debug("Cache Paths:"); core.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); if (core.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); core.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !utils.isGhes()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } core.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, cacheSize: archiveFileSize }); if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) { cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId; } else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) { throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } core.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, options); } catch (error) { const typedError = error; if (typedError.name === ValidationError.name) { throw error; } else if (typedError.name === ReserveCacheError.name) { core.info(`Failed to save: ${typedError.message}`); } else { core.warning(`Failed to save: ${typedError.message}`); } } finally { try { yield utils.unlinkFile(archivePath); } catch (error) { core.debug(`Failed to delete archive: ${error}`); } } return cacheId; }); } __name(saveCache, "saveCache"); exports2.saveCache = saveCache; } }); // node_modules/@actions/tool-cache/node_modules/semver/semver.js var require_semver4 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/semver.js"(exports2, module2) { exports2 = module2.exports = SemVer; var debug; if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = /* @__PURE__ */ __name(function() { var args = Array.prototype.slice.call(arguments, 0); args.unshift("SEMVER"); console.log.apply(console, args); }, "debug"); } else { debug = /* @__PURE__ */ __name(function() { }, "debug"); } exports2.SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var t = exports2.tokens = {}; var R = 0; function tok(n) { t[n] = R++; } __name(tok, "tok"); var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; function makeSafeRe(value) { for (var i2 = 0; i2 < safeRegexReplacements.length; i2++) { var token = safeRegexReplacements[i2][0]; var max = safeRegexReplacements[i2][1]; value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); } return value; } __name(makeSafeRe, "makeSafeRe"); tok("NUMERICIDENTIFIER"); src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; tok("NUMERICIDENTIFIERLOOSE"); src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; tok("NONNUMERICIDENTIFIER"); src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; tok("MAINVERSION"); src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; tok("MAINVERSIONLOOSE"); src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; tok("PRERELEASEIDENTIFIER"); src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASEIDENTIFIERLOOSE"); src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASE"); src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; tok("PRERELEASELOOSE"); src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; tok("BUILDIDENTIFIER"); src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; tok("BUILD"); src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; tok("FULL"); tok("FULLPLAIN"); src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; tok("LOOSEPLAIN"); src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; tok("LOOSE"); src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; tok("GTLT"); src[t.GTLT] = "((?:<|>)?=?)"; tok("XRANGEIDENTIFIERLOOSE"); src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; tok("XRANGEIDENTIFIER"); src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; tok("XRANGEPLAIN"); src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGEPLAINLOOSE"); src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGE"); src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; tok("XRANGELOOSE"); src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; tok("TILDELOOSE"); src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; tok("LONECARET"); src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); var caretTrimReplace = "$1^"; tok("CARET"); src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; tok("CARETLOOSE"); src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; tok("COMPARATORLOOSE"); src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; tok("COMPARATOR"); src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; tok("HYPHENRANGELOOSE"); src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; tok("STAR"); src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); if (!re[i]) { re[i] = new RegExp(src[i]); safeRe[i] = new RegExp(makeSafeRe(src[i])); } } var i; exports2.parse = parse; function parse(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { return version; } if (typeof version !== "string") { return null; } if (version.length > MAX_LENGTH) { return null; } var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; if (!r.test(version)) { return null; } try { return new SemVer(version, options); } catch (er) { return null; } } __name(parse, "parse"); exports2.valid = valid; function valid(version, options) { var v = parse(version, options); return v ? v.version : null; } __name(valid, "valid"); exports2.clean = clean; function clean(version, options) { var s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports2.SemVer = SemVer; function SemVer(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { if (version.loose === options.loose) { return version; } else { version = version.version; } } else if (typeof version !== "string") { throw new TypeError("Invalid Version: " + version); } if (version.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { return new SemVer(version, options); } debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { throw new TypeError("Invalid Version: " + version); } this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map(function(id) { if (/^[0-9]+$/.test(id)) { var num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } __name(SemVer, "SemVer"); SemVer.prototype.format = function() { this.version = this.major + "." + this.minor + "." + this.patch; if (this.prerelease.length) { this.version += "-" + this.prerelease.join("."); } return this.version; }; SemVer.prototype.toString = function() { return this.version; }; SemVer.prototype.compare = function(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return this.compareMain(other) || this.comparePre(other); }; SemVer.prototype.compareMain = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; SemVer.prototype.comparePre = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } var i2 = 0; do { var a = this.prerelease[i2]; var b = other.prerelease[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.compareBuild = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } var i2 = 0; do { var a = this.build[i2]; var b = other.build[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.inc = function(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { var i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports2.inc = inc; function inc(version, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { return new SemVer(version, loose).inc(release, identifier).version; } catch (er) { return null; } } __name(inc, "inc"); exports2.diff = diff; function diff(version1, version2) { if (eq(version1, version2)) { return null; } else { var v1 = parse(version1); var v2 = parse(version2); var prefix = ""; if (v1.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } } __name(diff, "diff"); exports2.compareIdentifiers = compareIdentifiers; var numeric = /^[0-9]+$/; function compareIdentifiers(a, b) { var anum = numeric.test(a); var bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; } __name(compareIdentifiers, "compareIdentifiers"); exports2.rcompareIdentifiers = rcompareIdentifiers; function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } __name(rcompareIdentifiers, "rcompareIdentifiers"); exports2.major = major; function major(a, loose) { return new SemVer(a, loose).major; } __name(major, "major"); exports2.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; } __name(minor, "minor"); exports2.patch = patch; function patch(a, loose) { return new SemVer(a, loose).patch; } __name(patch, "patch"); exports2.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)); } __name(compare, "compare"); exports2.compareLoose = compareLoose; function compareLoose(a, b) { return compare(a, b, true); } __name(compareLoose, "compareLoose"); exports2.compareBuild = compareBuild; function compareBuild(a, b, loose) { var versionA = new SemVer(a, loose); var versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); } __name(compareBuild, "compareBuild"); exports2.rcompare = rcompare; function rcompare(a, b, loose) { return compare(b, a, loose); } __name(rcompare, "rcompare"); exports2.sort = sort; function sort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(a, b, loose); }); } __name(sort, "sort"); exports2.rsort = rsort; function rsort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(b, a, loose); }); } __name(rsort, "rsort"); exports2.gt = gt; function gt(a, b, loose) { return compare(a, b, loose) > 0; } __name(gt, "gt"); exports2.lt = lt; function lt(a, b, loose) { return compare(a, b, loose) < 0; } __name(lt, "lt"); exports2.eq = eq; function eq(a, b, loose) { return compare(a, b, loose) === 0; } __name(eq, "eq"); exports2.neq = neq; function neq(a, b, loose) { return compare(a, b, loose) !== 0; } __name(neq, "neq"); exports2.gte = gte; function gte(a, b, loose) { return compare(a, b, loose) >= 0; } __name(gte, "gte"); exports2.lte = lte; function lte(a, b, loose) { return compare(a, b, loose) <= 0; } __name(lte, "lte"); exports2.cmp = cmp; function cmp(a, op, b, loose) { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } } __name(cmp, "cmp"); exports2.Comparator = Comparator; function Comparator(comp, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } if (!(this instanceof Comparator)) { return new Comparator(comp, options); } comp = comp.trim().split(/\s+/).join(" "); debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } __name(Comparator, "Comparator"); var ANY = {}; Comparator.prototype.parse = function(comp) { var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; var m = comp.match(r); if (!m) { throw new TypeError("Invalid comparator: " + comp); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } }; Comparator.prototype.toString = function() { return this.value; }; Comparator.prototype.test = function(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY || version === ANY) { return true; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } return cmp(version, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } var rangeTmp; if (this.operator === "") { if (this.value === "") { return true; } rangeTmp = new Range(comp.value, options); return satisfies(this.value, rangeTmp, options); } else if (comp.operator === "") { if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options); return satisfies(comp.semver, rangeTmp, options); } var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); var sameSemVer = this.semver.version === comp.semver.version; var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range; function Range(range, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { return new Range(range.value, options); } if (!(this instanceof Range)) { return new Range(range, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range.trim().split(/\s+/).join(" "); this.set = this.raw.split("||").map(function(range2) { return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); if (!this.set.length) { throw new TypeError("Invalid SemVer Range: " + this.raw); } this.format(); } __name(Range, "Range"); Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(" ").trim(); }).join("||").trim(); return this.range; }; Range.prototype.toString = function() { return this.range; }; Range.prototype.parseRange = function(range) { var loose = this.options.loose; var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace); debug("hyphen replace", range); range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, safeRe[t.COMPARATORTRIM]); range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; var set = range.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { set = set.filter(function(comp) { return !!comp.match(compRe); }); } set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); return set; }; Range.prototype.intersects = function(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); }); }); }); }); }; function isSatisfiable(comparators, options) { var result = true; var remainingComparators = comparators.slice(); var testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every(function(otherComparator) { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; } __name(isSatisfiable, "isSatisfiable"); exports2.toComparators = toComparators; function toComparators(range, options) { return new Range(range, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } __name(toComparators, "toComparators"); function parseComparator(comp, options) { debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; } __name(parseComparator, "parseComparator"); function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } __name(isX, "isX"); function replaceTildes(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceTilde(comp2, options); }).join(" "); } __name(replaceTildes, "replaceTildes"); function replaceTilde(comp, options) { var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; return comp.replace(r, function(_, M, m, p, pr) { debug("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else if (pr) { debug("replaceTilde pr", pr); ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } debug("tilde return", ret); return ret; }); } __name(replaceTilde, "replaceTilde"); function replaceCarets(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceCaret(comp2, options); }).join(" "); } __name(replaceCarets, "replaceCarets"); function replaceCaret(comp, options) { debug("caret", comp, options); var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; return comp.replace(r, function(_, M, m, p, pr) { debug("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { if (M === "0") { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; } } debug("caret return", ret); return ret; }); } __name(replaceCaret, "replaceCaret"); function replaceXRanges(comp, options) { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map(function(comp2) { return replaceXRange(comp2, options); }).join(" "); } __name(replaceXRanges, "replaceXRanges"); function replaceXRange(comp, options) { comp = comp.trim(); var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; return comp.replace(r, function(ret, gtlt, M, m, p, pr) { debug("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); var anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } ret = gtlt + M + "." + m + "." + p + pr; } else if (xm) { ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; } else if (xp) { ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; } debug("xRange return", ret); return ret; }); } __name(replaceXRange, "replaceXRange"); function replaceStars(comp, options) { debug("replaceStars", comp, options); return comp.trim().replace(safeRe[t.STAR], ""); } __name(replaceStars, "replaceStars"); function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = ">=" + fM + ".0.0"; } else if (isX(fp)) { from = ">=" + fM + "." + fm + ".0"; } else { from = ">=" + from; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = "<" + (+tM + 1) + ".0.0"; } else if (isX(tp)) { to = "<" + tM + "." + (+tm + 1) + ".0"; } else if (tpr) { to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; } else { to = "<=" + to; } return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); Range.prototype.test = function(version) { if (!version) { return false; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version, this.options)) { return true; } } return false; }; function testSet(set, version, options) { for (var i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } } } return false; } return true; } __name(testSet, "testSet"); exports2.satisfies = satisfies; function satisfies(version, range, options) { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version); } __name(satisfies, "satisfies"); exports2.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, options) { var max = null; var maxSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; } __name(maxSatisfying, "maxSatisfying"); exports2.minSatisfying = minSatisfying; function minSatisfying(versions, range, options) { var min = null; var minSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; } __name(minSatisfying, "minSatisfying"); exports2.minVersion = minVersion; function minVersion(range, loose) { range = new Range(range, loose); var minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!minver || gt(minver, compver)) { minver = compver; } break; case "<": case "<=": break; default: throw new Error("Unexpected operation: " + comparator.operator); } }); } if (minver && range.test(minver)) { return minver; } return null; } __name(minVersion, "minVersion"); exports2.validRange = validRange; function validRange(range, options) { try { return new Range(range, options).range || "*"; } catch (er) { return null; } } __name(validRange, "validRange"); exports2.ltr = ltr; function ltr(version, range, options) { return outside(version, range, "<", options); } __name(ltr, "ltr"); exports2.gtr = gtr; function gtr(version, range, options) { return outside(version, range, ">", options); } __name(gtr, "gtr"); exports2.outside = outside; function outside(version, range, hilo, options) { version = new SemVer(version, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false; } } return true; } __name(outside, "outside"); exports2.prerelease = prerelease; function prerelease(version, options) { var parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); exports2.intersects = intersects; function intersects(r1, r2, options) { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2); } __name(intersects, "intersects"); exports2.coerce = coerce; function coerce(version, options) { if (version instanceof SemVer) { return version; } if (typeof version === "number") { version = String(version); } if (typeof version !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { match = version.match(safeRe[t.COERCE]); } else { var next; while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } safeRe[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } }); // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; var semver2 = __importStar2(require_semver4()); var core_1 = require_core(); var os2 = require("os"); var cp = require("child_process"); var fs = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os2.platform(); let result; let match; let file; for (const candidate of candidates) { const version = candidate.version; (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); if (semver2.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { file = candidate.files.find((item) => { (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); let chk = item.arch === archFilter && item.platform === platFilter; if (chk && item.platform_version) { const osVersion = module2.exports._getOsVersion(); if (osVersion === item.platform_version) { chk = true; } else { chk = semver2.satisfies(osVersion, item.platform_version); } } return chk; }); if (file) { (0, core_1.debug)(`matched ${candidate.version}`); match = candidate; break; } } } if (match && file) { result = Object.assign({}, match); result.files = [file]; } return result; }); } __name(_findMatch, "_findMatch"); exports2._findMatch = _findMatch; function _getOsVersion() { const plat = os2.platform(); let version = ""; if (plat === "darwin") { version = cp.execSync("sw_vers -productVersion").toString(); } else if (plat === "linux") { const lsbContents = module2.exports._readLinuxVersionFile(); if (lsbContents) { const lines = lsbContents.split("\n"); for (const line of lines) { const parts = line.split("="); if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); break; } } } } return version; } __name(_getOsVersion, "_getOsVersion"); exports2._getOsVersion = _getOsVersion; function _readLinuxVersionFile() { const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; if (fs.existsSync(lsbReleaseFile)) { contents = fs.readFileSync(lsbReleaseFile).toString(); } else if (fs.existsSync(osReleaseFile)) { contents = fs.readFileSync(osReleaseFile).toString(); } return contents; } __name(_readLinuxVersionFile, "_readLinuxVersionFile"); exports2._readLinuxVersionFile = _readLinuxVersionFile; } }); // node_modules/@actions/tool-cache/lib/retry-helper.js var require_retry_helper = __commonJS({ "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; var core = __importStar2(require_core()); var RetryHelper = class { static { __name(this, "RetryHelper"); } constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { throw new Error("max attempts should be greater than or equal to 1"); } this.maxAttempts = maxAttempts; this.minSeconds = Math.floor(minSeconds); this.maxSeconds = Math.floor(maxSeconds); if (this.minSeconds > this.maxSeconds) { throw new Error("min seconds should be less than or equal to max seconds"); } } execute(action, isRetryable) { return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { return yield action(); } catch (err) { if (isRetryable && !isRetryable(err)) { throw err; } core.info(err.message); } const seconds = this.getSleepAmount(); core.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } return yield action(); }); } getSleepAmount() { return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); }); } }; exports2.RetryHelper = RetryHelper; } }); // node_modules/@actions/tool-cache/lib/tool-cache.js var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } __name(adopt, "adopt"); return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } __name(fulfilled, "fulfilled"); function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } __name(rejected, "rejected"); function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } __name(step, "step"); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core = __importStar2(require_core()); var io = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); var path2 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver2 = __importStar2(require_semver4()); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); var assert_1 = require("assert"); var exec_1 = require_exec(); var retry_helper_1 = require_retry_helper(); var HTTPError = class extends Error { static { __name(this, "HTTPError"); } constructor(httpStatusCode) { super(`Unexpected HTTP response: ${httpStatusCode}`); this.httpStatusCode = httpStatusCode; Object.setPrototypeOf(this, new.target.prototype); } }; exports2.HTTPError = HTTPError; var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { dest = dest || path2.join(_getTempDirectory(), crypto2.randomUUID()); yield io.mkdirP(path2.dirname(dest)); core.debug(`Downloading ${url}`); core.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { return false; } } return true; }); }); } __name(downloadTool, "downloadTool"); exports2.downloadTool = downloadTool; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { allowRetries: false }); if (auth) { core.debug("set auth"); if (headers === void 0) { headers = {}; } headers.authorization = auth; } const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); const readStream = responseMessageFactory(); let succeeded = false; try { yield pipeline(readStream, fs.createWriteStream(dest)); core.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { core.debug("download failed"); try { yield io.rmRF(dest); } catch (err) { core.debug(`Failed to delete '${dest}'. ${err.message}`); } } } }); } __name(downloadToolAttempt, "downloadToolAttempt"); function extract7z(file, dest, _7zPath) { return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); const originalCwd = process.cwd(); process.chdir(dest); if (_7zPath) { try { const logLevel = core.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, "-bd", "-sccUTF-8", file ]; const options = { silent: true }; yield (0, exec_1.exec)(`"${_7zPath}"`, args, options); } finally { process.chdir(originalCwd); } } else { const escapedScript = path2.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; const args = [ "-NoLogo", "-Sta", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", command ]; const options = { silent: true }; try { const powershellPath = yield io.which("powershell", true); yield (0, exec_1.exec)(`"${powershellPath}"`, args, options); } finally { process.chdir(originalCwd); } } return dest; }); } __name(extract7z, "extract7z"); exports2.extract7z = extract7z; function extractTar(file, dest, flags = "xz") { return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); core.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, silent: true, listeners: { stdout: (data) => versionOutput += data.toString(), stderr: (data) => versionOutput += data.toString() } }); core.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { args = flags; } else { args = [flags]; } if (core.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; let fileArg = file; if (IS_WINDOWS && isGnuTar) { args.push("--force-local"); destArg = dest.replace(/\\/g, "/"); fileArg = file.replace(/\\/g, "/"); } if (isGnuTar) { args.push("--warning=no-unknown-keyword"); args.push("--overwrite"); } args.push("-C", destArg, "-f", fileArg); yield (0, exec_1.exec)(`tar`, args); return dest; }); } __name(extractTar, "extractTar"); exports2.extractTar = extractTar; function extractXar(file, dest, flags = []) { return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); let args; if (flags instanceof Array) { args = flags; } else { args = [flags]; } args.push("-x", "-C", dest, "-f", file); if (core.isDebug()) { args.push("-v"); } const xarPath = yield io.which("xar", true); yield (0, exec_1.exec)(`"${xarPath}"`, _unique(args)); return dest; }); } __name(extractXar, "extractXar"); exports2.extractXar = extractXar; function extractZip(file, dest) { return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); if (IS_WINDOWS) { yield extractZipWin(file, dest); } else { yield extractZipNix(file, dest); } return dest; }); } __name(extractZip, "extractZip"); exports2.extractZip = extractZip; function extractZipWin(file, dest) { return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io.which("pwsh", false); if (pwshPath) { const pwshCommand = [ `$ErrorActionPreference = 'Stop' ;`, `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` ].join(" "); const args = [ "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", pwshCommand ]; core.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ `$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 '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` ].join(" "); const args = [ "-NoLogo", "-Sta", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", powershellCommand ]; const powershellPath = yield io.which("powershell", true); core.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); } __name(extractZipWin, "extractZipWin"); function extractZipNix(file, dest) { return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io.which("unzip", true); const args = [file]; if (!core.isDebug()) { args.unshift("-q"); } args.unshift("-o"); yield (0, exec_1.exec)(`"${unzipPath}"`, args, { cwd: dest }); }); } __name(extractZipNix, "extractZipNix"); function cacheDir(sourceDir, tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { version = semver2.clean(version) || version; arch = arch || os2.arch(); core.debug(`Caching tool ${tool} ${version} ${arch}`); core.debug(`source dir: ${sourceDir}`); if (!fs.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch); for (const itemName of fs.readdirSync(sourceDir)) { const s = path2.join(sourceDir, itemName); yield io.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch); return destPath; }); } __name(cacheDir, "cacheDir"); exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { version = semver2.clean(version) || version; arch = arch || os2.arch(); core.debug(`Caching tool ${tool} ${version} ${arch}`); core.debug(`source file: ${sourceFile}`); if (!fs.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path2.join(destFolder, targetFile); core.debug(`destination file ${destPath}`); yield io.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; }); } __name(cacheFile, "cacheFile"); exports2.cacheFile = cacheFile; function find(toolName, versionSpec, arch) { if (!toolName) { throw new Error("toolName parameter is required"); } if (!versionSpec) { throw new Error("versionSpec parameter is required"); } arch = arch || os2.arch(); if (!isExplicitVersion(versionSpec)) { const localVersions = findAllVersions(toolName, arch); const match = evaluateVersions(localVersions, versionSpec); versionSpec = match; } let toolPath = ""; if (versionSpec) { versionSpec = semver2.clean(versionSpec) || ""; const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); core.debug(`checking cache: ${cachePath}`); if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { core.debug("not found"); } } return toolPath; } __name(find, "find"); exports2.find = find; function findAllVersions(toolName, arch) { const versions = []; arch = arch || os2.arch(); const toolPath = path2.join(_getCacheDirectory(), toolName); if (fs.existsSync(toolPath)) { const children = fs.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { const fullPath = path2.join(toolPath, child, arch || ""); if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { versions.push(child); } } } } return versions; } __name(findAllVersions, "findAllVersions"); exports2.findAllVersions = findAllVersions; function getManifestFromRepo(owner, repo, auth, branch = "master") { return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { core.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); if (!response.result) { return releases; } let manifestUrl = ""; for (const item of response.result.tree) { if (item.path === "versions-manifest.json") { manifestUrl = item.url; break; } } headers["accept"] = "application/vnd.github.VERSION.raw"; let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); if (versionsRaw) { versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); } catch (_a) { core.debug("Invalid json"); } } return releases; }); } __name(getManifestFromRepo, "getManifestFromRepo"); exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os2.arch()) { return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } __name(findFromManifest, "findFromManifest"); exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { dest = path2.join(_getTempDirectory(), crypto2.randomUUID()); } yield io.mkdirP(dest); return dest; }); } __name(_createExtractFolder, "_createExtractFolder"); function _createToolPath(tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver2.clean(version) || version, arch || ""); core.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io.rmRF(folderPath); yield io.rmRF(markerPath); yield io.mkdirP(folderPath); return folderPath; }); } __name(_createToolPath, "_createToolPath"); function _completeToolPath(tool, version, arch) { const folderPath = path2.join(_getCacheDirectory(), tool, semver2.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs.writeFileSync(markerPath, ""); core.debug("finished caching tool"); } __name(_completeToolPath, "_completeToolPath"); function isExplicitVersion(versionSpec) { const c = semver2.clean(versionSpec) || ""; core.debug(`isExplicit: ${c}`); const valid = semver2.valid(c) != null; core.debug(`explicit? ${valid}`); return valid; } __name(isExplicitVersion, "isExplicitVersion"); exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; core.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver2.gt(a, b)) { return 1; } return -1; }); for (let i = versions.length - 1; i >= 0; i--) { const potential = versions[i]; const satisfied = semver2.satisfies(potential, versionSpec); if (satisfied) { version = potential; break; } } if (version) { core.debug(`matched: ${version}`); } else { core.debug("match not found"); } return version; } __name(evaluateVersions, "evaluateVersions"); exports2.evaluateVersions = evaluateVersions; function _getCacheDirectory() { const cacheDirectory = process.env["RUNNER_TOOL_CACHE"] || ""; (0, assert_1.ok)(cacheDirectory, "Expected RUNNER_TOOL_CACHE to be defined"); return cacheDirectory; } __name(_getCacheDirectory, "_getCacheDirectory"); function _getTempDirectory() { const tempDirectory = process.env["RUNNER_TEMP"] || ""; (0, assert_1.ok)(tempDirectory, "Expected RUNNER_TEMP to be defined"); return tempDirectory; } __name(_getTempDirectory, "_getTempDirectory"); function _getGlobal(key, defaultValue) { const value = global[key]; return value !== void 0 ? value : defaultValue; } __name(_getGlobal, "_getGlobal"); function _unique(values) { return Array.from(new Set(values)); } __name(_unique, "_unique"); } }); // node_modules/simple-concat/index.js var require_simple_concat = __commonJS({ "node_modules/simple-concat/index.js"(exports2, module2) { module2.exports = function(stream, cb) { var chunks = []; stream.on("data", function(chunk) { chunks.push(chunk); }); stream.once("end", function() { if (cb) cb(null, Buffer.concat(chunks)); cb = null; }); stream.once("error", function(err) { if (cb) cb(err); cb = null; }); }; } }); // node_modules/mimic-response/index.js var require_mimic_response = __commonJS({ "node_modules/mimic-response/index.js"(exports2, module2) { "use strict"; var knownProperties = [ "aborted", "complete", "headers", "httpVersion", "httpVersionMinor", "httpVersionMajor", "method", "rawHeaders", "rawTrailers", "setTimeout", "socket", "statusCode", "statusMessage", "trailers", "url" ]; module2.exports = (fromStream, toStream) => { if (toStream._readableState.autoDestroy) { throw new Error("The second stream must have the `autoDestroy` option set to `false`"); } const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); const properties = {}; for (const property of fromProperties) { if (property in toStream) { continue; } properties[property] = { get() { const value = fromStream[property]; const isFunction = typeof value === "function"; return isFunction ? value.bind(fromStream) : value; }, set(value) { fromStream[property] = value; }, enumerable: true, configurable: false }; } Object.defineProperties(toStream, properties); fromStream.once("aborted", () => { toStream.destroy(); toStream.emit("aborted"); }); fromStream.once("close", () => { if (fromStream.complete) { if (toStream.readable) { toStream.once("end", () => { toStream.emit("close"); }); } else { toStream.emit("close"); } } else { toStream.emit("close"); } }); return toStream; }; } }); // node_modules/decompress-response/index.js var require_decompress_response = __commonJS({ "node_modules/decompress-response/index.js"(exports2, module2) { "use strict"; var { Transform, PassThrough } = require("stream"); var zlib = require("zlib"); var mimicResponse = require_mimic_response(); module2.exports = (response) => { const contentEncoding = (response.headers["content-encoding"] || "").toLowerCase(); if (!["gzip", "deflate", "br"].includes(contentEncoding)) { return response; } const isBrotli = contentEncoding === "br"; if (isBrotli && typeof zlib.createBrotliDecompress !== "function") { response.destroy(new Error("Brotli is not supported on Node.js < 12")); return response; } let isEmpty = true; const checker = new Transform({ transform(data, _encoding, callback) { isEmpty = false; callback(null, data); }, flush(callback) { callback(); } }); const finalStream = new PassThrough({ autoDestroy: false, destroy(error, callback) { response.destroy(); callback(error); } }); const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); decompressStream.once("error", (error) => { if (isEmpty && !response.readable) { finalStream.end(); return; } finalStream.destroy(error); }); mimicResponse(response, finalStream); response.pipe(checker).pipe(decompressStream).pipe(finalStream); return finalStream; }; } }); // node_modules/wrappy/wrappy.js var require_wrappy = __commonJS({ "node_modules/wrappy/wrappy.js"(exports2, module2) { module2.exports = wrappy; function wrappy(fn, cb) { if (fn && cb) return wrappy(fn)(cb); if (typeof fn !== "function") throw new TypeError("need wrapper function"); Object.keys(fn).forEach(function(k) { wrapper[k] = fn[k]; }); return wrapper; function wrapper() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } var ret = fn.apply(this, args); var cb2 = args[args.length - 1]; if (typeof ret === "function" && ret !== cb2) { Object.keys(cb2).forEach(function(k) { ret[k] = cb2[k]; }); } return ret; } __name(wrapper, "wrapper"); } __name(wrappy, "wrappy"); } }); // node_modules/once/once.js var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { return once(this); }, configurable: true }); Object.defineProperty(Function.prototype, "onceStrict", { value: function() { return onceStrict(this); }, configurable: true }); }); function once(fn) { var f = /* @__PURE__ */ __name(function() { if (f.called) return f.value; f.called = true; return f.value = fn.apply(this, arguments); }, "f"); f.called = false; return f; } __name(once, "once"); function onceStrict(fn) { var f = /* @__PURE__ */ __name(function() { if (f.called) throw new Error(f.onceError); f.called = true; return f.value = fn.apply(this, arguments); }, "f"); var name = fn.name || "Function wrapped with `once`"; f.onceError = name + " shouldn't be called more than once"; f.called = false; return f; } __name(onceStrict, "onceStrict"); } }); // node_modules/simple-get/index.js var require_simple_get = __commonJS({ "node_modules/simple-get/index.js"(exports2, module2) { module2.exports = simpleGet; var concat = require_simple_concat(); var decompressResponse = require_decompress_response(); var http = require("http"); var https = require("https"); var once = require_once(); var querystring = require("querystring"); var url = require("url"); var isStream = /* @__PURE__ */ __name((o) => o !== null && typeof o === "object" && typeof o.pipe === "function", "isStream"); function simpleGet(opts, cb) { opts = Object.assign({ maxRedirects: 10 }, typeof opts === "string" ? { url: opts } : opts); cb = once(cb); if (opts.url) { const { hostname, port, protocol: protocol2, auth, path: path2 } = url.parse(opts.url); delete opts.url; if (!hostname && !port && !protocol2 && !auth) opts.path = path2; else Object.assign(opts, { hostname, port, protocol: protocol2, auth, path: path2 }); } const headers = { "accept-encoding": "gzip, deflate" }; if (opts.headers) Object.keys(opts.headers).forEach((k) => headers[k.toLowerCase()] = opts.headers[k]); opts.headers = headers; let body; if (opts.body) { body = opts.json && !isStream(opts.body) ? JSON.stringify(opts.body) : opts.body; } else if (opts.form) { body = typeof opts.form === "string" ? opts.form : querystring.stringify(opts.form); opts.headers["content-type"] = "application/x-www-form-urlencoded"; } if (body) { if (!opts.method) opts.method = "POST"; if (!isStream(body)) opts.headers["content-length"] = Buffer.byteLength(body); if (opts.json && !opts.form) opts.headers["content-type"] = "application/json"; } delete opts.body; delete opts.form; if (opts.json) opts.headers.accept = "application/json"; if (opts.method) opts.method = opts.method.toUpperCase(); const originalHost = opts.hostname; const protocol = opts.protocol === "https:" ? https : http; const req = protocol.request(opts, (res) => { if (opts.followRedirects !== false && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { opts.url = res.headers.location; delete opts.headers.host; res.resume(); const redirectHost = url.parse(opts.url).hostname; if (redirectHost !== null && redirectHost !== originalHost) { delete opts.headers.cookie; delete opts.headers.authorization; } if (opts.method === "POST" && [301, 302].includes(res.statusCode)) { opts.method = "GET"; delete opts.headers["content-length"]; delete opts.headers["content-type"]; } if (opts.maxRedirects-- === 0) return cb(new Error("too many redirects")); else return simpleGet(opts, cb); } const tryUnzip = typeof decompressResponse === "function" && opts.method !== "HEAD"; cb(null, tryUnzip ? decompressResponse(res) : res); }); req.on("timeout", () => { req.abort(); cb(new Error("Request timed out")); }); req.on("error", cb); if (isStream(body)) body.on("error", cb).pipe(req); else req.end(body); return req; } __name(simpleGet, "simpleGet"); simpleGet.concat = (opts, cb) => { return simpleGet(opts, (err, res) => { if (err) return cb(err); concat(res, (err2, data) => { if (err2) return cb(err2); if (opts.json) { try { data = JSON.parse(data.toString()); } catch (err3) { return cb(err3, res, data); } } cb(null, res, data); }); }); }; ["get", "post", "put", "patch", "head", "delete"].forEach((method) => { simpleGet[method] = (opts, cb) => { if (typeof opts === "string") opts = { url: opts }; return simpleGet(Object.assign({ method: method.toUpperCase() }, opts), cb); }; }); } }); // versions.js var require_versions = __commonJS({ "versions.js"(exports2, module2) { var path2 = require("path"); var get = require_simple_get().concat; var semver2 = require_semver2(); function extForPlatform2(platform) { return { linux: "tar.xz", darwin: "tar.xz", win32: "zip" }[platform]; } __name(extForPlatform2, "extForPlatform"); function resolveCommit2(arch, platform, version) { const ext = extForPlatform2(platform); const resolvedOs = { linux: "linux", darwin: "macos", win32: "windows" }[platform]; const resolvedArch = { arm: "armv7a", arm64: "aarch64", ppc64: "powerpc64", riscv64: "riscv64", x64: "x86_64" }[arch]; const downloadUrl = `https://ziglang.org/builds/zig-${resolvedOs}-${resolvedArch}-${version}.${ext}`; const variantName = `zig-${resolvedOs}-${resolvedArch}-${version}`; return { downloadUrl, variantName, version }; } __name(resolveCommit2, "resolveCommit"); function getJSON(opts) { return new Promise((resolve, reject) => { get({ ...opts, json: true }, (err, req, data) => { if (err) { reject(err); } else { resolve(data); } }); }); } __name(getJSON, "getJSON"); async function resolveVersion2(arch, platform, version) { const ext = extForPlatform2(platform); const resolvedOs = { linux: "linux", darwin: "macos", win32: "windows" }[platform]; const resolvedArch = { arm: "armv7a", arm64: "aarch64", ppc64: "powerpc64", riscv64: "riscv64", x64: "x86_64" }[arch]; const host = `${resolvedArch}-${resolvedOs}`; const index = await getJSON({ url: "https://ziglang.org/download/index.json" }); const availableVersions = Object.keys(index); const useVersion = semver2.valid(version) ? semver2.maxSatisfying(availableVersions.filter((v) => semver2.valid(v)), version) : null; const meta = index[useVersion || version]; if (!meta || !meta[host]) { throw new Error(`Could not find version ${useVersion || version} for platform ${host}`); } const downloadUrl = meta[host].tarball; const variantName = path2.basename(meta[host].tarball).replace(`.${ext}`, ""); return { downloadUrl, variantName, version: useVersion || version }; } __name(resolveVersion2, "resolveVersion"); module2.exports = { extForPlatform: extForPlatform2, resolveCommit: resolveCommit2, resolveVersion: resolveVersion2 }; } }); // index.js var os = require("os"); var path = require("path"); var semver = require_semver2(); var actions = require_core(); var cache = require_cache3(); var toolCache = require_tool_cache(); var { extForPlatform, resolveCommit, resolveVersion } = require_versions(); var TOOL_NAME = "zig"; async function downloadZig(arch, platform, version, useCache = true) { const ext = extForPlatform(platform); const { downloadUrl, variantName, version: useVersion } = version.includes("+") ? resolveCommit(arch, platform, version) : await resolveVersion(arch, platform, version); const cachedPath = toolCache.find(TOOL_NAME, useVersion); if (cachedPath) { actions.info(`using cached zig install: ${cachedPath}`); return cachedPath; } const cacheKey = `${TOOL_NAME}-${variantName}`; if (useCache) { const restorePath = path.join(process.env.RUNNER_TOOL_CACHE, TOOL_NAME, useVersion, arch); actions.info(`attempting restore of ${cacheKey} to ${restorePath}`); const restoredKey = await cache.restoreCache([restorePath], cacheKey); if (restoredKey) { actions.info(`using cached zig install: ${restorePath}`); return restorePath; } } actions.info(`no cached version found. downloading zig ${variantName}`); const downloadPath = await toolCache.downloadTool(downloadUrl); const zigPath = ext === "zip" ? await toolCache.extractZip(downloadPath) : await toolCache.extractTar(downloadPath, void 0, "x"); const binPath = path.join(zigPath, variantName); const cachePath = await toolCache.cacheDir(binPath, TOOL_NAME, useVersion); if (useCache) { actions.info(`adding zig ${useVersion} at ${cachePath} to local cache ${cacheKey}`); await cache.saveCache([cachePath], cacheKey); } return cachePath; } __name(downloadZig, "downloadZig"); async function main() { const version = actions.getInput("version") || "master"; const useCache = actions.getInput("cache") || "true"; if (semver.valid(version) && semver.lt(version, "0.3.0")) { actions.setFailed("This action does not work with Zig 0.1.0 and Zig 0.2.0"); return; } if (useCache !== "false" && useCache !== "true") { actions.setFailed('`with.cache` must be "true" or "false"'); return; } const zigPath = await downloadZig(os.arch(), os.platform(), version, useCache === "true"); actions.addPath(zigPath); actions.info(`zig installed at ${zigPath}`); } __name(main, "main"); main().catch((err) => { console.error(err.stack); actions.setFailed(err.message); process.exit(1); }); /*! Bundled license information: undici/lib/fetch/body.js: (*! formdata-polyfill. MIT License. Jimmy Wärting *) undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) simple-concat/index.js: (*! simple-concat. MIT License. Feross Aboukhadijeh *) simple-get/index.js: (*! simple-get. MIT License. Feross Aboukhadijeh *) */